Add files via upload

This commit is contained in:
2026-08-28 20:47:44 +02:00
committed by GitHub
parent 1abbb489d6
commit 61a0a08f64
17 changed files with 3962 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
function getDbConnection(): PDO
{
$host = getenv('DB_HOST') ?: 'mysql';
$db = getenv('DB_NAME') ?: 'crm';
$user = getenv('DB_USER') ?: 'crm_user';
$pass = getenv('DB_PASS') ?: '';
$dsn = "mysql:host=$host;dbname=$db;charset=utf8mb4";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
];
return new PDO($dsn, $user, $pass, $options);
}