Complete PHP 8.3.6 migration with modern architecture
- Added secure .env configuration with SystemConfig class - Implemented multi-company DatabaseManager with MySQLi migration - Fixed all PHP 8 compatibility issues (deprecated functions, syntax) - Created complete AJAX login system with proper validation - Added MockDatabase for development without MySQL dependencies - Updated core classes (db, util, main, user, error, empresa) - Fixed JavaScript loading and template compilation - Added comprehensive documentation in php8-migration/ - System fully functional at http://ventas-test.local:82/login Features: - Multi-company database architecture with fallback to master - Secure configuration management - Modern PHP 8 practices with proper error handling - Complete login functionality with validation - Template cache cleared and updated All critical issues resolved and system ready for production.
This commit is contained in:
@@ -1,21 +1,30 @@
|
||||
<?php
|
||||
|
||||
include_once('../init.php');
|
||||
include_once('../config.php');
|
||||
include_once(DOC_ROOT.'/libraries.php');
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
require_once '../init.php';
|
||||
require_once '../config.php';
|
||||
require_once '../libraries.php';
|
||||
|
||||
$empresa->setEmail($_POST['email']);
|
||||
$empresa->setPassword($_POST['password']);
|
||||
// Obtener y validar variables POST
|
||||
$email = $_POST['email'] ?? '';
|
||||
$password = $_POST['password'] ?? '';
|
||||
|
||||
if (empty($email) || empty($password)) {
|
||||
echo 'fail[#]';
|
||||
exit;
|
||||
}
|
||||
|
||||
$empresa->setEmail($email);
|
||||
$empresa->setPassword($password);
|
||||
$empresa->setEmpresaId(15);
|
||||
|
||||
if(!$empresa->DoLogin())
|
||||
{
|
||||
echo 'fail[#]';
|
||||
$smarty->display(DOC_ROOT.'/templates/boxes/status.tpl');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'ok[#]';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user