mover key generatr to helper

This commit is contained in:
Christopher 2020-10-23 22:36:08 +02:00
parent a0e92da5f5
commit a982aa1f25
2 changed files with 11 additions and 11 deletions

View File

@ -13,4 +13,13 @@ function calcAPIKey($container)
return md5($RUNTIME['SYSTEMKEY'].md5($container['Names'][0]));
}
if(!file_exists("./pages/systemkey.txt"))
{
$randomKey = md5(rand(111111111, 999999999));
file_put_contents("./pages/systemkey.txt", $randomKey);
}
$RUNTIME['SYSTEMKEY'] = file_get_contents("./pages/systemkey.txt");
?>

View File

@ -4,21 +4,12 @@ header('Strict-Transport-Security: max-age=657000');
error_reporting(E_ALL);
session_start();
$RUNTIME = array();
include_once("classen/HTML.php");
include_once("classen/helper.php");
include_once("classen/docker.php");
$RUNTIME = array();
if(!file_exists("./pages/systemkey.txt"))
{
$randomKey = md5(rand(111111111, 999999999));
file_put_contents("./pages/systemkey.txt", $randomKey);
}
$RUNTIME['SYSTEMKEY'] = file_get_contents("./pages/systemkey.txt");
$_SESSION['CONATINER'] = "Game.OpenSimulator.Twix";
$_SESSION['LOGIN'] = "true";