Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/GUI/Actions/Login_Controller.php
1592 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 Active(){
8
$Login_file = "Credentials/Login.json";
9
if (file_exists($Login_file)){
10
$reader = file_get_contents($Login_file);
11
$Parser = json_decode($reader,true);
12
$Status = $Parser["Database"]["Status"];
13
if (($Status == "Active")){
14
header("Location: ../Login/Login.php");
15
}
16
elseif(($Status == "Deactive")) {
17
header("Location: ../Database/Main.php");
18
}
19
}
20
else {
21
echo "<script>
22
alert('INTERNAL ERROR MISSING: Credentials/Login.json EXIT SESSION');
23
</script>";
24
exit(0);
25
}
26
}
27
Active()
28
?>
29