First Commit
This commit is contained in:
@@ -0,0 +1,123 @@
|
|||||||
|
# .env file for SysMVC
|
||||||
|
|
||||||
|
# Application settings
|
||||||
|
APP_NAME=SysMVC
|
||||||
|
APP_KEY=dd9a6739a393907184b439c74718247991d7228ca72b67543bbca11e6a440078
|
||||||
|
APP_ENV=production
|
||||||
|
APP_DEBUG=false
|
||||||
|
APP_URL=http://sysmvc.syspanel.com.br
|
||||||
|
# Database configuration
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=sysmvc
|
||||||
|
DB_USERNAME=sysmvc
|
||||||
|
DB_PASSWORD=Mega88ax10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Session configuration
|
||||||
|
SESSION_DRIVER=file # options: file, database, redis, etc.
|
||||||
|
SESSION_LIFETIME=120 # in minutes
|
||||||
|
|
||||||
|
# Mail configuration (example for SMTP)
|
||||||
|
MAIL_MAILER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=noreply@sysmvc.com
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
# Logging configuration
|
||||||
|
LOG_CHANNEL=stack # options: daily, single, syslog, etc.
|
||||||
|
|
||||||
|
# JWT Secret for authentication (if you're using JWT)
|
||||||
|
JWT_SECRET=your_jwt_secret_key
|
||||||
|
|
||||||
|
# Other third-party services
|
||||||
|
PUSHER_APP_ID=your_pusher_app_id
|
||||||
|
PUSHER_APP_KEY=your_pusher_app_key
|
||||||
|
PUSHER_APP_SECRET=your_pusher_app_secret
|
||||||
|
|
||||||
|
# Redis configuration (if you're using Redis)
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_DB=0
|
||||||
|
|
||||||
|
# Storage paths (example for image uploads)
|
||||||
|
UPLOADS_DIR=/var/www/sysmvc/public/uploads
|
||||||
|
|
||||||
|
# Other sensitive credentials
|
||||||
|
STRIPE_SECRET_KEY=your_stripe_secret_key
|
||||||
|
STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
|
||||||
|
|
||||||
|
# PayPal
|
||||||
|
PAYPAL_CLIENT_ID=your_paypal_client_id
|
||||||
|
PAYPAL_SECRET=your_paypal_secret_key
|
||||||
|
PAYPAL_MODE=sandbox # ou "live" para produção
|
||||||
|
|
||||||
|
# MercadoPago
|
||||||
|
MERCADOPAGO_ACCESS_TOKEN=your_access_token
|
||||||
|
MERCADOPAGO_PUBLIC_KEY=your_public_key
|
||||||
|
|
||||||
|
# Pagar.me
|
||||||
|
PAGARME_API_KEY=your_api_key
|
||||||
|
PAGARME_ENCRYPTION_KEY=your_encryption_key
|
||||||
|
|
||||||
|
# Braintree
|
||||||
|
BRAINTREE_MERCHANT_ID=your_merchant_id
|
||||||
|
BRAINTREE_PUBLIC_KEY=your_public_key
|
||||||
|
BRAINTREE_PRIVATE_KEY=your_private_key
|
||||||
|
|
||||||
|
# PagSeguro
|
||||||
|
PAGSEGURO_EMAIL=your_pagseguro_email
|
||||||
|
PAGSEGURO_TOKEN=your_pagseguro_token
|
||||||
|
|
||||||
|
API_PUBLIC_KEY=9d8f87ae56d7806759d59a8e1119b47d
|
||||||
|
API_SECRET_KEY=7958d0834f85a08beef4d4d23cd1d184f9dcfc2b60b2c30f0a67a677960d62c2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Optional for development
|
||||||
|
APP_TIMEZONE=America/Sao_Paulo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# PHP Configuration
|
||||||
|
|
||||||
|
# Limite de memória do PHP (aumente se precisar processar muitos dados)
|
||||||
|
PHP_MEMORY_LIMIT=1024M
|
||||||
|
|
||||||
|
# Tempo máximo de execução de scripts (evita timeout em processos longos)
|
||||||
|
PHP_MAX_EXECUTION_TIME=300
|
||||||
|
|
||||||
|
# Tempo máximo que um script pode aguardar por entrada (upload, por exemplo)
|
||||||
|
PHP_MAX_INPUT_TIME=120
|
||||||
|
|
||||||
|
# Tamanho máximo de arquivos para upload
|
||||||
|
PHP_UPLOAD_MAX_FILESIZE=256M
|
||||||
|
|
||||||
|
# Tamanho máximo de POST (afeta upload de arquivos grandes)
|
||||||
|
PHP_POST_MAX_SIZE=256M
|
||||||
|
|
||||||
|
# Número máximo de arquivos enviados por requisição
|
||||||
|
PHP_MAX_FILE_UPLOADS=50
|
||||||
|
|
||||||
|
# Exibir erros do PHP (use false em produção)
|
||||||
|
PHP_DISPLAY_ERRORS=false
|
||||||
|
|
||||||
|
# Exibir startup errors do PHP
|
||||||
|
PHP_DISPLAY_STARTUP_ERRORS=true
|
||||||
|
|
||||||
|
# Nível de erro do PHP (E_ALL para capturar tudo, E_ERROR para apenas erros graves)
|
||||||
|
PHP_ERROR_REPORTING=E_ALL
|
||||||
|
|
||||||
|
# Habilita ou desabilita logs de erro do PHP
|
||||||
|
PHP_LOG_ERRORS=true
|
||||||
|
|
||||||
|
# Arquivo de log de erros do PHP
|
||||||
|
PHP_ERROR_LOG=/var/log/php_errors.log
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
RewriteEngine on
|
||||||
|
RewriteRule ^$ public/ [L]
|
||||||
|
RewriteRule (.*) public/$1 [L]
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Marco Costa (marcocosta@gmx.com)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is provided to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
# SysMVC
|
||||||
|
|
||||||
|
## 📌 Project Information
|
||||||
|
**SysMVC** is a system developed by **Marco Costa** (**syspanel@gmx.com**), with source code licensed under the **MIT License**.
|
||||||
|
|
||||||
|
This software is offered for free and can be used, modified, and distributed under the terms of the MIT License.
|
||||||
|
|
||||||
|
Project website: [https://sysmvc.duckdns.org](https://sysmvc.duckdns.org)
|
||||||
|
|
||||||
|
Github: https://github.com/syspanel/SysMVC.git
|
||||||
|
|
||||||
|
### Support the Project
|
||||||
|
If you find this project useful, consider supporting its development with a donation via PayPal:
|
||||||
|
|
||||||
|
[](https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Installation Tutorial
|
||||||
|
|
||||||
|
### ✅ Prerequisites
|
||||||
|
- **PHP 7.4** or higher
|
||||||
|
- **Composer** (dependency manager for PHP)
|
||||||
|
- **Web Server** (Apache or Nginx)
|
||||||
|
- **MySQL** or another compatible database
|
||||||
|
|
||||||
|
### 🔧 Step-by-Step Guide
|
||||||
|
|
||||||
|
#### 1️⃣ Unzip the File
|
||||||
|
Download and unzip the SysMVC file to your local environment:
|
||||||
|
|
||||||
|
bash
|
||||||
|
unzip sysmvc.zip -d sysmvc
|
||||||
|
cd sysmvc
|
||||||
|
|
||||||
|
2️⃣ Install Dependencies
|
||||||
|
|
||||||
|
Use Composer to install the project dependencies:
|
||||||
|
|
||||||
|
composer install
|
||||||
|
|
||||||
|
3️⃣ Configure the Environment
|
||||||
|
|
||||||
|
Copy the .env.example file to .env and configure your environment variables:
|
||||||
|
|
||||||
|
cp .env.example .env
|
||||||
|
|
||||||
|
Open the .env file and edit the following lines with your information:
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=your_database_name
|
||||||
|
DB_USERNAME=your_username
|
||||||
|
DB_PASSWORD=your_password
|
||||||
|
|
||||||
|
4️⃣ Set Permissions
|
||||||
|
|
||||||
|
Change the permissions for the storage and cache directories to ensure the web server can write to them:
|
||||||
|
|
||||||
|
chmod -R 775 storage
|
||||||
|
chmod -R 775 bootstrap/cache
|
||||||
|
|
||||||
|
5️⃣ Generate the Application Key
|
||||||
|
|
||||||
|
php bin/console generate:app-key
|
||||||
|
|
||||||
|
6️⃣ Run Migrations
|
||||||
|
|
||||||
|
Run the migrations to create the tables in the database:
|
||||||
|
|
||||||
|
php bin/console migrate
|
||||||
|
|
||||||
|
7️⃣ Configure the Web Server
|
||||||
|
📌 Apache
|
||||||
|
|
||||||
|
Add the following configuration to your Apache configuration file:
|
||||||
|
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName sysmvc.local
|
||||||
|
DocumentRoot /path/to/sysmvc/public
|
||||||
|
|
||||||
|
<Directory /path/to/sysmvc/public>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
📌 Nginx
|
||||||
|
|
||||||
|
Add the following configuration to your Nginx configuration file:
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name sysmvc.local;
|
||||||
|
root /path/to/sysmvc/public;
|
||||||
|
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include snippets/fastcgi-php.conf;
|
||||||
|
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
📦 Dependencies Used
|
||||||
|
|
||||||
|
The project uses the following third-party packages, each with its respective license:
|
||||||
|
✅ Packages with MIT License
|
||||||
|
|
||||||
|
Illuminate Database → illuminate/database
|
||||||
|
Monolog → monolog/monolog
|
||||||
|
BladeOne → eftec/bladeone
|
||||||
|
Twig → twig/twig
|
||||||
|
Symfony Console → symfony/console
|
||||||
|
Phinx → robmorgan/phinx
|
||||||
|
Defuse Encryption → defuse/php-encryption
|
||||||
|
Random Compatibility → paragonie/random_compat
|
||||||
|
Rakit Validation → rakit/validation
|
||||||
|
Carbon → nesbot/carbon
|
||||||
|
Flysystem → league/flysystem
|
||||||
|
Intervention Image → intervention/image
|
||||||
|
Symfony Cache → symfony/cache
|
||||||
|
Predis Redis Client → predis/predis
|
||||||
|
PHP Dependency Injection → php-di/php-di
|
||||||
|
Symfony Dotenv → symfony/dotenv
|
||||||
|
BladeOne HTML → eftec/bladeonehtml
|
||||||
|
Pecee SimpleRouter → pecee/simple-router
|
||||||
|
Nyholm PSR7 → nyholm/psr7
|
||||||
|
FakerPHP Faker → fakerphp/faker
|
||||||
|
Symfony Mailer → symfony/mailer
|
||||||
|
|
||||||
|
📜 Terms of Use
|
||||||
|
|
||||||
|
This project is licensed under the MIT License.
|
||||||
|
|
||||||
|
You can use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software, as long as the license and copyright notice are included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
The Software is provided "as is", without warranties of any kind. For more details, see the MIT License.
|
||||||
|
|
||||||
|
For more information, contact: marcocosta@gmx.com
|
||||||
|
|
||||||
|
### Support the Project
|
||||||
|
If you find this project useful, consider supporting its development with a donation via PayPal:
|
||||||
|
|
||||||
|
[](https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD)
|
||||||
|
|
||||||
|
© 2025 Marco Costa - All rights reserved under the MIT License.
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Symfony\Component\Dotenv\Dotenv;
|
||||||
|
|
||||||
|
class GenerateApiKeysCommand extends Command
|
||||||
|
{
|
||||||
|
protected static $defaultName = 'generate:api-keys';
|
||||||
|
|
||||||
|
protected function configure()
|
||||||
|
{
|
||||||
|
$this->setDescription('Generates API keys and writes them to the .env file');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
// Generate random API keys
|
||||||
|
$publicKey = bin2hex(random_bytes(16)); // Generates a random public key
|
||||||
|
$secretKey = bin2hex(random_bytes(32)); // Generates a random secret key
|
||||||
|
|
||||||
|
// Output to terminal
|
||||||
|
$output->writeln("Public Key: $publicKey");
|
||||||
|
$output->writeln("Secret Key: $secretKey");
|
||||||
|
|
||||||
|
// Path to the .env file
|
||||||
|
$envFilePath = __DIR__ . '/../../../.env';
|
||||||
|
|
||||||
|
// Check if the .env file exists
|
||||||
|
if (!file_exists($envFilePath)) {
|
||||||
|
$output->writeln("<error>.env file not found!</error>");
|
||||||
|
return Command::FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read the contents of the .env file
|
||||||
|
$envFile = file_get_contents($envFilePath);
|
||||||
|
|
||||||
|
// Check if the keys already exist in the .env file
|
||||||
|
if (strpos($envFile, 'API_PUBLIC_KEY=') === false) {
|
||||||
|
// Add the public key
|
||||||
|
$envFile .= "\nAPI_PUBLIC_KEY=$publicKey";
|
||||||
|
} else {
|
||||||
|
// Replace the existing public key
|
||||||
|
$envFile = preg_replace('/^API_PUBLIC_KEY=.*$/m', "API_PUBLIC_KEY=$publicKey", $envFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($envFile, 'API_SECRET_KEY=') === false) {
|
||||||
|
// Add the secret key
|
||||||
|
$envFile .= "\nAPI_SECRET_KEY=$secretKey";
|
||||||
|
} else {
|
||||||
|
// Replace the existing secret key
|
||||||
|
$envFile = preg_replace('/^API_SECRET_KEY=.*$/m', "API_SECRET_KEY=$secretKey", $envFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write to the .env file
|
||||||
|
file_put_contents($envFilePath, $envFile);
|
||||||
|
|
||||||
|
$output->writeln("API keys have been written to the .env file");
|
||||||
|
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
+54
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Symfony\Component\Dotenv\Dotenv;
|
||||||
|
|
||||||
|
class GenerateAppKeyCommand extends Command
|
||||||
|
{
|
||||||
|
protected static $defaultName = 'generate:app-key';
|
||||||
|
|
||||||
|
protected function configure()
|
||||||
|
{
|
||||||
|
$this->setDescription('Generates an application key and writes it to the .env file');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
// Generate random key
|
||||||
|
$appKey = bin2hex(random_bytes(32)); // Generates a 64-character key (32 bytes)
|
||||||
|
|
||||||
|
// Output to terminal
|
||||||
|
$output->writeln("Generated Key: $appKey");
|
||||||
|
|
||||||
|
// Load the .env
|
||||||
|
$dotenv = new Dotenv();
|
||||||
|
$envFilePath = __DIR__ . '/../../../.env'; // Adjust the path as needed
|
||||||
|
if (!file_exists($envFilePath)) {
|
||||||
|
$output->writeln(".env file not found!");
|
||||||
|
return Command::FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read the content of the .env file
|
||||||
|
$envFile = file_get_contents($envFilePath);
|
||||||
|
|
||||||
|
// Replace the APP_KEY or add it if it doesn't exist
|
||||||
|
if (strpos($envFile, 'APP_KEY=') !== false) {
|
||||||
|
// If a line with APP_KEY already exists, replace it
|
||||||
|
$envFile = preg_replace('/^APP_KEY=.*$/m', "APP_KEY=$appKey", $envFile);
|
||||||
|
} else {
|
||||||
|
// Otherwise, add it at the end
|
||||||
|
$envFile .= "\nAPP_KEY=$appKey\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write the new content to the .env file
|
||||||
|
file_put_contents($envFilePath, $envFile);
|
||||||
|
|
||||||
|
$output->writeln("The application key has been written to the .env file");
|
||||||
|
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
+85
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||||
|
use Symfony\Component\Dotenv\Dotenv;
|
||||||
|
use Faker\Factory as Faker;
|
||||||
|
|
||||||
|
class MigrateCrudExampleCommand extends Command
|
||||||
|
{
|
||||||
|
protected static $defaultName = 'migrate:crudexample';
|
||||||
|
|
||||||
|
protected function configure()
|
||||||
|
{
|
||||||
|
$this->setDescription('Migrates the database by creating the crudexample table and adding fake records for testing.');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
// Load the variables from the .env file
|
||||||
|
$dotenv = new Dotenv();
|
||||||
|
$dotenv->load(__DIR__ . '/../../../.env');
|
||||||
|
|
||||||
|
$capsule = new Capsule;
|
||||||
|
|
||||||
|
$capsule->addConnection([
|
||||||
|
'driver' => $_ENV['DB_CONNECTION'],
|
||||||
|
'host' => $_ENV['DB_HOST'],
|
||||||
|
'database' => $_ENV['DB_DATABASE'],
|
||||||
|
'username' => $_ENV['DB_USERNAME'],
|
||||||
|
'password' => $_ENV['DB_PASSWORD'],
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'collation' => 'utf8_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Set Capsule as the global Eloquent ORM manager
|
||||||
|
$capsule->setAsGlobal();
|
||||||
|
|
||||||
|
// Boot Eloquent ORM
|
||||||
|
$capsule->bootEloquent();
|
||||||
|
|
||||||
|
// Check if the crudexample table already exists
|
||||||
|
if (Capsule::schema()->hasTable('crudexample')) {
|
||||||
|
$output->writeln('The "crudexample" table already exists. No action needed.');
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the crudexample table
|
||||||
|
$capsule->schema()->create('crudexample', function ($table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('company', 50);
|
||||||
|
$table->string('name', 50);
|
||||||
|
$table->string('password', 255);
|
||||||
|
$table->string('email', 100)->unique();
|
||||||
|
$table->string('address', 50);
|
||||||
|
$table->string('phone', 50);
|
||||||
|
$table->text('notes')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Generate 30 fake records
|
||||||
|
$faker = Faker::create();
|
||||||
|
for ($i = 0; $i < 30; $i++) {
|
||||||
|
Capsule::table('crudexample')->insert([
|
||||||
|
'company' => $faker->company,
|
||||||
|
'name' => $faker->name,
|
||||||
|
'password' => password_hash('password', PASSWORD_BCRYPT), // Default password for testing
|
||||||
|
'email' => $faker->unique()->safeEmail,
|
||||||
|
'address' => $faker->address,
|
||||||
|
'phone' => $faker->phoneNumber,
|
||||||
|
'notes' => $faker->sentence,
|
||||||
|
'created_at' => date('Y-m-d H:i:s'),
|
||||||
|
'updated_at' => date('Y-m-d H:i:s'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$output->writeln('Migration of the "crudexample" table and insertion of fake records for example completed successfully.');
|
||||||
|
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Console\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
|
class SayHelloCommand extends Command
|
||||||
|
{
|
||||||
|
// Nome do comando no terminal
|
||||||
|
protected static $defaultName = 'app:say-hello';
|
||||||
|
|
||||||
|
protected function configure(): void
|
||||||
|
{
|
||||||
|
$this->setDescription('Exibe uma mensagem de saudação.');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
|
{
|
||||||
|
$output->writeln('Hello, SysMVC!');
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+174
@@ -0,0 +1,174 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use eftec\bladeone\BladeOne;
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Monolog\Logger;
|
||||||
|
use App\Models\CrudExample;
|
||||||
|
use App\Services\Sanitizer;
|
||||||
|
use App\Services\BaseController;
|
||||||
|
|
||||||
|
class CrudExampleController extends BaseController
|
||||||
|
{
|
||||||
|
protected $blade;
|
||||||
|
protected $logger;
|
||||||
|
|
||||||
|
public function __construct(BladeOne $blade, Logger $logger)
|
||||||
|
{
|
||||||
|
$this->blade = $blade;
|
||||||
|
$this->logger = $logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function validateCsrfToken($token)
|
||||||
|
{
|
||||||
|
return hash_equals($_SESSION['csrf_token'], $token);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(Request $request): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$crudexample = CrudExample::all();
|
||||||
|
$this->logger->info('Displaying the CrudExampleController page.');
|
||||||
|
|
||||||
|
if ($crudexample->isEmpty()) {
|
||||||
|
$this->logger->warning('No records found in the database.');
|
||||||
|
// Continue with rendering the view instead of returning a message
|
||||||
|
}
|
||||||
|
|
||||||
|
$crudexample = Sanitizer::sanitizeOutput($crudexample->toArray());
|
||||||
|
|
||||||
|
return $this->blade->run('crudexample.index', ['crudexample' => $crudexample]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error when querying the database: ' . $e->getMessage());
|
||||||
|
return 'Error when querying the database: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit(Request $request, $id): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Editing record with ID: ' . $id);
|
||||||
|
$crudexample = CrudExample::find($id);
|
||||||
|
if (!$crudexample) {
|
||||||
|
return 'Record not found';
|
||||||
|
}
|
||||||
|
|
||||||
|
$csrfToken = generateCsrfToken();
|
||||||
|
$crudexample = Sanitizer::sanitizeOutput($crudexample->toArray());
|
||||||
|
|
||||||
|
return $this->blade->run('crudexample.edit', ['crudexample' => $crudexample, 'csrfToken' => $csrfToken]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error when displaying the edit page: ' . $e->getMessage());
|
||||||
|
return 'Error when displaying the edit page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return $this->blade->run('crudexample.create', ['error' => null]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error when displaying the create page: ' . $e->getMessage());
|
||||||
|
return 'Error when displaying the create page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$data = $_POST;
|
||||||
|
|
||||||
|
if (!isset($data['csrf_token']) || !$this->validateCsrfToken($data['csrf_token'])) {
|
||||||
|
throw new \Exception('Invalid CSRF token.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = Sanitizer::sanitizeInput($data);
|
||||||
|
|
||||||
|
if (!isset($data['password']) || empty($data['password'])) {
|
||||||
|
throw new \Exception('The "password" field is required.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['password'] = password_hash($data['password'], PASSWORD_BCRYPT);
|
||||||
|
|
||||||
|
CrudExample::create($data);
|
||||||
|
|
||||||
|
header('Location: /crudexample');
|
||||||
|
exit;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
if ($e->getCode() == 23000) { // Error code for duplicate
|
||||||
|
$this->logger->error('Error when creating record: Duplicate email.');
|
||||||
|
return $this->blade->run('crudexample.create', ['error' => 'This email already exists.']);
|
||||||
|
} else {
|
||||||
|
$this->logger->error('Error when creating record: ' . $e->getMessage());
|
||||||
|
echo 'Error when creating record: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$data = $_POST;
|
||||||
|
|
||||||
|
if (!isset($data['csrf_token']) || !$this->validateCsrfToken($data['csrf_token'])) {
|
||||||
|
throw new \Exception('Invalid CSRF token.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = Sanitizer::sanitizeInput($data);
|
||||||
|
|
||||||
|
if (isset($data['password']) && !empty($data['password'])) {
|
||||||
|
$data['password'] = password_hash($data['password'], PASSWORD_BCRYPT);
|
||||||
|
} else {
|
||||||
|
unset($data['password']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$crudexample = CrudExample::find($id);
|
||||||
|
if ($crudexample) {
|
||||||
|
$crudexample->update($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Location: /crudexample');
|
||||||
|
exit;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error when updating record: ' . $e->getMessage());
|
||||||
|
echo 'Error when updating record: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show(Request $request, $id): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$crudexample = CrudExample::find($id);
|
||||||
|
if (!$crudexample) {
|
||||||
|
return 'Record not found';
|
||||||
|
}
|
||||||
|
|
||||||
|
$crudexample = Sanitizer::sanitizeOutput($crudexample->toArray());
|
||||||
|
|
||||||
|
return $this->blade->run('crudexample.show', ['crudexample' => $crudexample]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error when displaying record details: ' . $e->getMessage());
|
||||||
|
return 'Error when displaying record details: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete(Request $request, $id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Deleting record with ID: ' . $id);
|
||||||
|
$crudexample = CrudExample::find($id);
|
||||||
|
if ($crudexample) {
|
||||||
|
$crudexample->delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Location: /crudexample');
|
||||||
|
exit;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error when deleting record: ' . $e->getMessage());
|
||||||
|
echo 'Error when deleting record: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+127
@@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use eftec\bladeone\BladeOne;
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Monolog\Logger;
|
||||||
|
use App\Services\BaseController;
|
||||||
|
|
||||||
|
class HomeController extends BaseController
|
||||||
|
{
|
||||||
|
protected $blade;
|
||||||
|
protected $logger;
|
||||||
|
|
||||||
|
public function __construct(BladeOne $blade, Logger $logger)
|
||||||
|
{
|
||||||
|
$this->blade = $blade;
|
||||||
|
$this->logger = $logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(Request $request): string
|
||||||
|
{
|
||||||
|
$data = ['title' => 'Welcome to SysMVC'];
|
||||||
|
return $this->blade->run('home', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function about(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the About page.');
|
||||||
|
return $this->blade->run('home.about');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the About page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the About page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function details(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the Learn More page.');
|
||||||
|
return $this->blade->run('home.details');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the Details page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the Learn More page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function readme(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the ReadMe page.');
|
||||||
|
return $this->blade->run('home.readme');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the ReadMe page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the ReadMe page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function database(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the Database Usage page.');
|
||||||
|
return $this->blade->run('home.database');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the Database Usage page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the Database Usage page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dependencyInjection(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the Dependency Injection page.');
|
||||||
|
return $this->blade->run('home.dependency-injection');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the Dependency Injection page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the Dependency Injection page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function appDevelopment(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the App Development page.');
|
||||||
|
return $this->blade->run('home.app-development');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the App Development page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the App Development page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// New methods
|
||||||
|
public function templatesBlade(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the Blade Templates page.');
|
||||||
|
return $this->blade->run('home.templates-blade');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the Blade Templates page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the Blade Templates page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function security(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the Security page.');
|
||||||
|
return $this->blade->run('home.security');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the Security page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the Security page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function consoleCli(): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the Console CLI page.');
|
||||||
|
return $this->blade->run('home.console-cli');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the Console CLI page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the Console CLI page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
use App\Services\BaseController;
|
||||||
|
|
||||||
|
use eftec\bladeone\BladeOne;
|
||||||
|
|
||||||
|
class IndexController extends BaseController
|
||||||
|
{
|
||||||
|
protected $blade;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
// Configure BladeOne
|
||||||
|
$this->blade = new BladeOne(VIEWS_PATH, CACHE_PATH, BladeOne::MODE_DEBUG);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
// Pass data to the view and render
|
||||||
|
return $this->blade->run('home', ['title' => 'Welcome to SysMVC2025!']);
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use eftec\bladeone\BladeOne;
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Monolog\Logger;
|
||||||
|
use App\Services\BaseController;
|
||||||
|
|
||||||
|
class TesteController extends BaseController
|
||||||
|
{
|
||||||
|
protected $blade;
|
||||||
|
protected $logger;
|
||||||
|
|
||||||
|
public function __construct(BladeOne $blade, Logger $logger)
|
||||||
|
{
|
||||||
|
$this->blade = $blade;
|
||||||
|
$this->logger = $logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(Request $request): string
|
||||||
|
{
|
||||||
|
$data = ['title' => 'Bem-vindo ao TesteController'];
|
||||||
|
$this->logger->info('Exibindo a página do TesteController.');
|
||||||
|
return $this->blade->run('test', $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Executable
+184
@@ -0,0 +1,184 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use eftec\bladeone\BladeOne;
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Monolog\Logger;
|
||||||
|
use App\Services\Sanitizer;
|
||||||
|
use App\Services\BaseController;
|
||||||
|
use App\Models\TwigExample;
|
||||||
|
use Twig\Environment;
|
||||||
|
|
||||||
|
class TwigExampleController extends BaseController
|
||||||
|
{
|
||||||
|
protected $twig;
|
||||||
|
protected $logger;
|
||||||
|
protected $blade;
|
||||||
|
|
||||||
|
public function __construct(Environment $twig, Logger $logger, BladeOne $blade)
|
||||||
|
{
|
||||||
|
$this->twig = $twig;
|
||||||
|
$this->logger = $logger;
|
||||||
|
$this->blade = $blade;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function validateCsrfToken($token)
|
||||||
|
{
|
||||||
|
return hash_equals($_SESSION['csrf_token'], $token);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(Request $request): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$twigexample = TwigExample::all();
|
||||||
|
$this->logger->info('Displaying the TwigExampleController page.');
|
||||||
|
|
||||||
|
if ($twigexample->isEmpty()) {
|
||||||
|
$this->logger->warning('No records found in the database.');
|
||||||
|
// Continue with rendering the view instead of returning a message
|
||||||
|
}
|
||||||
|
|
||||||
|
$twigexample = Sanitizer::sanitizeOutput($twigexample->toArray());
|
||||||
|
|
||||||
|
return $this->twig->render('twigexample/index.twig.php', ['twigexample' => $twigexample]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error querying the database: ' . $e->getMessage());
|
||||||
|
return 'Error querying the database: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create(Request $request): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->logger->info('Displaying the creation page of the TwigExampleController.');
|
||||||
|
return $this->twig->render('twigexample/create.twig.php', ['csrf_token' => htmlspecialchars(getCsrfToken(), ENT_QUOTES, 'UTF-8')]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the creation page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the creation page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit(Request $request, $id): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$twigexample = TwigExample::find($id);
|
||||||
|
|
||||||
|
if (!$twigexample) {
|
||||||
|
$this->logger->warning("Record with ID $id not found.");
|
||||||
|
return "Record with ID $id not found.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$twigexample = Sanitizer::sanitizeOutput($twigexample->toArray());
|
||||||
|
|
||||||
|
$this->logger->info("Displaying the edit page for the record with ID: $id.");
|
||||||
|
return $this->twig->render('twigexample/edit.twig.php', ['twigexample' => $twigexample, 'csrf_token' => htmlspecialchars(getCsrfToken(), ENT_QUOTES, 'UTF-8')]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the edit page: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the edit page: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show(Request $request, $id): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$twigexample = TwigExample::find($id);
|
||||||
|
|
||||||
|
if (!$twigexample) {
|
||||||
|
$this->logger->warning("Record with ID $id not found.");
|
||||||
|
return "Record with ID $id not found.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$twigexample = Sanitizer::sanitizeOutput($twigexample->toArray());
|
||||||
|
|
||||||
|
$this->logger->info("Displaying the record with ID: $id.");
|
||||||
|
return $this->twig->render('twigexample/show.twig.php', ['twigexample' => $twigexample]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error displaying the record: ' . $e->getMessage());
|
||||||
|
return 'Error displaying the record: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete(Request $request, $id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$twigexample = TwigExample::find($id);
|
||||||
|
|
||||||
|
if (!$twigexample) {
|
||||||
|
$this->logger->warning("Record with ID $id not found.");
|
||||||
|
return "Record with ID $id not found.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$twigexample->delete();
|
||||||
|
|
||||||
|
$this->logger->info("Record with ID: $id deleted successfully.");
|
||||||
|
header('Location: /twigexample');
|
||||||
|
exit;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error deleting the record: ' . $e->getMessage());
|
||||||
|
return 'Error deleting the record: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$data = $_POST;
|
||||||
|
|
||||||
|
if (!isset($data['csrf_token']) || !$this->validateCsrfToken($data['csrf_token'])) {
|
||||||
|
throw new \Exception('Invalid CSRF token.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = Sanitizer::sanitizeInput($data);
|
||||||
|
|
||||||
|
if (!isset($data['password']) || empty($data['password'])) {
|
||||||
|
throw new \Exception('The "password" field is required.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['password'] = password_hash($data['password'], PASSWORD_BCRYPT);
|
||||||
|
|
||||||
|
TwigExample::create($data);
|
||||||
|
|
||||||
|
header('Location: /twigexample');
|
||||||
|
exit;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
if ($e->getCode() == 23000) { // Error code for duplicate
|
||||||
|
$this->logger->error('Error creating record: Duplicate email.');
|
||||||
|
return $this->blade->run('twigexample.create', ['error' => 'This email already exists.']);
|
||||||
|
} else {
|
||||||
|
$this->logger->error('Error creating record: ' . $e->getMessage());
|
||||||
|
echo 'Error creating record: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$data = $_POST;
|
||||||
|
|
||||||
|
if (!isset($data['csrf_token']) || !$this->validateCsrfToken($data['csrf_token'])) {
|
||||||
|
throw new \Exception('Invalid CSRF token.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = Sanitizer::sanitizeInput($data);
|
||||||
|
|
||||||
|
$twigexample = TwigExample::find($id);
|
||||||
|
|
||||||
|
if (!$twigexample) {
|
||||||
|
$this->logger->warning("Record with ID $id not found.");
|
||||||
|
return "Record with ID $id not found.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$twigexample->fill($data);
|
||||||
|
$twigexample->save();
|
||||||
|
|
||||||
|
$this->logger->info("Record with ID: $id updated successfully.");
|
||||||
|
header('Location: /twigexample');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Error updating the record: ' . $e->getMessage());
|
||||||
|
return 'Error updating the record: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+27
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class CrudExample extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'crudexample'; // Table name in the database
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'password',
|
||||||
|
'company',
|
||||||
|
'address',
|
||||||
|
'phone',
|
||||||
|
'email',
|
||||||
|
'notes'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'password',
|
||||||
|
];
|
||||||
|
|
||||||
|
// Disable timestamps if there are no created_at and updated_at columns
|
||||||
|
public $timestamps = false;
|
||||||
|
}
|
||||||
Executable
+27
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class TwigExample extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'crudexample'; // Table name in the database
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'password',
|
||||||
|
'company',
|
||||||
|
'address',
|
||||||
|
'phone',
|
||||||
|
'email',
|
||||||
|
'notes'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'password',
|
||||||
|
];
|
||||||
|
|
||||||
|
// Disable timestamps if there are no created_at and updated_at columns
|
||||||
|
public $timestamps = false;
|
||||||
|
}
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services;
|
||||||
|
|
||||||
|
class BaseController
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
// Adding security headers
|
||||||
|
header("Content-Security-Policy: default-src 'self'; script-src 'self' https://trusted.cdn.com; style-src 'self' https://trusted.cdn.com; img-src 'self' data:;");
|
||||||
|
header("X-Frame-Options: DENY");
|
||||||
|
header("X-Content-Type-Options: nosniff");
|
||||||
|
header("Referrer-Policy: no-referrer");
|
||||||
|
header("Strict-Transport-Security: max-age=31536000; includeSubDomains; preload");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
Executable
+39
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services;
|
||||||
|
|
||||||
|
class Sanitizer
|
||||||
|
{
|
||||||
|
public static function sanitizeInput(array $data): array
|
||||||
|
{
|
||||||
|
$sanitizedData = [];
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
$sanitizedData[$key] = static::sanitizeValue($value);
|
||||||
|
}
|
||||||
|
return $sanitizedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sanitizeOutput($data)
|
||||||
|
{
|
||||||
|
if (is_array($data)) {
|
||||||
|
return array_map([static::class, 'sanitizeOutput'], $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data !== null ? htmlspecialchars($data, ENT_QUOTES, 'UTF-8') : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function sanitizeValue($value)
|
||||||
|
{
|
||||||
|
if (is_array($value)) {
|
||||||
|
return static::sanitizeInput($value);
|
||||||
|
} elseif (is_null($value)) {
|
||||||
|
return ''; // Ensures null does not pass through
|
||||||
|
} elseif (filter_var($value, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
return filter_var($value, FILTER_SANITIZE_EMAIL);
|
||||||
|
} elseif (filter_var($value, FILTER_VALIDATE_URL)) {
|
||||||
|
return filter_var($value, FILTER_SANITIZE_URL);
|
||||||
|
} else {
|
||||||
|
return filter_var($value, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Application;
|
||||||
|
use App\Console\Command\GenerateApiKeysCommand;
|
||||||
|
use App\Console\Command\GenerateAppKeyCommand;
|
||||||
|
use App\Console\Command\MigrateCrudExampleCommand;
|
||||||
|
|
||||||
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
|
$application = new Application();
|
||||||
|
$application->add(new GenerateApiKeysCommand());
|
||||||
|
$application->add(new GenerateAppKeyCommand());
|
||||||
|
$application->add(new MigrateCrudExampleCommand());
|
||||||
|
$application->add(new App\Console\Command\SayHelloCommand());
|
||||||
|
|
||||||
|
|
||||||
|
$application->run();
|
||||||
|
|
||||||
Executable
+26
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use DI\Container;
|
||||||
|
use eftec\bladeone\BladeOne;
|
||||||
|
use Pecee\SimpleRouter\SimpleRouter as Router;
|
||||||
|
|
||||||
|
|
||||||
|
require __DIR__ . '/../config/templateengine.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/csrf.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/../config/envread.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/../config/paths.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/../config/database.php';
|
||||||
|
|
||||||
|
|
||||||
|
require __DIR__ . '/../routes/auth.php';
|
||||||
|
require __DIR__ . '/../routes/web.php';
|
||||||
|
require __DIR__ . '/../routes/api.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/../config/container.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/helpers.php';
|
||||||
|
|
||||||
Executable
+30
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function startSessionIfNeeded() {
|
||||||
|
if (session_status() === PHP_SESSION_NONE) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateCsrfToken() {
|
||||||
|
startSessionIfNeeded();
|
||||||
|
|
||||||
|
if (empty($_SESSION['csrf_token'])) {
|
||||||
|
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $_SESSION['csrf_token'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCsrfToken() {
|
||||||
|
startSessionIfNeeded();
|
||||||
|
return $_SESSION['csrf_token'] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function validateCsrfToken($token) {
|
||||||
|
startSessionIfNeeded();
|
||||||
|
return hash_equals($_SESSION['csrf_token'] ?? '', $token ?? '');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Executable
+409
@@ -0,0 +1,409 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats a date using Carbon.
|
||||||
|
*
|
||||||
|
* @param string $date
|
||||||
|
* @param string $format
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function carbonFormatDate(string $date, string $format = 'Y-m-d H:i:s'): string {
|
||||||
|
return Carbon::parse($date)->format($format);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the difference between two dates using Carbon.
|
||||||
|
*
|
||||||
|
* @param string $startDate
|
||||||
|
* @param string $endDate
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function carbonDateDifference(string $startDate, string $endDate): string {
|
||||||
|
$start = Carbon::parse($startDate);
|
||||||
|
$end = Carbon::parse($endDate);
|
||||||
|
return $start->diffForHumans($end);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates the full URL for an asset in your project.
|
||||||
|
*
|
||||||
|
* @param string $path The relative path of the asset.
|
||||||
|
* @return string The full URL of the asset.
|
||||||
|
*/
|
||||||
|
function asset($path)
|
||||||
|
{
|
||||||
|
// Get the base URL of the application from the defined constants
|
||||||
|
$baseUrl = rtrim(APP_URL, '/');
|
||||||
|
|
||||||
|
// Combine the base URL with the asset path
|
||||||
|
return $baseUrl . '/' . ltrim($path, '/');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a monetary value to cents.
|
||||||
|
*
|
||||||
|
* @param float $amount
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
function toCents(float $amount): int {
|
||||||
|
return (int) round($amount * 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a monetary value from cents to reais.
|
||||||
|
*
|
||||||
|
* @param int $cents
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
function fromCents(int $cents): float {
|
||||||
|
return $cents / 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Flysystem file system.
|
||||||
|
*
|
||||||
|
* @return Filesystem
|
||||||
|
*/
|
||||||
|
function createFilesystem(): Filesystem {
|
||||||
|
$adapter = new Local(__DIR__ . '/path/to/your/files');
|
||||||
|
return new Filesystem($adapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a file exists in Flysystem.
|
||||||
|
*
|
||||||
|
* @param string $filePath
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function flysystemFileExists(string $filePath): bool {
|
||||||
|
$filesystem = createFilesystem();
|
||||||
|
return $filesystem->has($filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resizes an image using Intervention Image.
|
||||||
|
*
|
||||||
|
* @param string $filePath
|
||||||
|
* @param int $width
|
||||||
|
* @param int $height
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function resizeImage(string $filePath, int $width, int $height): bool {
|
||||||
|
$manager = new ImageManager(['driver' => 'gd']);
|
||||||
|
$image = $manager->make($filePath);
|
||||||
|
$image->resize($width, $height);
|
||||||
|
return $image->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads a view with BladeOne.
|
||||||
|
*
|
||||||
|
* @param string $view
|
||||||
|
* @param array $data
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function view(string $view, array $data = []): string {
|
||||||
|
global $blade;
|
||||||
|
return $blade->run($view, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the base URL.
|
||||||
|
*
|
||||||
|
* @param string $path
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function baseUrl(string $path = ''): string {
|
||||||
|
return 'http://localhost/' . trim($path, '/');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a value exists in the array.
|
||||||
|
*
|
||||||
|
* @param array $array
|
||||||
|
* @param string $key
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function arrayHas(array $array, string $key): bool {
|
||||||
|
return isset($array[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merges arrays recursively.
|
||||||
|
*
|
||||||
|
* @param array $array1
|
||||||
|
* @param array $array2
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function arrayMergeRecursive(array $array1, array $array2): array {
|
||||||
|
return array_merge_recursive($array1, $array2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a value from an array or returns a default value.
|
||||||
|
*
|
||||||
|
* @param array $array
|
||||||
|
* @param string $key
|
||||||
|
* @param mixed $default
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function dataGet($array, $key, $default = null) {
|
||||||
|
if (is_null($key)) {
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($array[$key])) {
|
||||||
|
return $array[$key];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (explode('.', $key) as $segment) {
|
||||||
|
if (is_array($array) && array_key_exists($segment, $array)) {
|
||||||
|
$array = $array[$segment];
|
||||||
|
} else {
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a string to camel case.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function toCamelCase(string $string): string {
|
||||||
|
$result = str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $string)));
|
||||||
|
$result[0] = strtolower($result[0]);
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a slug from a string.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function generateSlug(string $string): string {
|
||||||
|
$slug = preg_replace('/[^A-Za-z0-9-]+/', '-', strtolower($string));
|
||||||
|
return trim($slug, '-');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a string to snake case.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function toSnakeCase(string $string): string {
|
||||||
|
return strtolower(preg_replace('/[A-Z]/', '_$0', lcfirst($string)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a random string.
|
||||||
|
*
|
||||||
|
* @param int $length
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function randomString(int $length = 10): string {
|
||||||
|
return substr(str_shuffle(str_repeat('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length / 62))), 1, $length);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the current date formatted.
|
||||||
|
*
|
||||||
|
* @param string $format
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function currentDateFormatted(string $format = 'Y-m-d H:i:s'): string {
|
||||||
|
return date($format);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the difference between two dates.
|
||||||
|
*
|
||||||
|
* @param string $startDate
|
||||||
|
* @param string $endDate
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
function dateDifference(string $startDate, string $endDate): int {
|
||||||
|
$start = new DateTime($startDate);
|
||||||
|
$end = new DateTime($endDate);
|
||||||
|
return $start->diff($end)->days;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats a date.
|
||||||
|
*
|
||||||
|
* @param string $date
|
||||||
|
* @param string $format
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function formatDate(string $date, string $format = 'Y-m-d H:i:s'): string {
|
||||||
|
return date($format, strtotime($date));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the age from a birth date.
|
||||||
|
*
|
||||||
|
* @param string $birthDate
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
function calculateAge(string $birthDate): int {
|
||||||
|
$birthDate = new DateTime($birthDate);
|
||||||
|
$today = new DateTime('today');
|
||||||
|
return $birthDate->diff($today)->y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redirects to another URL.
|
||||||
|
*
|
||||||
|
* @param string $url
|
||||||
|
*/
|
||||||
|
function redirect(string $url) {
|
||||||
|
header('Location: ' . $url);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a JSON response.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @param int $statusCode
|
||||||
|
*/
|
||||||
|
function jsonResponse(array $data, int $statusCode = 200) {
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
http_response_code($statusCode);
|
||||||
|
echo json_encode($data);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a file exists.
|
||||||
|
*
|
||||||
|
* @param string $filePath
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function fileExists(string $filePath): bool {
|
||||||
|
return file_exists($filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a directory.
|
||||||
|
*
|
||||||
|
* @param string $path
|
||||||
|
* @param int $permissions
|
||||||
|
*/
|
||||||
|
function createDirectory(string $path, int $permissions = 0755) {
|
||||||
|
if (!file_exists($path)) {
|
||||||
|
mkdir($path, $permissions, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the string ends with a given suffix.
|
||||||
|
*
|
||||||
|
* @param string $haystack
|
||||||
|
* @param string|array $needles
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function strEndsWith($haystack, $needles) {
|
||||||
|
foreach ((array) $needles as $needle) {
|
||||||
|
if ($needle !== '' && substr($haystack, -strlen($needle)) === $needle) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the string contains a given value.
|
||||||
|
*
|
||||||
|
* @param string $haystack
|
||||||
|
* @param string|array $needles
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function strContains($haystack, $needles) {
|
||||||
|
foreach ((array) $needles as $needle) {
|
||||||
|
if ($needle !== '' && strpos($haystack, $needle) !== false) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper for debugging variables (prints in a readable manner and exits).
|
||||||
|
*
|
||||||
|
* @param mixed $var
|
||||||
|
*/
|
||||||
|
function dd($var) {
|
||||||
|
echo '<pre>';
|
||||||
|
var_dump($var);
|
||||||
|
echo '</pre>';
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper for printing variables in a readable manner.
|
||||||
|
*
|
||||||
|
* @param mixed $var
|
||||||
|
*/
|
||||||
|
function dump($var) {
|
||||||
|
echo '<pre>';
|
||||||
|
var_dump($var);
|
||||||
|
echo '</pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats a monetary value.
|
||||||
|
*
|
||||||
|
* @param float $amount
|
||||||
|
* @param string $currency
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function formatCurrency(float $amount, string $currency = 'BRL'): string {
|
||||||
|
$formatter = new NumberFormatter('pt_BR', NumberFormatter::CURRENCY);
|
||||||
|
return $formatter->formatCurrency($amount, $currency);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a monetary value to cents.
|
||||||
|
*
|
||||||
|
* @param float $amount
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
function toCents2(float $amount): int {
|
||||||
|
return (int) round($amount * 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a monetary value from cents to reais.
|
||||||
|
*
|
||||||
|
* @param int $cents
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
function fromCents2(int $cents): float {
|
||||||
|
return $cents / 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the string starts with a given prefix.
|
||||||
|
*
|
||||||
|
* @param string $haystack
|
||||||
|
* @param string|array $needles
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function strStartsWith($haystack, $needles) {
|
||||||
|
foreach ((array) $needles as $needle) {
|
||||||
|
if ($needle !== '' && substr($haystack, 0, strlen($needle)) === $needle) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Crud Example Create'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="text-success">Blade - Crud Example New Item</h1>
|
||||||
|
|
||||||
|
<!-- Display error message if any -->
|
||||||
|
<?php if($error): ?>
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<?php echo \htmlentities($error??'', ENT_QUOTES, 'UTF-8', false); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<form action="/crudexample" method="POST">
|
||||||
|
<?= csrf() ?>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="name" class="form-label">Name:</label>
|
||||||
|
<input type="text" id="name" name="name" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="password" class="form-label">Password:</label>
|
||||||
|
<input type="password" id="password" name="password" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="company" class="form-label">Company:</label>
|
||||||
|
<input type="text" id="company" name="company" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="address" class="form-label">Address:</label>
|
||||||
|
<input type="text" id="address" name="address" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="phone" class="form-label">Phone:</label>
|
||||||
|
<input type="text" id="phone" name="phone" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="email" class="form-label">Email:</label>
|
||||||
|
<input type="email" id="email" name="email" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="notes" class="form-label">Notes:</label>
|
||||||
|
<textarea id="notes" name="notes" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Create</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Crud Example Edit'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="text-warning">Blade - Crud Example Edit</h1>
|
||||||
|
<form action="/crudexample/update/<?php echo \htmlentities($crudexample['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" method="POST">
|
||||||
|
<?= csrf() ?>
|
||||||
|
<input type="hidden" name="_method" value="POST"> <!-- Changed to POST -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="name" class="form-label">Name:</label>
|
||||||
|
<input type="text" id="name" name="name" class="form-control" value="<?php echo \htmlentities($crudexample['name']??'', ENT_QUOTES, 'UTF-8', false); ?>" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="password" class="form-label">Password:</label>
|
||||||
|
<input type="password" id="password" name="password" class="form-control">
|
||||||
|
<input type="checkbox" id="showPassword" onclick="togglePassword()"> Show Password
|
||||||
|
<script>
|
||||||
|
function togglePassword() {
|
||||||
|
var passwordInput = document.getElementById('password');
|
||||||
|
var showPasswordCheckbox = document.getElementById('showPassword');
|
||||||
|
passwordInput.type = showPasswordCheckbox.checked ? 'text' : 'password';
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="company" class="form-label">Company:</label>
|
||||||
|
<input type="text" id="company" name="company" class="form-control" value="<?php echo \htmlentities($crudexample['company']??'', ENT_QUOTES, 'UTF-8', false); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="address" class="form-label">Address:</label>
|
||||||
|
<input type="text" id="address" name="address" class="form-control" value="<?php echo \htmlentities($crudexample['address']??'', ENT_QUOTES, 'UTF-8', false); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="phone" class="form-label">Phone:</label>
|
||||||
|
<input type="text" id="phone" name="phone" class="form-control" value="<?php echo \htmlentities($crudexample['phone']??'', ENT_QUOTES, 'UTF-8', false); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="email" class="form-label">Email:</label>
|
||||||
|
<input type="email" id="email" name="email" class="form-control" value="<?php echo \htmlentities($crudexample['email']??'', ENT_QUOTES, 'UTF-8', false); ?>" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="notes" class="form-label">Notes:</label>
|
||||||
|
<textarea id="notes" name="notes" class="form-control"><?php echo \htmlentities($crudexample['notes']??'', ENT_QUOTES, 'UTF-8', false); ?></textarea>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Update</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Crud Example List'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
|
<h1 class="display-4 text-primary">Blade - Crud Example List</h1>
|
||||||
|
<a href="/crudexample/create" class="btn btn-success btn-lg">Add New Item</a>
|
||||||
|
</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="table-dark">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Company</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $__currentLoopData = $crudexample; $this->addLoop($__currentLoopData);$this->getFirstLoop();
|
||||||
|
foreach($__currentLoopData as $item): $loop = $this->incrementLoopIndices(); ?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
<td><?php echo \htmlentities($item['name']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
<td><?php echo \htmlentities($item['company']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/crudexample/show/<?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" class="btn btn-info btn-sm me-2">View</a>
|
||||||
|
<a href="/crudexample/edit/<?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" class="btn btn-warning btn-sm me-2">Edit</a>
|
||||||
|
|
||||||
|
<!-- Delete form -->
|
||||||
|
<form action="/crudexample/delete/<?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" method="POST" style="display:inline;">
|
||||||
|
<input type="hidden" name="_method" value="POST">
|
||||||
|
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Crud Example List'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
|
<h1 class="display-4 text-primary">Blade - Crud Example List</h1>
|
||||||
|
<a href="/crudexample/create" class="btn btn-success btn-lg">Add New Item</a>
|
||||||
|
</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="table-dark">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Company</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $__currentLoopData = $crudexample; $this->addLoop($__currentLoopData);$this->getFirstLoop();
|
||||||
|
foreach($__currentLoopData as $item): $loop = $this->incrementLoopIndices(); ?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
<td><?php echo \htmlentities($item['name']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
<td><?php echo \htmlentities($item['company']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/crudexample/show/<?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" class="btn btn-info btn-sm me-2">View</a>
|
||||||
|
<a href="/crudexample/edit/<?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" class="btn btn-warning btn-sm me-2">Edit</a>
|
||||||
|
|
||||||
|
<!-- Delete form -->
|
||||||
|
<form action="/crudexample/delete/<?php echo \htmlentities($item['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" method="POST" style="display:inline;">
|
||||||
|
<input type="hidden" name="_method" value="POST">
|
||||||
|
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Crud Example Show'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="text-info">Blade - Crud Example Show</h1>
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<td><?php echo \htmlentities($crudexample['id']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<td><?php echo \htmlentities($crudexample['name']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Company</th>
|
||||||
|
<td><?php echo \htmlentities($crudexample['company']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Address</th>
|
||||||
|
<td><?php echo \htmlentities($crudexample['address']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Phone</th>
|
||||||
|
<td><?php echo \htmlentities($crudexample['phone']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Email</th>
|
||||||
|
<td><?php echo \htmlentities($crudexample['email']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Notes</th>
|
||||||
|
<td><?php echo \htmlentities($crudexample['notes']??'', ENT_QUOTES, 'UTF-8', false); ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a href="/crudexample/edit/<?php echo \htmlentities($crudexample['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" class="btn btn-warning me-2">Edit</a>
|
||||||
|
|
||||||
|
<!-- Delete form -->
|
||||||
|
<form action="/crudexample/delete/<?php echo \htmlentities($crudexample['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" method="POST" style="display:inline;">
|
||||||
|
<input type="hidden" name="_method" value="POST">
|
||||||
|
<button type="submit" class="btn btn-danger me-2" onclick="return confirm('Are you sure?')">Delete</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<a href="/crudexample" class="btn btn-secondary">Back to List</a>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'About'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">About Us</h1>
|
||||||
|
<p class="lead">Welcome to SysMVC - PHP Framework!</p>
|
||||||
|
<p>SysMVC is a PHP framework developed to simplify the creation of robust and scalable web applications. We use the best development practices and modern tools to provide an efficient and enjoyable development experience.</p>
|
||||||
|
<p>Our mission is to help developers build high-quality web applications quickly and effectively. We offer a solid and flexible framework, allowing you to focus on what really matters: creating amazing features for your users.</p>
|
||||||
|
<p>If you have any questions or need support, feel free to contact us. We are here to help!</p>
|
||||||
|
<p><strong>Marco Costa</strong></p>
|
||||||
|
<p>Developer and Creator of SysMVC</p>
|
||||||
|
<p>Official website: <a href="https://sysmvc.syspanel.com.br">sysmvc.syspanel.com.br</a><p>
|
||||||
|
<p>Contact email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a><p>
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git" target="_blak">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'App Development with SysMVC'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">App Development with SysMVC</h1>
|
||||||
|
<p class="lead">How to use SysMVC as a base for application development.</p>
|
||||||
|
|
||||||
|
<p>SysMVC is a flexible and powerful framework, perfect for serving as the foundation for developing modern web applications.</p>
|
||||||
|
|
||||||
|
<h2>Modular Structure</h2>
|
||||||
|
<p>SysMVC allows you to create independent modules, making it easier to organize your code and maintain the project.</p>
|
||||||
|
|
||||||
|
<h2>Simple Routing</h2>
|
||||||
|
<p>With SysMVC's router, you can define your routes in a simple and intuitive way:</p>
|
||||||
|
<pre><code>
|
||||||
|
Router::get('/home', 'HomeController@index');
|
||||||
|
Router::post('/client', 'ClientController@store');
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2>Template Rendering</h2>
|
||||||
|
<p>Use BladeOne to efficiently and neatly render your templates:</p>
|
||||||
|
<pre><code>
|
||||||
|
echo $blade->run("home.index", ["clients" => $clients]);
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>With these tools, SysMVC provides a solid foundation for developing robust and scalable web applications.</p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Console CLI'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container">
|
||||||
|
<h2>Console CLI</h2>
|
||||||
|
<p>The SysMVC CLI console, based on Symfony Console, allows you to efficiently manage your project using command-line commands.</p>
|
||||||
|
|
||||||
|
<h3>Useful Commands</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>php bin/console generate:app-key</strong> - Generates a new application key.</li>
|
||||||
|
<li><strong>php bin/console app:say-hello</strong> - Hello.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Extending with More Commands</h3>
|
||||||
|
<p>The Symfony Console allows you to create and extend custom commands. Here is an example of how to create a custom command:</p>
|
||||||
|
<pre>
|
||||||
|
<code>
|
||||||
|
// src/Command/SayHelloCommand.php
|
||||||
|
namespace App\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
|
class SayHelloCommand extends Command
|
||||||
|
{
|
||||||
|
protected static $defaultName = 'app:say-hello';
|
||||||
|
|
||||||
|
protected function configure()
|
||||||
|
{
|
||||||
|
$this
|
||||||
|
->setDescription('Says hello.')
|
||||||
|
->setHelp('This command allows you to say hello...');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
$output->writeln('Hello from SysMVC!');
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>To register the command, add it to the service in the <code>config/services.yaml</code> file:</p>
|
||||||
|
<pre>
|
||||||
|
<code>
|
||||||
|
# config/services.yaml
|
||||||
|
services:
|
||||||
|
App\Command\SayHelloCommand:
|
||||||
|
tags: ['console.command']
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Now you can execute the custom command:</p>
|
||||||
|
<pre>
|
||||||
|
<code>
|
||||||
|
$ php bin/console app:say-hello
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>For more information about available commands and how to create custom commands, check the <a href="https://symfony.com/doc/current/console.html" target="_blank">Symfony Console documentation</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Database Usage'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">Database Usage</h1>
|
||||||
|
<p class="lead">CRUD Example with SysMVC.</p>
|
||||||
|
|
||||||
|
<p>SysMVC makes it easy to interact with databases through the use of Eloquent ORM. You can easily create, read, update, and delete records in the database using intuitive methods.</p>
|
||||||
|
|
||||||
|
<h2>CRUD Example</h2>
|
||||||
|
<p>Below is a basic example of CRUD operations:</p>
|
||||||
|
|
||||||
|
<h3>Creating a Record</h3>
|
||||||
|
<pre><code>
|
||||||
|
$client = new Client();
|
||||||
|
$client->name = 'Client Name';
|
||||||
|
$client->email = 'email@example.com';
|
||||||
|
$client->save();
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3>Reading Records</h3>
|
||||||
|
<pre><code>
|
||||||
|
$clients = Client::all();
|
||||||
|
foreach ($clients as $client) {
|
||||||
|
echo $client->name;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3>Updating a Record</h3>
|
||||||
|
<pre><code>
|
||||||
|
$client = Client::find(1);
|
||||||
|
$client->name = 'New Name';
|
||||||
|
$client->save();
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3>Deleting a Record</h3>
|
||||||
|
<pre><code>
|
||||||
|
$client = Client::find(1);
|
||||||
|
$client->delete();
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>With these examples, you can see how easy it is to work with databases using SysMVC.</p>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Dependency Injection with PHP-DI'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">Dependency Injection with PHP-DI</h1>
|
||||||
|
<p class="lead">How to use PHP-DI in SysMVC.</p>
|
||||||
|
|
||||||
|
<p>SysMVC uses the PHP-DI library to manage dependency injection. This allows you to write more modular and testable code.</p>
|
||||||
|
|
||||||
|
<h2>Basic Configuration</h2>
|
||||||
|
<p>To configure PHP-DI, you can create a <code>di-config.php</code> file with the definitions of your dependencies:</p>
|
||||||
|
<pre><code><?php echo \htmlentities(' use DI\ContainerBuilder;
|
||||||
|
|
||||||
|
return function (ContainerBuilder $containerBuilder) {
|
||||||
|
$containerBuilder->addDefinitions([
|
||||||
|
// Define your dependencies here
|
||||||
|
ClientRepository::class => \DI\create(MySqlClientRepository::class),
|
||||||
|
]);
|
||||||
|
};'??'', ENT_QUOTES, 'UTF-8', false); ?></code></pre>
|
||||||
|
|
||||||
|
<h2>Usage</h2>
|
||||||
|
<p>To use dependency injection in your classes, simply pass the dependencies through the constructor:</p>
|
||||||
|
<pre><code><?php echo \htmlentities(' class ClientService {
|
||||||
|
private $clientRepository;
|
||||||
|
|
||||||
|
public function __construct(ClientRepository $clientRepository) {
|
||||||
|
$this->clientRepository = $clientRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getClients() {
|
||||||
|
return $this->clientRepository->findAll();
|
||||||
|
}
|
||||||
|
}'??'', ENT_QUOTES, 'UTF-8', false); ?></code></pre>
|
||||||
|
|
||||||
|
<p>With dependency injection, you can easily swap implementations and keep your code decoupled and more testable.</p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Learn More About SysMVC'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
|
||||||
|
<!-- Free Image -->
|
||||||
|
<img src="https://images.pexels.com/photos/3184424/pexels-photo-3184424.jpeg" class="img-fluid mb-4" alt="SysMVC">
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<h1 class="display-8 text-primary">SysMVC - PHP Framework</h1>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<p class="lead">Welcome to SysMVC - PHP Framework!</p>
|
||||||
|
<p>SysMVC is a PHP framework developed to facilitate the creation of robust and scalable web applications. We use best development practices and modern tools to provide an efficient and pleasant development experience.</p>
|
||||||
|
<p>Our mission is to help developers build high-quality web applications quickly and efficiently. We offer a solid and flexible framework, allowing you to focus on what really matters: creating amazing features for your users.</p>
|
||||||
|
<p>SysMVC has a fast learning curve, it's lightweight, fast, modern, straightforward, secure, and ideal for developing websites and apps both locally and in the cloud. It is also licensed under the MIT License, which is highly permissive for developers.</p>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Main Features</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Advanced routing system for easy navigation</li>
|
||||||
|
<li>Support for Blade templates for efficient rendering</li>
|
||||||
|
<li>Integration with Monolog for a robust logging system</li>
|
||||||
|
<li>Modular and easy-to-maintain structure</li>
|
||||||
|
<li>ORM database support for simplified interaction with the database</li>
|
||||||
|
<li>Enhanced security with protection against CSRF, XSS, and more</li>
|
||||||
|
<li>Dependency injection</li>
|
||||||
|
<li>Environment variable loading</li>
|
||||||
|
<li>Handling of HTTP requests and responses</li>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<h2 class="mt-4">MIT License</h2>
|
||||||
|
<p>SysMVC is licensed under the MIT License, which allows wide freedom of use and distribution. Here is the full text of the license:</p>
|
||||||
|
<br>
|
||||||
|
<pre class="bg-light p-3">
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Marco Costa
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+156
@@ -0,0 +1,156 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Project Information'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">SysMVC - PHP Framework</h1>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git" target="_blank">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p class="lead">Project Information</p>
|
||||||
|
<p><strong>SysMVC</strong> is a system developed by <strong>Marco Costa</strong> (<a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a>), with source code licensed under the <strong>MIT License</strong>.</p>
|
||||||
|
<p>This software is offered for free and can be used, modified, and distributed under the terms of the MIT License.</p>
|
||||||
|
<p>Project website: <a href="https://sysmvc.syspanel.com.br">https://sysmvc.syspanel.com.br</a></p>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2 class="mt-4">🚀 Installation Tutorial</h2>
|
||||||
|
|
||||||
|
<h3>✅ Prerequisites</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>PHP 8.1</strong> or higher</li>
|
||||||
|
<li><strong>Composer</strong> (dependency manager for PHP)</li>
|
||||||
|
<li><strong>Web Server</strong> (Apache or Nginx)</li>
|
||||||
|
<li><strong>MySQL</strong> or other compatible database</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>🔧 Step-by-Step</h3>
|
||||||
|
|
||||||
|
<h4>1️⃣ Unzip the File</h4>
|
||||||
|
<p>Download and unzip the SysMVC file to your local environment:</p>
|
||||||
|
<pre><code>unzip sysmvc.zip -d sysmvc
|
||||||
|
cd sysmvc
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>2️⃣ Install the Dependencies</h4>
|
||||||
|
<p>Use Composer to install the project dependencies:</p>
|
||||||
|
<pre><code>composer install
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>3️⃣ Configure the Environment</h4>
|
||||||
|
<p>Copy the <code>.env.example</code> file to <code>.env</code> and configure your environment variables:</p>
|
||||||
|
<pre><code>cp .env.example .env
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Open the <code>.env</code> file and edit the following lines with your information:</p>
|
||||||
|
<pre><code>DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=your_database
|
||||||
|
DB_USERNAME=your_username
|
||||||
|
DB_PASSWORD=your_password
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>4️⃣ Set Permissions</h4>
|
||||||
|
<p>Change the permissions of the storage and cache directories to ensure the web server can write to them:</p>
|
||||||
|
<pre><code>chmod -R 775 storage
|
||||||
|
chmod -R 775 bootstrap/cache
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>5️⃣ Generate the Application Key</h4>
|
||||||
|
<pre><code>php bin/console generate:app-key
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>6️⃣ Run the Migrations</h4>
|
||||||
|
<p>Run the migrations to create the tables in the database:</p>
|
||||||
|
<pre><code>php bin/console migrate:crudexample
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>7️⃣ Configure the Web Server</h4>
|
||||||
|
|
||||||
|
<h5>📌 Apache</h5>
|
||||||
|
<p>Add the following configuration to your Apache configuration file:</p>
|
||||||
|
<pre><code><VirtualHost *:80>
|
||||||
|
ServerName sysmvc.local
|
||||||
|
DocumentRoot /path/to/sysmvc/public
|
||||||
|
|
||||||
|
<Directory /path/to/sysmvc/public>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h5>📌 Nginx</h5>
|
||||||
|
<p>Add the following configuration to your Nginx configuration file:</p>
|
||||||
|
<pre><code>server {
|
||||||
|
listen 80;
|
||||||
|
server_name sysmvc.local;
|
||||||
|
root /path/to/sysmvc/public;
|
||||||
|
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include snippets/fastcgi-php.conf;
|
||||||
|
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2 class="mt-4">📦 Dependencies Used</h2>
|
||||||
|
<p>The project uses the following third-party packages, each with its respective license:</p>
|
||||||
|
|
||||||
|
<h3>✅ Packages with MIT License</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>Illuminate Database</strong> → <a href="https://github.com/illuminate/database" target="_blank">illuminate/database</a></li>
|
||||||
|
<li><strong>Monolog</strong> → <a href="https://github.com/Seldaek/monolog" target="_blank">monolog/monolog</a></li>
|
||||||
|
<li><strong>BladeOne</strong> → <a href="https://github.com/EFTEC/BladeOne" target="_blank">eftec/bladeone</a></li>
|
||||||
|
<li><strong>Twig</strong> → <a href="https://github.com/twigphp/Twig" target="_blank">twig/twig</a></li>
|
||||||
|
<li><strong>Symfony Console</strong> → <a href="https://github.com/symfony/console" target="_blank">symfony/console</a></li>
|
||||||
|
<li><strong>Phinx</strong> → <a href="https://github.com/cakephp/phinx" target="_blank">robmorgan/phinx</a></li>
|
||||||
|
<li><strong>Defuse Encryption</strong> → <a href="https://github.com/defuse/php-encryption" target="_blank">defuse/php-encryption</a></li>
|
||||||
|
<li><strong>Random Compatibility</strong> → <a href="https://github.com/paragonie/random_compat" target="_blank">paragonie/random_compat</a></li>
|
||||||
|
<li><strong>Rakit Validation</strong> → <a href="https://github.com/rakit/validation" target="_blank">rakit/validation</a></li>
|
||||||
|
<li><strong>Carbon</strong> → <a href="https://github.com/briannesbitt/Carbon" target="_blank">nesbot/carbon</a></li>
|
||||||
|
<li><strong>Flysystem</strong> → <a href="https://github.com/thephpleague/flysystem" target="_blank">league/flysystem</a></li>
|
||||||
|
<li><strong>Intervention Image</strong> → <a href="https://github.com/Intervention/image" target="_blank">intervention/image</a></li>
|
||||||
|
<li><strong>Symfony Cache</strong> → <a href="https://github.com/symfony/cache" target="_blank">symfony/cache</a></li>
|
||||||
|
<li><strong>Predis Redis Client</strong> → <a href="https://github.com/predis/predis" target="_blank">predis/predis</a></li>
|
||||||
|
<li><strong>PHP Dependency Injection</strong> → <a href="https://github.com/PHP-DI/PHP-DI" target="_blank">php-di/php-di</a></li>
|
||||||
|
<li><strong>Symfony Dotenv</strong> → <a href="https://github.com/symfony/dotenv" target="_blank">symfony/dotenv</a></li>
|
||||||
|
<li><strong>Pecee SimpleRouter</strong> → <a href="https://github.com/pecee/pecee-simple-router" target="_blank">pecee/simple-router</a></li>
|
||||||
|
<li><strong>Nyholm PSR7</strong> → <a href="https://github.com/Nyholm/psr7" target="_blank">nyholm/psr7</a></li>
|
||||||
|
<li><strong>FakerPHP Faker</strong> → <a href="https://github.com/FakerPHP/Faker" target="_blank">fakerphp/faker</a></li>
|
||||||
|
<li><strong>Symfony Mailer</strong> → <a href="https://github.com/symfony/mailer" target="_blank">symfony/mailer</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2 class="mt-4">📜 Terms of Use</h2>
|
||||||
|
<p>This project is licensed under the <strong>MIT License</strong>.</p>
|
||||||
|
<p>You can use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software, provided that the license and copyright notice are included in all copies or substantial portions of the Software.</p>
|
||||||
|
<p>The Software is provided "as is", without any warranty of any kind. For more details, please consult the <a href="https://opensource.org/licenses/MIT" target="_blank">MIT License</a>.</p>
|
||||||
|
<p>For more information, contact: <a href="mailto:sysmvc@syspanel.com.br" target="_blank">sysmvc@syspanel.com.br</a></p>
|
||||||
|
|
||||||
|
<p class="text-center mt-5">© 2025 Marco Costa - All rights reserved under the MIT License.</p>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'Security'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container">
|
||||||
|
<h2>Security</h2>
|
||||||
|
<p>We have implemented several security measures in SysMVC to protect your application against threats. Here are some of the implementations:</p>
|
||||||
|
<h3>CSRF Protection</h3>
|
||||||
|
<p>We use CSRF tokens to protect against Cross-Site Request Forgery attacks.</p>
|
||||||
|
<h3>Data Sanitization</h3>
|
||||||
|
<p>All input and output data are sanitized to prevent code injections and other attacks.</p>
|
||||||
|
<h3>Security Headers</h3>
|
||||||
|
<p>We add HTTP security headers to protect against attacks like clickjacking and MIME-type sniffing.</p>
|
||||||
|
<p>For more information about security, refer to the <a href="https://owasp.org/" target="_blank">OWASP documentation</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, feel free to contact us:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'SysMVC Advantages - Blade, Twig, and Pure PHP'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="container">
|
||||||
|
<h2>SysMVC: Support for Blade, Twig, and Pure PHP</h2>
|
||||||
|
<p>SysMVC is a versatile PHP framework that supports three template rendering methods: <strong>Blade</strong>, <strong>Twig</strong>, and <strong>Pure PHP</strong>. This flexibility allows developers to choose the tool that best suits their needs, providing several advantages.</p>
|
||||||
|
|
||||||
|
<h3>Blade Advantages</h3>
|
||||||
|
<p>Blade is a simple yet powerful template engine developed for the Laravel framework. With Blade, developers can easily create reusable layouts and dynamic components. It is known for its clean and clear syntax, making template development fast and intuitive.</p>
|
||||||
|
<p>For more information, refer to the <a href="https://laravel.com/docs/8.x/blade" target="_blank">official Blade documentation</a>.</p>
|
||||||
|
|
||||||
|
<h3>Twig Advantages</h3>
|
||||||
|
<p>Twig is a flexible and robust template engine, widely used in various PHP frameworks. It offers a series of advanced features such as template inheritance, filters, custom extensions, and more. Twig is known for its security and performance, making it a reliable choice for projects of any scale.</p>
|
||||||
|
<p>For more information, refer to the <a href="https://twig.symfony.com/doc/3.x/" target="_blank">official Twig documentation</a>.</p>
|
||||||
|
|
||||||
|
<h3>Pure PHP Advantages</h3>
|
||||||
|
<p>SysMVC also supports template rendering using pure PHP. This means you can directly include PHP files and render content dynamically. If you prefer not to use a template engine, you can simply use the <code>include</code> command to include template files and generate the desired content. This can be a simpler and more straightforward choice for smaller projects or developers more familiar with PHP.</p>
|
||||||
|
<p>Example of using pure PHP in SysMVC:</p>
|
||||||
|
<pre><code>include('page.php');</code></pre>
|
||||||
|
|
||||||
|
<h3>Why Choose SysMVC?</h3>
|
||||||
|
<p>With SysMVC, you don't have to worry about choosing between Blade, Twig, or Pure PHP. You can use any of these options, or even combine different approaches within the same project, depending on the context. This flexibility is a significant advantage, as it allows developers to take the best of each tool, adapting to their preferences and specific requirements.</p>
|
||||||
|
|
||||||
|
<h3>Conclusion</h3>
|
||||||
|
<p>Whether you're a Blade enthusiast, a Twig fan, or someone who prefers pure PHP, SysMVC is ready to meet your needs. The ability to switch between these options makes SysMVC an excellent choice for developers seeking efficiency, flexibility, and ease of use in their PHP projects.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, feel free to contact us:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'SysMVC - PHP Framework'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="jumbotron text-center">
|
||||||
|
<h2>Welcome to SysMVC</h2>
|
||||||
|
<p>PHP framework for website and app development.</p>
|
||||||
|
<a href="/home/details" class="btn btn-primary">Learn More Details</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/1.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Database Usage</h5>
|
||||||
|
<p class="card-text">Learn how to use the database in SysMVC with CRUD examples.</p>
|
||||||
|
<a href="/home/database" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/2.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Dependency Injection</h5>
|
||||||
|
<p class="card-text">Learn how to use dependency injection with PHP-DI in SysMVC.</p>
|
||||||
|
<a href="/home/dependency-injection" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/3.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">App Projects</h5>
|
||||||
|
<p class="card-text">See how to use SysMVC as a base for application development.</p>
|
||||||
|
<a href="/home/app-development" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<!-- New Card: Blade Templates -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/4.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Blade & Twig Templates Engine</h5>
|
||||||
|
<p class="card-text">Learn more about using Blade and/or Twig templates with SysMVC.</p>
|
||||||
|
<a href="/home/templates-blade" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- New Card: Security -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/5.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Security</h5>
|
||||||
|
<p class="card-text">Security implementations in SysMVC.</p>
|
||||||
|
<a href="/home/security" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- New Card: Console CLI -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/6.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Console CLI</h5>
|
||||||
|
<p class="card-text">Use the CLI console to manage your SysMVC project.</p>
|
||||||
|
<a href="/home/console-cli" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'SysMVC - PHP Framework'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="jumbotron text-center">
|
||||||
|
<h2>Welcome to SysMVC</h2>
|
||||||
|
<p>PHP framework for website and app development.</p>
|
||||||
|
<a href="/home/details" class="btn btn-primary">Learn More Details</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/1.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Database Usage</h5>
|
||||||
|
<p class="card-text">Learn how to use the database in SysMVC with CRUD examples.</p>
|
||||||
|
<a href="/home/database" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/2.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Dependency Injection</h5>
|
||||||
|
<p class="card-text">Learn how to use dependency injection with PHP-DI in SysMVC.</p>
|
||||||
|
<a href="/home/dependency-injection" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/3.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">App Projects</h5>
|
||||||
|
<p class="card-text">See how to use SysMVC as a base for application development.</p>
|
||||||
|
<a href="/home/app-development" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<!-- New Card: Blade Templates -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/4.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Blade & Twig Templates Engine</h5>
|
||||||
|
<p class="card-text">Learn more about using Blade and/or Twig templates with SysMVC.</p>
|
||||||
|
<a href="/home/templates-blade" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- New Card: Security -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/5.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Security</h5>
|
||||||
|
<p class="card-text">Security implementations in SysMVC.</p>
|
||||||
|
<a href="/home/security" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- New Card: Console CLI -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/6.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Console CLI</h5>
|
||||||
|
<p class="card-text">Use the CLI console to manage your SysMVC project.</p>
|
||||||
|
<a href="/home/console-cli" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
<?php $_shouldextend[1]=1; ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('title', 'SysMVC - PHP Framework'); ?>
|
||||||
|
|
||||||
|
<?php $this->startSection('content'); ?>
|
||||||
|
<div class="jumbotron text-center">
|
||||||
|
<h2>Welcome to SysMVC</h2>
|
||||||
|
<p>PHP framework for website and app development.</p>
|
||||||
|
<a href="/home/details" class="btn btn-primary">Learn More Details</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/1.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Database Usage</h5>
|
||||||
|
<p class="card-text">Learn how to use the database in SysMVC with CRUD examples.</p>
|
||||||
|
<a href="/home/database" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/2.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Dependency Injection</h5>
|
||||||
|
<p class="card-text">Learn how to use dependency injection with PHP-DI in SysMVC.</p>
|
||||||
|
<a href="/home/dependency-injection" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/3.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">App Projects</h5>
|
||||||
|
<p class="card-text">See how to use SysMVC as a base for application development.</p>
|
||||||
|
<a href="/home/app-development" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<!-- New Card: Blade Templates -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/4.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Blade & Twig Templates Engine</h5>
|
||||||
|
<p class="card-text">Learn more about using Blade and/or Twig templates with SysMVC.</p>
|
||||||
|
<a href="/home/templates-blade" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- New Card: Security -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/5.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Security</h5>
|
||||||
|
<p class="card-text">Security implementations in SysMVC.</p>
|
||||||
|
<a href="/home/security" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- New Card: Console CLI -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/6.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Console CLI</h5>
|
||||||
|
<p class="card-text">Use the CLI console to manage your SysMVC project.</p>
|
||||||
|
<a href="/home/console-cli" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php $this->stopSection(); ?>
|
||||||
|
|
||||||
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?>
|
||||||
+97
@@ -0,0 +1,97 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title><?php echo $this->yieldContent('title', 'Default Title'); ?></title>
|
||||||
|
|
||||||
|
<meta name="author" content="Marco Costa">
|
||||||
|
<meta name="description" content="SysMVC - PHP framework for website and app development.">
|
||||||
|
<meta name="copyright" content="© 2025 Marco Costa" />
|
||||||
|
<meta name="keywords" content="sites, web, development, framework, php, mit">
|
||||||
|
<meta name="robots" content="index,nofollow">
|
||||||
|
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link href="DataTables/datatables.min.css" rel="stylesheet">
|
||||||
|
<script src="DataTables/datatables.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Link to your custom CSS -->
|
||||||
|
<link href="/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="/css/jumbotron.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<a class="navbar-brand" href="/">SysMVC</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/crudexample">Blade - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/twigexample">Twig - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/readme">Readme</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/about">About</a>
|
||||||
|
</li>
|
||||||
|
<!-- Add more links as needed -->
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container my-4">
|
||||||
|
<?php echo $this->yieldContent('content'); ?> <!-- The page content will be inserted here -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="bg-dark text-white text-center p-3">
|
||||||
|
<p>© 2025 SysMVC 1.0 PHP Framework | <a href="https://opensource.org/licenses/MIT" class="text-white" target="_blank">License: MIT</a></p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Bootstrap Scripts -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="/js/jquery.slim.min.js"><\/script>')</script><script src="../js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
console.log('jQuery is working');
|
||||||
|
console.log('Bootstrap is working');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Cookie Consent Scripts -->
|
||||||
|
<link href="consent/cookieconsent.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="consent/cookieconsent.min.js"></script>
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", function(){
|
||||||
|
window.cookieconsent.initialise({
|
||||||
|
"palette": {
|
||||||
|
"popup": {
|
||||||
|
"background": "#216942",
|
||||||
|
"text": "#b2d192"
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"background": "#afed71"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"message": "We use essential cookies and similar technologies in accordance with our Terms of Use. By continuing to browse, you agree to these terms.",
|
||||||
|
"dismiss": "Accept",
|
||||||
|
"href": "consent/terms.html"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title><?php echo $this->yieldContent('title', 'Default Title'); ?></title>
|
||||||
|
|
||||||
|
<meta name="author" content="Marco Costa">
|
||||||
|
<meta name="description" content="SysMVC - PHP framework for website and app development.">
|
||||||
|
<meta name="copyright" content="© 2025 Marco Costa" />
|
||||||
|
<meta name="keywords" content="sites, web, development, framework, php, mit">
|
||||||
|
<meta name="robots" content="index,nofollow">
|
||||||
|
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link href="DataTables/datatables.min.css" rel="stylesheet">
|
||||||
|
<script src="DataTables/datatables.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Link to your custom CSS -->
|
||||||
|
<link href="/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="/css/jumbotron.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<a class="navbar-brand" href="/">SysMVC</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/crudexample">Blade - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/twigexample">Twig - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/readme">Readme</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/about">About</a>
|
||||||
|
</li>
|
||||||
|
<!-- Add more links as needed -->
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container my-4">
|
||||||
|
<?php echo $this->yieldContent('content'); ?> <!-- The page content will be inserted here -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="bg-dark text-white text-center p-3">
|
||||||
|
<p>© 2025 SysMVC 1.0 PHP Framework | <a href="https://opensource.org/licenses/MIT" class="text-white" target="_blank">License: MIT</a></p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Bootstrap Scripts -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="/js/jquery.slim.min.js"><\/script>')</script><script src="../js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
console.log('jQuery is working');
|
||||||
|
console.log('Bootstrap is working');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Cookie Consent Scripts -->
|
||||||
|
<link href="consent/cookieconsent.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="consent/cookieconsent.min.js"></script>
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", function(){
|
||||||
|
window.cookieconsent.initialise({
|
||||||
|
"palette": {
|
||||||
|
"popup": {
|
||||||
|
"background": "#216942",
|
||||||
|
"text": "#b2d192"
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"background": "#afed71"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"message": "We use essential cookies and similar technologies in accordance with our Terms of Use. By continuing to browse, you agree to these terms.",
|
||||||
|
"dismiss": "Accept",
|
||||||
|
"href": "consent/terms.html"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title><?php echo $this->yieldContent('title', 'Default Title'); ?></title>
|
||||||
|
|
||||||
|
<meta name="author" content="Marco Costa">
|
||||||
|
<meta name="description" content="SysMVC - PHP framework for website and app development.">
|
||||||
|
<meta name="copyright" content="© 2025 Marco Costa" />
|
||||||
|
<meta name="keywords" content="sites, web, development, framework, php, mit">
|
||||||
|
<meta name="robots" content="index,nofollow">
|
||||||
|
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link href="DataTables/datatables.min.css" rel="stylesheet">
|
||||||
|
<script src="DataTables/datatables.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Link to your custom CSS -->
|
||||||
|
<link href="/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="/css/jumbotron.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<a class="navbar-brand" href="/">SysMVC</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/crudexample">Blade - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/twigexample">Twig - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/readme">Readme</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/about">About</a>
|
||||||
|
</li>
|
||||||
|
<!-- Add more links as needed -->
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container my-4">
|
||||||
|
<?php echo $this->yieldContent('content'); ?> <!-- The page content will be inserted here -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="bg-dark text-white text-center p-3">
|
||||||
|
<p>© 2025 SysMVC 1.0 PHP Framework | <a href="https://opensource.org/licenses/MIT" class="text-white" target="_blank">License: MIT</a></p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Bootstrap Scripts -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="/js/jquery.slim.min.js"><\/script>')</script><script src="../js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
console.log('jQuery is working');
|
||||||
|
console.log('Bootstrap is working');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Cookie Consent Scripts -->
|
||||||
|
<link href="consent/cookieconsent.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="consent/cookieconsent.min.js"></script>
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", function(){
|
||||||
|
window.cookieconsent.initialise({
|
||||||
|
"palette": {
|
||||||
|
"popup": {
|
||||||
|
"background": "#216942",
|
||||||
|
"text": "#b2d192"
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"background": "#afed71"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"message": "We use essential cookies and similar technologies in accordance with our Terms of Use. By continuing to browse, you agree to these terms.",
|
||||||
|
"dismiss": "Accept",
|
||||||
|
"href": "consent/terms.html"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"name": "sysmvc/sysmvc",
|
||||||
|
"description": "PHP Framework",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"date": "2025-03-08",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Marco Costa",
|
||||||
|
"email": "syspanel@gmx.com",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://sysmvc.duckdns.org",
|
||||||
|
"require": {
|
||||||
|
"illuminate/database": "^8.0",
|
||||||
|
"phpauth/phpauth": "^1.0",
|
||||||
|
"monolog/monolog": "^2.0",
|
||||||
|
"eftec/bladeone": "^4.0",
|
||||||
|
"symfony/console": "^5.0",
|
||||||
|
"robmorgan/phinx": "^0.12.0",
|
||||||
|
"defuse/php-encryption": "^2.2",
|
||||||
|
"paragonie/random_compat": "^9.99",
|
||||||
|
"rakit/validation": "^1.4",
|
||||||
|
"nesbot/carbon": "^2.0",
|
||||||
|
"league/flysystem": "^1.1",
|
||||||
|
"intervention/image": "^2.5",
|
||||||
|
"symfony/cache": "^5.0",
|
||||||
|
"predis/predis": "^1.1",
|
||||||
|
"php-di/php-di": "^7.0",
|
||||||
|
"symfony/dotenv": "^6.4",
|
||||||
|
"eftec/bladeonehtml": "^2.5",
|
||||||
|
"pecee/simple-router": "^5.4",
|
||||||
|
"nyholm/psr7": "^1.8",
|
||||||
|
"fakerphp/faker": "^1.24",
|
||||||
|
"symfony/mailer": "^7.2",
|
||||||
|
"delight-im/auth": "^8.3",
|
||||||
|
"twig/twig": "^3.20"
|
||||||
|
},
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/",
|
||||||
|
"Symfony\\Component\\Dotenv\\": "vendor/symfony/dotenv/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+5179
File diff suppressed because it is too large
Load Diff
Executable
+47
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use DI\ContainerBuilder;
|
||||||
|
use eftec\bladeone\BladeOne;
|
||||||
|
use Monolog\Logger;
|
||||||
|
use Monolog\Handler\StreamHandler;
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Loader\FilesystemLoader;
|
||||||
|
use Twig\TwigFunction;
|
||||||
|
|
||||||
|
$containerBuilder = new ContainerBuilder();
|
||||||
|
$containerBuilder->useAutowiring(true); // Enable autowiring
|
||||||
|
|
||||||
|
$containerBuilder->addDefinitions([
|
||||||
|
BladeOne::class => function () {
|
||||||
|
return new BladeOne(VIEWS_PATH, CACHE_PATH, BladeOne::MODE_AUTO);
|
||||||
|
},
|
||||||
|
Logger::class => function () {
|
||||||
|
$logger = new Logger('app');
|
||||||
|
$logger->pushHandler(new StreamHandler(__DIR__ . '/../logs/app.log', Logger::DEBUG));
|
||||||
|
return $logger;
|
||||||
|
},
|
||||||
|
Environment::class => function () {
|
||||||
|
$loader = new FilesystemLoader(VIEWS_PATH);
|
||||||
|
$twig = new Environment($loader);
|
||||||
|
|
||||||
|
// Register the PHP function getCsrfToken
|
||||||
|
$csrfFunction = new TwigFunction('csrf', function () {
|
||||||
|
return getCsrfToken();
|
||||||
|
});
|
||||||
|
|
||||||
|
$twig->addFunction($csrfFunction);
|
||||||
|
return $twig;
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
$container = $containerBuilder->build();
|
||||||
|
|
||||||
|
// Make the container globally available
|
||||||
|
$GLOBALS['container'] = $container;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||||
|
|
||||||
|
$capsule = new Capsule;
|
||||||
|
|
||||||
|
$capsule->addConnection([
|
||||||
|
'driver' => $_ENV['DB_CONNECTION'],
|
||||||
|
'host' => $_ENV['DB_HOST'],
|
||||||
|
'database' => $_ENV['DB_DATABASE'],
|
||||||
|
'username' => $_ENV['DB_USERNAME'],
|
||||||
|
'password' => $_ENV['DB_PASSWORD'],
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'collation' => 'utf8_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Set the Capsule as the global manager for Eloquent ORM
|
||||||
|
$capsule->setAsGlobal();
|
||||||
|
|
||||||
|
// Initialize Eloquent ORM
|
||||||
|
$capsule->bootEloquent();
|
||||||
|
|
||||||
|
|
||||||
Executable
+45
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads environment variables from the .env file and defines them as constants.
|
||||||
|
*
|
||||||
|
* @param string $path Path to the .env file
|
||||||
|
*/
|
||||||
|
function loadEnvToConstants($path) {
|
||||||
|
if (!file_exists($path)) {
|
||||||
|
throw new Exception("The .env file was not found at the path: $path");
|
||||||
|
}
|
||||||
|
|
||||||
|
$lines = file($path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
// Ignore comments
|
||||||
|
if (strpos(trim($line), '#') === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Split key and value
|
||||||
|
list($name, $value) = explode('=', $line, 2);
|
||||||
|
|
||||||
|
// Remove whitespace
|
||||||
|
$name = trim($name);
|
||||||
|
$value = trim($value);
|
||||||
|
|
||||||
|
// Check if the value is enclosed in quotes and remove them
|
||||||
|
if (preg_match('/^"(.*)"$/', $value, $matches)) {
|
||||||
|
$value = $matches[1];
|
||||||
|
} elseif (preg_match("/^'(.*)'$/", $value, $matches)) {
|
||||||
|
$value = $matches[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define as constant
|
||||||
|
define($name, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Using the function
|
||||||
|
try {
|
||||||
|
loadEnvToConstants(__DIR__ . '/../.env'); // Adjust the path as necessary
|
||||||
|
# echo "Environment variables successfully loaded as constants!";
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo 'Error: ' . $e->getMessage();
|
||||||
|
}
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
define('VIEWS_PATH', __DIR__ . '/../resources/views');
|
||||||
|
define('CACHE_PATH', __DIR__ . '/../cache');
|
||||||
|
|
||||||
|
?>
|
||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function csrfField() {
|
||||||
|
return '<input type="hidden" name="csrf_token" value="' . getCsrfToken() . '">';
|
||||||
|
}
|
||||||
|
|
||||||
|
function csrf() {
|
||||||
|
echo csrfField();
|
||||||
|
}
|
||||||
|
?>
|
||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
CREATE TABLE `crudexample` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`company` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||||
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
Executable
+2212
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
|||||||
|
RewriteEngine on
|
||||||
|
RewriteCond %{SCRIPT_FILENAME} !-f
|
||||||
|
RewriteCond %{SCRIPT_FILENAME} !-d
|
||||||
|
RewriteCond %{SCRIPT_FILENAME} !-l
|
||||||
|
RewriteRule ^(.*)$ index.php/$1
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
.cc-window{opacity:1;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{transition:transform 1s ease}.cc-animate.cc-revoke.cc-top{transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-bottom,.cc-animate.cc-revoke.cc-active.cc-top,.cc-revoke:hover{transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;transition:max-height 1s}
|
||||||
|
.cc-link,.cc-revoke:hover{text-decoration:underline}.cc-revoke,.cc-window{position:fixed;overflow:hidden;box-sizing:border-box;font-family:Helvetica,Calibri,Arial,sans-serif;font-size:16px;line-height:1.5em;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;-ms-flex-direction:row;flex-direction:row}.cc-revoke{padding:.5em}.cc-header{font-size:18px;font-weight:700}.cc-btn,.cc-close,.cc-link,.cc-revoke{cursor:pointer}.cc-link{opacity:.8;display:inline-block;padding:.2em}.cc-link:hover{opacity:1}.cc-link:active,.cc-link:visited{color:initial}.cc-btn{display:block;padding:.4em .8em;font-size:.9em;font-weight:700;border-width:2px;border-style:solid;text-align:center;white-space:nowrap}.cc-banner .cc-btn:last-child{min-width:140px}.cc-highlight .cc-btn:first-child{background-color:transparent;border-color:transparent}.cc-highlight .cc-btn:first-child:focus,.cc-highlight .cc-btn:first-child:hover{background-color:transparent;text-decoration:underline}.cc-close{display:block;position:absolute;top:.5em;right:.5em;font-size:1.6em;opacity:.9;line-height:.75}.cc-close:focus,.cc-close:hover{opacity:1}
|
||||||
|
.cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:.5em;border-top-right-radius:.5em}.cc-revoke.cc-left{left:3em;right:unset}.cc-revoke.cc-right{right:3em;left:unset}.cc-top{top:1em}.cc-left{left:1em}.cc-right{right:1em}.cc-bottom{bottom:1em}.cc-floating>.cc-link{margin-bottom:1em}.cc-floating .cc-message{display:block;margin-bottom:1em}.cc-window.cc-floating .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-banner{-ms-flex-align:center;align-items:center}.cc-banner.cc-top{left:0;right:0;top:0}.cc-banner.cc-bottom{left:0;right:0;bottom:0}.cc-banner .cc-message{-ms-flex:1;flex:1}.cc-compliance{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:justify;align-content:space-between}.cc-compliance>.cc-btn{-ms-flex:1;flex:1}.cc-btn+.cc-btn{margin-left:.5em}
|
||||||
|
@media print{.cc-revoke,.cc-window{display:none}}@media screen and (max-width:900px){.cc-btn{white-space:normal}}@media screen and (max-width:414px) and (orientation:portrait),screen and (max-width:736px) and (orientation:landscape){.cc-window.cc-top{top:0}.cc-window.cc-bottom{bottom:0}.cc-window.cc-banner,.cc-window.cc-left,.cc-window.cc-right{left:0;right:0}.cc-window.cc-banner{-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-floating{max-width:none}.cc-window .cc-message{margin-bottom:1em}.cc-window.cc-banner{-ms-flex-align:unset;align-items:unset}}
|
||||||
|
.cc-floating.cc-theme-classic{padding:1.2em;border-radius:5px}.cc-floating.cc-type-info.cc-theme-classic .cc-compliance{text-align:center;display:inline;-ms-flex:none;flex:none}.cc-theme-classic .cc-btn{border-radius:5px}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-floating.cc-type-info.cc-theme-classic .cc-btn{display:inline-block}
|
||||||
|
.cc-theme-edgeless.cc-window{padding:0}.cc-floating.cc-theme-edgeless .cc-message{margin:2em 2em 1.5em}.cc-banner.cc-theme-edgeless .cc-btn{margin:0;padding:.8em 1.8em;height:100%}.cc-banner.cc-theme-edgeless .cc-message{margin-left:1em}.cc-floating.cc-theme-edgeless .cc-btn+.cc-btn{margin-left:0}
|
||||||
+1
File diff suppressed because one or more lines are too long
Executable
+60
@@ -0,0 +1,60 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||||
|
<title></title>
|
||||||
|
<meta name="generator" content="LibreOffice 7.0.4.2 (Linux)"/>
|
||||||
|
<meta name="created" content="2023-06-04T14:53:37.791263856"/>
|
||||||
|
<meta name="changed" content="2023-06-04T15:38:53.430400148"/>
|
||||||
|
<style type="text/css">
|
||||||
|
@page { size: 21cm 29.7cm; margin: 2cm }
|
||||||
|
p { margin-bottom: 0.25cm; background: transparent; line-height: 115%; background: transparent }
|
||||||
|
h1 { margin-bottom: 0.21cm; background: transparent; background: transparent; page-break-after: avoid }
|
||||||
|
h1.western { font-family: "Liberation Serif", serif; font-size: 24pt; font-weight: bold }
|
||||||
|
h1.cjk { font-family: "WenQuanYi Micro Hei"; font-size: 24pt; font-weight: bold }
|
||||||
|
h1.ctl { font-family: "FreeSans"; font-size: 24pt; font-weight: bold }
|
||||||
|
td p { background: transparent; orphans: 0; widows: 0; background: transparent }
|
||||||
|
th p { background: transparent; font-weight: bold; text-align: center; orphans: 0; widows: 0; background: transparent }
|
||||||
|
strong { font-weight: bold }
|
||||||
|
em { font-style: italic }
|
||||||
|
a:link { color: #000080; so-language: zxx; text-decoration: underline }
|
||||||
|
a:visited { color: #800000; so-language: zxx; text-decoration: underline }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body lang="en" link="#000080" vlink="#800000" dir="ltr"><h1 class="western">
|
||||||
|
</p>
|
||||||
|
<h1 class="western"><u>TERMS OF USE</u></h1>
|
||||||
|
<p>Welcome,</p>
|
||||||
|
<p>This project is maintained by Marco Costa, Email: syspanel@gmx.com - MG - Brazil,
|
||||||
|
hereafter referred to simply as “<b>SysMVC</b>”.
|
||||||
|
</p>
|
||||||
|
<p>Using our website implies your agreement with our Terms of Use. If you disagree with these Terms, please do not navigate through our website.</p>
|
||||||
|
<p>If you are a minor, you should only access our website after your parents (or legal guardian) have read and agreed to our Terms of Use.</p>
|
||||||
|
<p>To contact us regarding our Terms of Use or for any other reason, please reach out to our team using the form available on the page, or via email at: contato@hardmodinfo.com</p>
|
||||||
|
<p><strong>1. OBJECTIVE AND OPERATION OF THE WEBSITE</strong></p>
|
||||||
|
<p>1.1. <b>SysMVC</b> makes available digital content on its website related to services concerning brands and others.</p>
|
||||||
|
<p>1.2. Any digital content on the site may be changed, removed, moved, reorganized, re-recorded, re-edited, and merged with others by <strong><b>SysMVC</b></strong> or specifically by any third party it authorizes to do so.</p>
|
||||||
|
<p>1.3. Under no circumstances should the content available on the site be understood as individual advice, and it does not substitute consultation with a qualified professional.</p>
|
||||||
|
<p>1.4. By accepting these Terms of Use, you explicitly agree with the Privacy Policy of <strong><b>SysMVC</b></strong>.</p>
|
||||||
|
<p><strong>2. INTELLECTUAL PROPERTY RIGHTS</strong></p>
|
||||||
|
<p>2.1. All content provided by <b>SysMVC</b> is protected by applicable copyright and industrial property laws and treaties, and no user is allowed to dispose of, modify, or commercialize the content of <strong><b>SysMVC</b></strong>'s website.</p>
|
||||||
|
<p><strong>3. LIMITATION OF LIABILITY</strong></p>
|
||||||
|
<p>3.1. In some areas of our website, areas may be available for comments, which may contain opinions from other users. These cannot be attributed to <strong><b>SysMVC</b></strong>, and it is not responsible for any damages that may be caused to third parties.</p>
|
||||||
|
<p><strong>4. POLICIES AND RULES</strong></p>
|
||||||
|
<p>4.1. You agree not to use this website to disclose, make accessible, or send any content or materials:</p>
|
||||||
|
<p>a) Illegal, defamatory, obscene, or with advertising purposes;</p>
|
||||||
|
<p>b) Violating any intellectual or industrial property rights, such as trademarks, patents, industrial secrets, copyrights, <em>trade dress</em>, among others;</p>
|
||||||
|
<p>c) Software viruses or other programming codes designed to interfere with the functionality of any computer systems or internet networks, email, etc.</p>
|
||||||
|
<p>4.2. You agree that your anonymity is prohibited within the <strong><b>SysMVC</b></strong> site.</p>
|
||||||
|
<p>4.3. You agree that you cannot impersonate others, nor can you, under any circumstances, provide information that could lead <strong><b>SysMVC</b></strong> or third parties to error regarding your identity, such as a fake email address.</p>
|
||||||
|
<p>4.4. Except in cases where written authorization is granted, you may not use the trademark or other intellectual and industrial property rights of <strong><b>SysMVC</b></strong>.</p>
|
||||||
|
<p>4.5. No part or content of <strong><b>SysMVC</b></strong>'s website may be reproduced and/or stored on any other website or included in any other public or private electronic system or service without prior written authorization from <b>SysMVC</b>.</p>
|
||||||
|
<p><strong>5. CHANGES TO THIS PRIVACY POLICY</strong></p>
|
||||||
|
<p>5.1. <strong><b>SysMVC</b></strong> reserves the right to change these Terms of Use at any time. Any changes, modifications, additions, or deletions will take effect immediately.</p>
|
||||||
|
<p>5.2. You acknowledge and agree that it is your responsibility to review this website and these Terms of Use periodically and be aware of any modifications. Your continued use of the site after such changes will constitute your acknowledgment of the modified Terms and your agreement to comply with and be governed by them.</p>
|
||||||
|
<p><strong>6. JURISDICTION</strong></p>
|
||||||
|
<p>6.1. The jurisdiction of Santa Rita do Sapucaí/MG is elected for the resolution of any disputes arising from these Terms of Use.</p>
|
||||||
|
<p style="margin-bottom: 0cm; line-height: 100%"><br/>
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
+3872
File diff suppressed because it is too large
Load Diff
Executable
+1
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
Executable
+1
File diff suppressed because one or more lines are too long
+325
@@ -0,0 +1,325 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.6.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2022 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2022 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.15;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #212529;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||||
|
outline: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title],
|
||||||
|
abbr[data-original-title] {
|
||||||
|
text-decoration: underline;
|
||||||
|
-webkit-text-decoration: underline dotted;
|
||||||
|
text-decoration: underline dotted;
|
||||||
|
cursor: help;
|
||||||
|
border-bottom: 0;
|
||||||
|
-webkit-text-decoration-skip-ink: none;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
address {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-style: normal;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
dl {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol,
|
||||||
|
ul ul,
|
||||||
|
ol ul,
|
||||||
|
ul ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
position: relative;
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([class]) {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([class]):hover {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
overflow: auto;
|
||||||
|
-ms-overflow-style: scrollbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
overflow: hidden;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption {
|
||||||
|
padding-top: 0.75rem;
|
||||||
|
padding-bottom: 0.75rem;
|
||||||
|
color: #6c757d;
|
||||||
|
text-align: left;
|
||||||
|
caption-side: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: inherit;
|
||||||
|
text-align: -webkit-match-parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus:not(:focus-visible) {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[role="button"] {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
[type="button"],
|
||||||
|
[type="reset"],
|
||||||
|
[type="submit"] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:not(:disabled),
|
||||||
|
[type="button"]:not(:disabled),
|
||||||
|
[type="reset"]:not(:disabled),
|
||||||
|
[type="submit"]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
[type="button"]::-moz-focus-inner,
|
||||||
|
[type="reset"]::-moz-focus-inner,
|
||||||
|
[type="submit"]::-moz-focus-inner {
|
||||||
|
padding: 0;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="radio"],
|
||||||
|
input[type="checkbox"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
line-height: inherit;
|
||||||
|
color: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="number"]::-webkit-inner-spin-button,
|
||||||
|
[type="number"]::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"] {
|
||||||
|
outline-offset: -2px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
output {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||||
Executable
+1
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.6.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2022 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2022 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||||
Executable
+1
File diff suppressed because one or more lines are too long
+10332
File diff suppressed because it is too large
Load Diff
Executable
+1
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
Executable
+1
File diff suppressed because one or more lines are too long
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
/* Move down content because we have a fixed navbar that is 3.5rem tall */
|
||||||
|
body {
|
||||||
|
padding-top: 3.5rem;
|
||||||
|
}
|
||||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Executable
+57
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SysMVC - PHP Framework
|
||||||
|
*
|
||||||
|
* PHP Framework.
|
||||||
|
*
|
||||||
|
* @package SysMVC
|
||||||
|
* @author Marco Costa (syspanel@gmx.com)
|
||||||
|
* @license MIT
|
||||||
|
* @since 2025-03-28
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
|
||||||
|
use Symfony\Component\Dotenv\Dotenv;
|
||||||
|
use Pecee\SimpleRouter\SimpleRouter as Router;
|
||||||
|
|
||||||
|
// Load Composer's autoloader
|
||||||
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
|
// Load the .env file into environment variables
|
||||||
|
$dotenv = new Dotenv();
|
||||||
|
if (file_exists(__DIR__ . '/../.env')) {
|
||||||
|
$dotenv->load(__DIR__ . '/../.env');
|
||||||
|
} else {
|
||||||
|
throw new \Exception('.env file not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to get environment variables with a fallback default
|
||||||
|
function getEnvOrDefault($name, $default = null) {
|
||||||
|
$value = getenv($name);
|
||||||
|
return $value !== false ? $value : $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PHP settings configuration
|
||||||
|
ini_set('memory_limit', getEnvOrDefault('PHP_MEMORY_LIMIT', '128M'));
|
||||||
|
ini_set('max_execution_time', getEnvOrDefault('PHP_MAX_EXECUTION_TIME', '30'));
|
||||||
|
ini_set('max_input_time', getEnvOrDefault('PHP_MAX_INPUT_TIME', '60'));
|
||||||
|
ini_set('upload_max_filesize', getEnvOrDefault('PHP_UPLOAD_MAX_FILESIZE', '2M'));
|
||||||
|
ini_set('post_max_size', getEnvOrDefault('PHP_POST_MAX_SIZE', '8M'));
|
||||||
|
ini_set('max_file_uploads', getEnvOrDefault('PHP_MAX_FILE_UPLOADS', '20'));
|
||||||
|
ini_set('display_errors', getEnvOrDefault('PHP_DISPLAY_ERRORS', '1'));
|
||||||
|
ini_set('display_startup_errors', getEnvOrDefault('PHP_DISPLAY_STARTUP_ERRORS', '1'));
|
||||||
|
ini_set('log_errors', getEnvOrDefault('PHP_LOG_ERRORS', '1'));
|
||||||
|
ini_set('error_log', getEnvOrDefault('PHP_ERROR_LOG', '/var/log/php_errors.log'));
|
||||||
|
error_reporting(constant(getEnvOrDefault('PHP_ERROR_REPORTING', 'E_ALL')));
|
||||||
|
|
||||||
|
// Enable error display in development
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
|
||||||
|
require __DIR__ . '/../bootstrap/app.php';
|
||||||
|
|
||||||
|
// Start routing
|
||||||
|
Router::start();
|
||||||
+6971
File diff suppressed because it is too large
Load Diff
Executable
+1
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
Executable
+1
File diff suppressed because one or more lines are too long
+4356
File diff suppressed because it is too large
Load Diff
Executable
+1
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
Executable
+1
File diff suppressed because one or more lines are too long
Executable
+49
@@ -0,0 +1,49 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Crud Example Create')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="text-success">Blade - Crud Example New Item</h1>
|
||||||
|
|
||||||
|
<!-- Display error message if any -->
|
||||||
|
@if ($error)
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{{ $error }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<form action="/crudexample" method="POST">
|
||||||
|
<?= csrf() ?>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="name" class="form-label">Name:</label>
|
||||||
|
<input type="text" id="name" name="name" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="password" class="form-label">Password:</label>
|
||||||
|
<input type="password" id="password" name="password" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="company" class="form-label">Company:</label>
|
||||||
|
<input type="text" id="company" name="company" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="address" class="form-label">Address:</label>
|
||||||
|
<input type="text" id="address" name="address" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="phone" class="form-label">Phone:</label>
|
||||||
|
<input type="text" id="phone" name="phone" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="email" class="form-label">Email:</label>
|
||||||
|
<input type="email" id="email" name="email" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="notes" class="form-label">Notes:</label>
|
||||||
|
<textarea id="notes" name="notes" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Create</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Crud example Delete')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="text-danger">Blade - Crud example Delete</h1>
|
||||||
|
<form action="/clients/delete/{{ $client['id'] }}" method="POST">
|
||||||
|
<input type="hidden" name="_method" value="POST"> <!-- Ensure that POST is used -->
|
||||||
|
<p class="text-warning">
|
||||||
|
Are you sure you want to delete client {{ $client['name'] }}?
|
||||||
|
</p>
|
||||||
|
<button type="submit" class="btn btn-danger">Delete</button>
|
||||||
|
<a href="/clients" class="btn btn-secondary">Cancel</a>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Executable
+50
@@ -0,0 +1,50 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Crud Example Edit')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="text-warning">Blade - Crud Example Edit</h1>
|
||||||
|
<form action="/crudexample/update/{{ $crudexample['id'] }}" method="POST">
|
||||||
|
<?= csrf() ?>
|
||||||
|
<input type="hidden" name="_method" value="POST"> <!-- Changed to POST -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="name" class="form-label">Name:</label>
|
||||||
|
<input type="text" id="name" name="name" class="form-control" value="{{ $crudexample['name'] }}" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="password" class="form-label">Password:</label>
|
||||||
|
<input type="password" id="password" name="password" class="form-control">
|
||||||
|
<input type="checkbox" id="showPassword" onclick="togglePassword()"> Show Password
|
||||||
|
<script>
|
||||||
|
function togglePassword() {
|
||||||
|
var passwordInput = document.getElementById('password');
|
||||||
|
var showPasswordCheckbox = document.getElementById('showPassword');
|
||||||
|
passwordInput.type = showPasswordCheckbox.checked ? 'text' : 'password';
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="company" class="form-label">Company:</label>
|
||||||
|
<input type="text" id="company" name="company" class="form-control" value="{{ $crudexample['company'] }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="address" class="form-label">Address:</label>
|
||||||
|
<input type="text" id="address" name="address" class="form-control" value="{{ $crudexample['address'] }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="phone" class="form-label">Phone:</label>
|
||||||
|
<input type="text" id="phone" name="phone" class="form-control" value="{{ $crudexample['phone'] }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="email" class="form-label">Email:</label>
|
||||||
|
<input type="email" id="email" name="email" class="form-control" value="{{ $crudexample['email'] }}" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="notes" class="form-label">Notes:</label>
|
||||||
|
<textarea id="notes" name="notes" class="form-control">{{ $crudexample['notes'] }}</textarea>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Update</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+43
@@ -0,0 +1,43 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Crud Example List')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
|
<h1 class="display-4 text-primary">Blade - Crud Example List</h1>
|
||||||
|
<a href="/crudexample/create" class="btn btn-success btn-lg">Add New Item</a>
|
||||||
|
</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="table-dark">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Company</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($crudexample as $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $item['id'] }}</td>
|
||||||
|
<td>{{ $item['name'] }}</td>
|
||||||
|
<td>{{ $item['company'] }}</td>
|
||||||
|
<td>
|
||||||
|
<a href="/crudexample/show/{{ $item['id'] }}" class="btn btn-info btn-sm me-2">View</a>
|
||||||
|
<a href="/crudexample/edit/{{ $item['id'] }}" class="btn btn-warning btn-sm me-2">Edit</a>
|
||||||
|
|
||||||
|
<!-- Delete form -->
|
||||||
|
<form action="/crudexample/delete/{{ $item['id'] }}" method="POST" style="display:inline;">
|
||||||
|
<input type="hidden" name="_method" value="POST">
|
||||||
|
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+48
@@ -0,0 +1,48 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Crud Example Show')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="text-info">Blade - Crud Example Show</h1>
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<td>{{ $crudexample['id'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<td>{{ $crudexample['name'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Company</th>
|
||||||
|
<td>{{ $crudexample['company'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Address</th>
|
||||||
|
<td>{{ $crudexample['address'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Phone</th>
|
||||||
|
<td>{{ $crudexample['phone'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Email</th>
|
||||||
|
<td>{{ $crudexample['email'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Notes</th>
|
||||||
|
<td>{{ $crudexample['notes'] }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a href="/crudexample/edit/{{ $crudexample['id'] }}" class="btn btn-warning me-2">Edit</a>
|
||||||
|
|
||||||
|
<!-- Delete form -->
|
||||||
|
<form action="/crudexample/delete/{{ $crudexample['id'] }}" method="POST" style="display:inline;">
|
||||||
|
<input type="hidden" name="_method" value="POST">
|
||||||
|
<button type="submit" class="btn btn-danger me-2" onclick="return confirm('Are you sure?')">Delete</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<a href="/crudexample" class="btn btn-secondary">Back to List</a>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+57
@@ -0,0 +1,57 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pt-BR">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>403 - Forbidden</title>
|
||||||
|
<link rel="stylesheet" href="/assets/styles.css"> <!-- Adicione seu CSS aqui -->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* /public/assets/styles.css */
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
padding: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3em;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 1.2em;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-size: 1em;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>403 - Forbidden</h1>
|
||||||
|
<p></p>
|
||||||
|
<a href="/" class="button">Voltar para a Página Inicial</a>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Executable
+57
@@ -0,0 +1,57 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pt-BR">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>404 - Página Não Encontrada</title>
|
||||||
|
<link rel="stylesheet" href="/assets/styles.css"> <!-- Adicione seu CSS aqui -->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* /public/assets/styles.css */
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
padding: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3em;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 1.2em;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-size: 1em;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>404 - Página Não Encontrada</h1>
|
||||||
|
<p>Desculpe, a página que você está procurando não foi encontrada.</p>
|
||||||
|
<a href="/" class="button">Voltar para a Página Inicial</a>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Executable
+85
@@ -0,0 +1,85 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'SysMVC - PHP Framework')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="jumbotron text-center">
|
||||||
|
<h2>Welcome to SysMVC</h2>
|
||||||
|
<p>PHP framework for website and app development.</p>
|
||||||
|
<a href="/home/details" class="btn btn-primary">Learn More Details</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/1.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Database Usage</h5>
|
||||||
|
<p class="card-text">Learn how to use the database in SysMVC with CRUD examples.</p>
|
||||||
|
<a href="/home/database" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/2.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Dependency Injection</h5>
|
||||||
|
<p class="card-text">Learn how to use dependency injection with PHP-DI in SysMVC.</p>
|
||||||
|
<a href="/home/dependency-injection" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/3.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">App Projects</h5>
|
||||||
|
<p class="card-text">See how to use SysMVC as a base for application development.</p>
|
||||||
|
<a href="/home/app-development" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<!-- New Card: Blade Templates -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/4.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Blade & Twig Templates Engine</h5>
|
||||||
|
<p class="card-text">Learn more about using Blade and/or Twig templates with SysMVC.</p>
|
||||||
|
<a href="/home/templates-blade" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- New Card: Security -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/5.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Security</h5>
|
||||||
|
<p class="card-text">Security implementations in SysMVC.</p>
|
||||||
|
<a href="/home/security" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- New Card: Console CLI -->
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<img src="/images/6.jpg" class="card-img-top" alt="Image">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Console CLI</h5>
|
||||||
|
<p class="card-text">Use the CLI console to manage your SysMVC project.</p>
|
||||||
|
<a href="/home/console-cli" class="btn btn-primary">See More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'About')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">About Us</h1>
|
||||||
|
<p class="lead">Welcome to SysMVC - PHP Framework!</p>
|
||||||
|
<p>SysMVC is a PHP framework developed to simplify the creation of robust and scalable web applications. We use the best development practices and modern tools to provide an efficient and enjoyable development experience.</p>
|
||||||
|
<p>Our mission is to help developers build high-quality web applications quickly and effectively. We offer a solid and flexible framework, allowing you to focus on what really matters: creating amazing features for your users.</p>
|
||||||
|
<p>If you have any questions or need support, feel free to contact us. We are here to help!</p>
|
||||||
|
<p><strong>Marco Costa</strong></p>
|
||||||
|
<p>Developer and Creator of SysMVC</p>
|
||||||
|
<p>Official website: <a href="https://sysmvc.syspanel.com.br">sysmvc.syspanel.com.br</a><p>
|
||||||
|
<p>Contact email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a><p>
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git" target="_blak">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'App Development with SysMVC')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">App Development with SysMVC</h1>
|
||||||
|
<p class="lead">How to use SysMVC as a base for application development.</p>
|
||||||
|
|
||||||
|
<p>SysMVC is a flexible and powerful framework, perfect for serving as the foundation for developing modern web applications.</p>
|
||||||
|
|
||||||
|
<h2>Modular Structure</h2>
|
||||||
|
<p>SysMVC allows you to create independent modules, making it easier to organize your code and maintain the project.</p>
|
||||||
|
|
||||||
|
<h2>Simple Routing</h2>
|
||||||
|
<p>With SysMVC's router, you can define your routes in a simple and intuitive way:</p>
|
||||||
|
<pre><code>
|
||||||
|
Router::get('/home', 'HomeController@index');
|
||||||
|
Router::post('/client', 'ClientController@store');
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2>Template Rendering</h2>
|
||||||
|
<p>Use BladeOne to efficiently and neatly render your templates:</p>
|
||||||
|
<pre><code>
|
||||||
|
echo $blade->run("home.index", ["clients" => $clients]);
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>With these tools, SysMVC provides a solid foundation for developing robust and scalable web applications.</p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+88
@@ -0,0 +1,88 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Console CLI')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<h2>Console CLI</h2>
|
||||||
|
<p>The SysMVC CLI console, based on Symfony Console, allows you to efficiently manage your project using command-line commands.</p>
|
||||||
|
|
||||||
|
<h3>Useful Commands</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>php bin/console generate:app-key</strong> - Generates a new application key.</li>
|
||||||
|
<li><strong>php bin/console app:say-hello</strong> - Hello.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Extending with More Commands</h3>
|
||||||
|
<p>The Symfony Console allows you to create and extend custom commands. Here is an example of how to create a custom command:</p>
|
||||||
|
<pre>
|
||||||
|
<code>
|
||||||
|
// src/Command/SayHelloCommand.php
|
||||||
|
namespace App\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
|
class SayHelloCommand extends Command
|
||||||
|
{
|
||||||
|
protected static $defaultName = 'app:say-hello';
|
||||||
|
|
||||||
|
protected function configure()
|
||||||
|
{
|
||||||
|
$this
|
||||||
|
->setDescription('Says hello.')
|
||||||
|
->setHelp('This command allows you to say hello...');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
$output->writeln('Hello from SysMVC!');
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>To register the command, add it to the service in the <code>config/services.yaml</code> file:</p>
|
||||||
|
<pre>
|
||||||
|
<code>
|
||||||
|
# config/services.yaml
|
||||||
|
services:
|
||||||
|
App\Command\SayHelloCommand:
|
||||||
|
tags: ['console.command']
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Now you can execute the custom command:</p>
|
||||||
|
<pre>
|
||||||
|
<code>
|
||||||
|
$ php bin/console app:say-hello
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>For more information about available commands and how to create custom commands, check the <a href="https://symfony.com/doc/current/console.html" target="_blank">Symfony Console documentation</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
@endsection
|
||||||
Executable
+66
@@ -0,0 +1,66 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Database Usage')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">Database Usage</h1>
|
||||||
|
<p class="lead">CRUD Example with SysMVC.</p>
|
||||||
|
|
||||||
|
<p>SysMVC makes it easy to interact with databases through the use of Eloquent ORM. You can easily create, read, update, and delete records in the database using intuitive methods.</p>
|
||||||
|
|
||||||
|
<h2>CRUD Example</h2>
|
||||||
|
<p>Below is a basic example of CRUD operations:</p>
|
||||||
|
|
||||||
|
<h3>Creating a Record</h3>
|
||||||
|
<pre><code>
|
||||||
|
$client = new Client();
|
||||||
|
$client->name = 'Client Name';
|
||||||
|
$client->email = 'email@example.com';
|
||||||
|
$client->save();
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3>Reading Records</h3>
|
||||||
|
<pre><code>
|
||||||
|
$clients = Client::all();
|
||||||
|
foreach ($clients as $client) {
|
||||||
|
echo $client->name;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3>Updating a Record</h3>
|
||||||
|
<pre><code>
|
||||||
|
$client = Client::find(1);
|
||||||
|
$client->name = 'New Name';
|
||||||
|
$client->save();
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3>Deleting a Record</h3>
|
||||||
|
<pre><code>
|
||||||
|
$client = Client::find(1);
|
||||||
|
$client->delete();
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>With these examples, you can see how easy it is to work with databases using SysMVC.</p>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Dependency Injection with PHP-DI')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">Dependency Injection with PHP-DI</h1>
|
||||||
|
<p class="lead">How to use PHP-DI in SysMVC.</p>
|
||||||
|
|
||||||
|
<p>SysMVC uses the PHP-DI library to manage dependency injection. This allows you to write more modular and testable code.</p>
|
||||||
|
|
||||||
|
<h2>Basic Configuration</h2>
|
||||||
|
<p>To configure PHP-DI, you can create a <code>di-config.php</code> file with the definitions of your dependencies:</p>
|
||||||
|
<pre><code>{{
|
||||||
|
' use DI\ContainerBuilder;
|
||||||
|
|
||||||
|
return function (ContainerBuilder $containerBuilder) {
|
||||||
|
$containerBuilder->addDefinitions([
|
||||||
|
// Define your dependencies here
|
||||||
|
ClientRepository::class => \DI\create(MySqlClientRepository::class),
|
||||||
|
]);
|
||||||
|
};'
|
||||||
|
}}</code></pre>
|
||||||
|
|
||||||
|
<h2>Usage</h2>
|
||||||
|
<p>To use dependency injection in your classes, simply pass the dependencies through the constructor:</p>
|
||||||
|
<pre><code>{{
|
||||||
|
' class ClientService {
|
||||||
|
private $clientRepository;
|
||||||
|
|
||||||
|
public function __construct(ClientRepository $clientRepository) {
|
||||||
|
$this->clientRepository = $clientRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getClients() {
|
||||||
|
return $this->clientRepository->findAll();
|
||||||
|
}
|
||||||
|
}'
|
||||||
|
}}</code></pre>
|
||||||
|
|
||||||
|
<p>With dependency injection, you can easily swap implementations and keep your code decoupled and more testable.</p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
Executable
+82
@@ -0,0 +1,82 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Learn More About SysMVC')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
|
||||||
|
<!-- Free Image -->
|
||||||
|
<img src="https://images.pexels.com/photos/3184424/pexels-photo-3184424.jpeg" class="img-fluid mb-4" alt="SysMVC">
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<h1 class="display-8 text-primary">SysMVC - PHP Framework</h1>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<p class="lead">Welcome to SysMVC - PHP Framework!</p>
|
||||||
|
<p>SysMVC is a PHP framework developed to facilitate the creation of robust and scalable web applications. We use best development practices and modern tools to provide an efficient and pleasant development experience.</p>
|
||||||
|
<p>Our mission is to help developers build high-quality web applications quickly and efficiently. We offer a solid and flexible framework, allowing you to focus on what really matters: creating amazing features for your users.</p>
|
||||||
|
<p>SysMVC has a fast learning curve, it's lightweight, fast, modern, straightforward, secure, and ideal for developing websites and apps both locally and in the cloud. It is also licensed under the MIT License, which is highly permissive for developers.</p>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Main Features</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Advanced routing system for easy navigation</li>
|
||||||
|
<li>Support for Blade templates for efficient rendering</li>
|
||||||
|
<li>Integration with Monolog for a robust logging system</li>
|
||||||
|
<li>Modular and easy-to-maintain structure</li>
|
||||||
|
<li>ORM database support for simplified interaction with the database</li>
|
||||||
|
<li>Enhanced security with protection against CSRF, XSS, and more</li>
|
||||||
|
<li>Dependency injection</li>
|
||||||
|
<li>Environment variable loading</li>
|
||||||
|
<li>Handling of HTTP requests and responses</li>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<h2 class="mt-4">MIT License</h2>
|
||||||
|
<p>SysMVC is licensed under the MIT License, which allows wide freedom of use and distribution. Here is the full text of the license:</p>
|
||||||
|
<br>
|
||||||
|
<pre class="bg-light p-3">
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Marco Costa
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, get in touch:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+154
@@ -0,0 +1,154 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Project Information')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1 class="display-4 text-primary">SysMVC - PHP Framework</h1>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git" target="_blank">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p class="lead">Project Information</p>
|
||||||
|
<p><strong>SysMVC</strong> is a system developed by <strong>Marco Costa</strong> (<a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a>), with source code licensed under the <strong>MIT License</strong>.</p>
|
||||||
|
<p>This software is offered for free and can be used, modified, and distributed under the terms of the MIT License.</p>
|
||||||
|
<p>Project website: <a href="https://sysmvc.syspanel.com.br">https://sysmvc.syspanel.com.br</a></p>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2 class="mt-4">🚀 Installation Tutorial</h2>
|
||||||
|
|
||||||
|
<h3>✅ Prerequisites</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>PHP 8.1</strong> or higher</li>
|
||||||
|
<li><strong>Composer</strong> (dependency manager for PHP)</li>
|
||||||
|
<li><strong>Web Server</strong> (Apache or Nginx)</li>
|
||||||
|
<li><strong>MySQL</strong> or other compatible database</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>🔧 Step-by-Step</h3>
|
||||||
|
|
||||||
|
<h4>1️⃣ Unzip the File</h4>
|
||||||
|
<p>Download and unzip the SysMVC file to your local environment:</p>
|
||||||
|
<pre><code>unzip sysmvc.zip -d sysmvc
|
||||||
|
cd sysmvc
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>2️⃣ Install the Dependencies</h4>
|
||||||
|
<p>Use Composer to install the project dependencies:</p>
|
||||||
|
<pre><code>composer install
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>3️⃣ Configure the Environment</h4>
|
||||||
|
<p>Copy the <code>.env.example</code> file to <code>.env</code> and configure your environment variables:</p>
|
||||||
|
<pre><code>cp .env.example .env
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Open the <code>.env</code> file and edit the following lines with your information:</p>
|
||||||
|
<pre><code>DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=your_database
|
||||||
|
DB_USERNAME=your_username
|
||||||
|
DB_PASSWORD=your_password
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>4️⃣ Set Permissions</h4>
|
||||||
|
<p>Change the permissions of the storage and cache directories to ensure the web server can write to them:</p>
|
||||||
|
<pre><code>chmod -R 775 storage
|
||||||
|
chmod -R 775 bootstrap/cache
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>5️⃣ Generate the Application Key</h4>
|
||||||
|
<pre><code>php bin/console generate:app-key
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>6️⃣ Run the Migrations</h4>
|
||||||
|
<p>Run the migrations to create the tables in the database:</p>
|
||||||
|
<pre><code>php bin/console migrate:crudexample
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4>7️⃣ Configure the Web Server</h4>
|
||||||
|
|
||||||
|
<h5>📌 Apache</h5>
|
||||||
|
<p>Add the following configuration to your Apache configuration file:</p>
|
||||||
|
<pre><code><VirtualHost *:80>
|
||||||
|
ServerName sysmvc.local
|
||||||
|
DocumentRoot /path/to/sysmvc/public
|
||||||
|
|
||||||
|
<Directory /path/to/sysmvc/public>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h5>📌 Nginx</h5>
|
||||||
|
<p>Add the following configuration to your Nginx configuration file:</p>
|
||||||
|
<pre><code>server {
|
||||||
|
listen 80;
|
||||||
|
server_name sysmvc.local;
|
||||||
|
root /path/to/sysmvc/public;
|
||||||
|
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include snippets/fastcgi-php.conf;
|
||||||
|
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2 class="mt-4">📦 Dependencies Used</h2>
|
||||||
|
<p>The project uses the following third-party packages, each with its respective license:</p>
|
||||||
|
|
||||||
|
<h3>✅ Packages with MIT License</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>Illuminate Database</strong> → <a href="https://github.com/illuminate/database" target="_blank">illuminate/database</a></li>
|
||||||
|
<li><strong>Monolog</strong> → <a href="https://github.com/Seldaek/monolog" target="_blank">monolog/monolog</a></li>
|
||||||
|
<li><strong>BladeOne</strong> → <a href="https://github.com/EFTEC/BladeOne" target="_blank">eftec/bladeone</a></li>
|
||||||
|
<li><strong>Twig</strong> → <a href="https://github.com/twigphp/Twig" target="_blank">twig/twig</a></li>
|
||||||
|
<li><strong>Symfony Console</strong> → <a href="https://github.com/symfony/console" target="_blank">symfony/console</a></li>
|
||||||
|
<li><strong>Phinx</strong> → <a href="https://github.com/cakephp/phinx" target="_blank">robmorgan/phinx</a></li>
|
||||||
|
<li><strong>Defuse Encryption</strong> → <a href="https://github.com/defuse/php-encryption" target="_blank">defuse/php-encryption</a></li>
|
||||||
|
<li><strong>Random Compatibility</strong> → <a href="https://github.com/paragonie/random_compat" target="_blank">paragonie/random_compat</a></li>
|
||||||
|
<li><strong>Rakit Validation</strong> → <a href="https://github.com/rakit/validation" target="_blank">rakit/validation</a></li>
|
||||||
|
<li><strong>Carbon</strong> → <a href="https://github.com/briannesbitt/Carbon" target="_blank">nesbot/carbon</a></li>
|
||||||
|
<li><strong>Flysystem</strong> → <a href="https://github.com/thephpleague/flysystem" target="_blank">league/flysystem</a></li>
|
||||||
|
<li><strong>Intervention Image</strong> → <a href="https://github.com/Intervention/image" target="_blank">intervention/image</a></li>
|
||||||
|
<li><strong>Symfony Cache</strong> → <a href="https://github.com/symfony/cache" target="_blank">symfony/cache</a></li>
|
||||||
|
<li><strong>Predis Redis Client</strong> → <a href="https://github.com/predis/predis" target="_blank">predis/predis</a></li>
|
||||||
|
<li><strong>PHP Dependency Injection</strong> → <a href="https://github.com/PHP-DI/PHP-DI" target="_blank">php-di/php-di</a></li>
|
||||||
|
<li><strong>Symfony Dotenv</strong> → <a href="https://github.com/symfony/dotenv" target="_blank">symfony/dotenv</a></li>
|
||||||
|
<li><strong>Pecee SimpleRouter</strong> → <a href="https://github.com/pecee/pecee-simple-router" target="_blank">pecee/simple-router</a></li>
|
||||||
|
<li><strong>Nyholm PSR7</strong> → <a href="https://github.com/Nyholm/psr7" target="_blank">nyholm/psr7</a></li>
|
||||||
|
<li><strong>FakerPHP Faker</strong> → <a href="https://github.com/FakerPHP/Faker" target="_blank">fakerphp/faker</a></li>
|
||||||
|
<li><strong>Symfony Mailer</strong> → <a href="https://github.com/symfony/mailer" target="_blank">symfony/mailer</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2 class="mt-4">📜 Terms of Use</h2>
|
||||||
|
<p>This project is licensed under the <strong>MIT License</strong>.</p>
|
||||||
|
<p>You can use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software, provided that the license and copyright notice are included in all copies or substantial portions of the Software.</p>
|
||||||
|
<p>The Software is provided "as is", without any warranty of any kind. For more details, please consult the <a href="https://opensource.org/licenses/MIT" target="_blank">MIT License</a>.</p>
|
||||||
|
<p>For more information, contact: <a href="mailto:sysmvc@syspanel.com.br" target="_blank">sysmvc@syspanel.com.br</a></p>
|
||||||
|
|
||||||
|
<p class="text-center mt-5">© 2025 Marco Costa - All rights reserved under the MIT License.</p>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Executable
+39
@@ -0,0 +1,39 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'Security')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<h2>Security</h2>
|
||||||
|
<p>We have implemented several security measures in SysMVC to protect your application against threats. Here are some of the implementations:</p>
|
||||||
|
<h3>CSRF Protection</h3>
|
||||||
|
<p>We use CSRF tokens to protect against Cross-Site Request Forgery attacks.</p>
|
||||||
|
<h3>Data Sanitization</h3>
|
||||||
|
<p>All input and output data are sanitized to prevent code injections and other attacks.</p>
|
||||||
|
<h3>Security Headers</h3>
|
||||||
|
<p>We add HTTP security headers to protect against attacks like clickjacking and MIME-type sniffing.</p>
|
||||||
|
<p>For more information about security, refer to the <a href="https://owasp.org/" target="_blank">OWASP documentation</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, feel free to contact us:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
@endsection
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('title', 'SysMVC Advantages - Blade, Twig, and Pure PHP')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<h2>SysMVC: Support for Blade, Twig, and Pure PHP</h2>
|
||||||
|
<p>SysMVC is a versatile PHP framework that supports three template rendering methods: <strong>Blade</strong>, <strong>Twig</strong>, and <strong>Pure PHP</strong>. This flexibility allows developers to choose the tool that best suits their needs, providing several advantages.</p>
|
||||||
|
|
||||||
|
<h3>Blade Advantages</h3>
|
||||||
|
<p>Blade is a simple yet powerful template engine developed for the Laravel framework. With Blade, developers can easily create reusable layouts and dynamic components. It is known for its clean and clear syntax, making template development fast and intuitive.</p>
|
||||||
|
<p>For more information, refer to the <a href="https://laravel.com/docs/8.x/blade" target="_blank">official Blade documentation</a>.</p>
|
||||||
|
|
||||||
|
<h3>Twig Advantages</h3>
|
||||||
|
<p>Twig is a flexible and robust template engine, widely used in various PHP frameworks. It offers a series of advanced features such as template inheritance, filters, custom extensions, and more. Twig is known for its security and performance, making it a reliable choice for projects of any scale.</p>
|
||||||
|
<p>For more information, refer to the <a href="https://twig.symfony.com/doc/3.x/" target="_blank">official Twig documentation</a>.</p>
|
||||||
|
|
||||||
|
<h3>Pure PHP Advantages</h3>
|
||||||
|
<p>SysMVC also supports template rendering using pure PHP. This means you can directly include PHP files and render content dynamically. If you prefer not to use a template engine, you can simply use the <code>include</code> command to include template files and generate the desired content. This can be a simpler and more straightforward choice for smaller projects or developers more familiar with PHP.</p>
|
||||||
|
<p>Example of using pure PHP in SysMVC:</p>
|
||||||
|
<pre><code>include('page.php');</code></pre>
|
||||||
|
|
||||||
|
<h3>Why Choose SysMVC?</h3>
|
||||||
|
<p>With SysMVC, you don't have to worry about choosing between Blade, Twig, or Pure PHP. You can use any of these options, or even combine different approaches within the same project, depending on the context. This flexibility is a significant advantage, as it allows developers to take the best of each tool, adapting to their preferences and specific requirements.</p>
|
||||||
|
|
||||||
|
<h3>Conclusion</h3>
|
||||||
|
<p>Whether you're a Blade enthusiast, a Twig fan, or someone who prefers pure PHP, SysMVC is ready to meet your needs. The ability to switch between these options makes SysMVC an excellent choice for developers seeking efficiency, flexibility, and ease of use in their PHP projects.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<p>Github: <a href="https://github.com/syspanel/SysMVC.git">https://github.com/syspanel/SysMVC.git</a></p>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<h2 class="mt-4">Contact</h2>
|
||||||
|
<p>If you're interested in SysMVC, feel free to contact us:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Email: <a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a></li>
|
||||||
|
<li>WhatsApp: <a href="https://wa.me/5535992261684" target="_blank">+55 (35) 99226-1684</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
## Donations via PayPal
|
||||||
|
|
||||||
|
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
|
||||||
|
|
||||||
|
<h2 class="mt-4">Donations via PAYPAL</h2>
|
||||||
|
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com¤cy_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
|
||||||
|
@endsection
|
||||||
|
|
||||||
Executable
+97
@@ -0,0 +1,97 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>@yield('title', 'Default Title')</title>
|
||||||
|
|
||||||
|
<meta name="author" content="Marco Costa">
|
||||||
|
<meta name="description" content="SysMVC - PHP framework for website and app development.">
|
||||||
|
<meta name="copyright" content="© 2025 Marco Costa" />
|
||||||
|
<meta name="keywords" content="sites, web, development, framework, php, mit">
|
||||||
|
<meta name="robots" content="index,nofollow">
|
||||||
|
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link href="DataTables/datatables.min.css" rel="stylesheet">
|
||||||
|
<script src="DataTables/datatables.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Link to your custom CSS -->
|
||||||
|
<link href="/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="/css/jumbotron.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<a class="navbar-brand" href="/">SysMVC</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/crudexample">Blade - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/twigexample">Twig - CRUD Example</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/readme">Readme</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/about">About</a>
|
||||||
|
</li>
|
||||||
|
<!-- Add more links as needed -->
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container my-4">
|
||||||
|
@yield('content') <!-- The page content will be inserted here -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="bg-dark text-white text-center p-3">
|
||||||
|
<p>© 2025 SysMVC 1.0 PHP Framework | <a href="https://opensource.org/licenses/MIT" class="text-white" target="_blank">License: MIT</a></p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Bootstrap Scripts -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="/js/jquery.slim.min.js"><\/script>')</script><script src="../js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
console.log('jQuery is working');
|
||||||
|
console.log('Bootstrap is working');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Cookie Consent Scripts -->
|
||||||
|
<link href="consent/cookieconsent.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="consent/cookieconsent.min.js"></script>
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", function(){
|
||||||
|
window.cookieconsent.initialise({
|
||||||
|
"palette": {
|
||||||
|
"popup": {
|
||||||
|
"background": "#216942",
|
||||||
|
"text": "#b2d192"
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"background": "#afed71"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"message": "We use essential cookies and similar technologies in accordance with our Terms of Use. By continuing to browse, you agree to these terms.",
|
||||||
|
"dismiss": "Accept",
|
||||||
|
"href": "consent/terms.html"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user