Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/GUI/Actions/Session_Checker.php
1071 views
1
<?php
2
/*ORIGINAL CREATOR: Luca Garofalo (Lucksi)
3
AUTHOR: Luca Garofalo (Lucksi)
4
Copyright (C) 2021-2023 Lucksi <[email protected]>
5
License: GNU General Public License v3.0*/
6
7
function Moderate(){
8
error_reporting(0);
9
$Session_Token = "../Session/Token.txt";
10
$Login_file = "../Credentials/Login.json";
11
if(file_exists($Login_file)){
12
$reader = file_get_contents($Login_file);
13
$Parser = json_decode($reader,true);
14
$Status = $Parser["Database"]["Status"];
15
if($Status == "Active"){
16
if(file_exists($Session_Token)){
17
header("Location: ");
18
}
19
else {
20
header("Location: ../Login/Login.php");
21
}
22
}
23
else {
24
header("Location: ");
25
}
26
}
27
else {
28
exit(0);
29
}
30
}
31
Moderate();
32
?>
33
34