This commit is contained in:
edsea
2024-12-25 20:02:52 +01:00
commit 5309acd356
64 changed files with 86647 additions and 0 deletions

17
_conf/db_con.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
$hostname = $_SERVER['HTTP_HOST'];
if($hostname == 'api.stellaamor.com.local'){
$server = 'localhost';
$username = "root";
$db = "stella_amor";
$db_con = new pdo("mysql:host=$server;dbname=$db;charset=utf8mb4", $username);
}else{
$server = 'localhost';
$username = 'mysinfu1_stella';
$db_pass = 'E1#j#W4Y4UcV';
$db = 'mysinfu1_stella';
$db_con = new pdo("mysql:host=$server;dbname=$db;charset=utf8mb4", $username, $db_pass);
}

15
_conf/globals.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
$hostname = $_SERVER['HTTP_HOST'];
if ($hostname === 'api.stellaamor.com') {
// Production environment
header("Access-Control-Allow-Origin: https://stellaamor.com");
} else {
// Local environment
header("Access-Control-Allow-Origin: http://stellaamor.com.local");
}
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
session_start();
?>