Continue Setup

This commit is contained in:
marc-go
2026-02-05 19:56:52 +01:00
parent 0a0cacac3b
commit d04d005b1b
10 changed files with 90 additions and 25 deletions

38
main.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
/*
_____ _____ _ _
/ ____| / ____| | | | |
_ __ ___ ___| (___ ___ _ ____ _| | ___ _ __ | |_ _ __ ___ | |
| '_ ` _ \ / __|\___ \ / _ \ '__\ \ / / | / _ \| '_ \| __| '__/ _ \| |
| | | | | | (__ ____) | __/ | \ V /| |___| (_) | | | | |_| | | (_) | |
|_| |_| |_|\___|_____/ \___|_| \_/ \_____\___/|_| |_|\__|_| \___/|_|
* By RootMarc
*/
class mcServ {
public function checkConf() {
if (!file_exists("../mcServ.db")) {
return false;
}
return true;
}
public function getConf() {
$env = parse_ini_file(__DIR__ . "/.env");
return $env;
}
public function checkLogin() {
if (!isset($_COOKIE["session_id"]) || !isset($_COOKIE["user_id"])) {
return false;
}
}
public function generateSessionID() {
$num = rand(1, 999999);
$hash = hash("sha256", $num);
return $hash;
}
}