Add tailadmin
This commit is contained in:
8
main.php
8
main.php
@@ -18,7 +18,9 @@ class mcServ {
|
||||
private $api_keys;
|
||||
|
||||
public function checkConf() {
|
||||
if (!file_exists("../mcServ.db")) {
|
||||
$config = $this->getConf();
|
||||
|
||||
if (!file_exists($config["DB_PATH"])) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -30,7 +32,7 @@ class mcServ {
|
||||
}
|
||||
|
||||
public function checkLogin() {
|
||||
if (!isset($_COOKIE["session_id"]) || !isset($_COOKIE["device_id"])) {
|
||||
if (!isset($_COOKIE["session_id"]) || !isset($_COOKIE["device_id"]) || !isset($_COOKIE["username"])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -42,7 +44,7 @@ class mcServ {
|
||||
return false;
|
||||
}
|
||||
|
||||
$device = json_decode($json[$_COOKIE["device_id"]], true);
|
||||
$device = $json[$_COOKIE["device_id"]];
|
||||
|
||||
if ($device["session_id"] !== $_COOKIE["session_id"]) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user