-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFunctions.php
39 lines (36 loc) · 918 Bytes
/
Functions.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
<?php
function Command_List($disabled_commands) {
$dir = opendir('Commands');
while (($file = readdir($dir)) !== false) {
if ($file !== '.' && $file !== '..') {
$file = substr($file, 0, -4);
if (!isset($disabled_commands[$file])) {
$function_list[$file] = true;
}
}
}
closedir($dir);
return $function_list;
}
function Admin_Command_List($disabled_commands) {
$dir = opendir('Commands/Admin');
while (($file = readdir($dir)) !== false) {
if ($file !== '.' && $file !== '..') {
$file = substr($file, 0, -4);
if (!isset($disabled_commands[$file])) {
$function_list[$file] = true;
}
}
}
closedir($dir);
return $function_list;
}
function Phrase_Text($Line, $Out) {
$Output = array_slice($Line, $Out);
$Output = implode(" ", $Output);
return $Output;
}
function escape($str) {
return mysql_escape_string(stripslashes(trim($str)));
}
?>