forked from Talishar/Talishar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerChecker.php
More file actions
41 lines (34 loc) · 868 Bytes
/
ServerChecker.php
File metadata and controls
41 lines (34 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
include "Libraries/SHMOPLibraries.php";
include "HostFiles/Redirector.php";
include "CardDictionary.php";
include_once 'MenuBar.php';
include_once "./AccountFiles/AccountDatabaseAPI.php";
include_once './includes/functions.inc.php';
include_once './includes/dbh.inc.php';
define('ROOTPATH', __DIR__);
$path = ROOTPATH . "/Games";
$reactFE = "https://fe.talishar.net/game/play";
echo ("<div class='SpectatorContainer'>");
echo ("</div>");
function deleteDirectory($dir)
{
if (!file_exists($dir)) {
return true;
}
if (!is_dir($dir)) {
$handler = fopen($dir, "w");
fwrite($handler, "");
fclose($handler);
return unlink($dir);
}
foreach (scandir($dir) as $item) {
if ($item == '.' || $item == '..') {
continue;
}
if (!deleteDirectory($dir . "/" . $item)) {
return false;
}
}
return rmdir($dir);
}