This repository has been archived by the owner on Jul 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manager.php
61 lines (52 loc) · 1.63 KB
/
manager.php
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
include 'inc/fonction.inc';
include 'inc/config.inc';
$verif = fonction_account_verif();
if (@$verif[connect] === FALSE) header('location: index.php');
$folder_list = scandir("mod/");
$list_mod = array();
var_dump($folder_list);
$mysqli_connect = mysqli_connect($config_mysqli_host, $config_mysqli_user, $config_mysqli_mdp, $config_mysqli_db);
if(mysqli_errno($mysqli_connect))
trigger_error("Echec requête MySQL : ".mysqli_errno($mysqli_connect)." : ".mysqli_error($mysqli_connect), E_USER_ERROR);
for ($i=2; $i < count($folder_list); $i++) {
$mysqli_result = mysqli_query($mysqli_connect, "SELECT * FROM `" . $config_mysqli_table_module . "` WHERE `nom` LIKE '" . $folder_list[$i] . "'");
if(mysqli_errno($mysqli_connect))
trigger_error("Echec requête MySQL : ".mysqli_errno($mysqli_connect)." : ".mysqli_error($mysqli_connect), E_USER_ERROR);
while ($mysqli_row = mysqli_fetch_assoc($mysqli_result)) {
$list_mod[$i]["actif"] = "Oui";
$list_mod[$i]["nom"] = $folder_list[$i];
$list_mod[$i]["cron"] = $mysqli_row["cron"];
$list_mod[$i]["cron_time"] = $mysqli_row["cron_time"];
}
if (!isset($list_mod[$i])){
$list_mod[$i]["actif"] = "Non";
$list_mod[$i]["nom"] = $folder_list[$i];
$list_mod[$i]["cron"] = "";
$list_mod[$i]["cron_time"] = "";
}
}
var_dump($list_mod);
?>
<!DOCTYPE html>
<html lang=fr>
<head>
<title>
Major Bot : Manager
</title>
</head>
<body>
<div class=list_mod>
<?php
$i = 2;
while (@$folder_list[$i]){
echo
"<div id=mod>" .
$folder_list[$i++] .
"</div>"
;
}
?>
</div>
</body>
</html>