Make some small changes and fixes

This commit is contained in:
zontreck 2024-05-15 13:30:02 -07:00
parent a93d62e2a1
commit 504ef2211d
7 changed files with 119 additions and 16 deletions

View file

@ -26,9 +26,10 @@ function rewrite_DB_conf($host, $user, $pass, $db)
file_put_contents("../database.user.php", $ptl);
}
require("Database.php");
if(file_exists("../database.user.php"))
require("../database.user.php");
else
require("Database.php");
session_start();
?>

14
php/Setup.php Normal file
View file

@ -0,0 +1,14 @@
<?php
if(!defined("COMMON"))
require("Common.php");
$js = getJsonizedInput();
$host = $js['host'];
$user = $js['user'];
$pass = $js['pass'];
$db = $js['db'];
rewrite_DB_conf($host, $user, $pass, $db);
?>