Restructure MVC into public/src layout

Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-24 14:00:58 +00:00
parent 1be6b7ff0c
commit f617ecb350
135 changed files with 75 additions and 63 deletions

21
src/Core/database.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
namespace Kabano;
function sql_connect() {
global $config;
$connection = "host=".$config['SQL_host']
." dbname=".$config['SQL_db']
." user=".$config['SQL_user']
." password=".$config['SQL_pass'];
$con = pg_connect($connection);
if (!$con) {
$error = error_get_last();
$message = $error && isset($error['message']) ? $error['message'] : "unknown error";
die("Could not connect to server: ".$message."\n");
}
return $con;
}