-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFunctions.php
72 lines (53 loc) · 1.21 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
if (function_exists("Sanitize_Title") == False) {
function Sanitize_Title($title, $remove_dot = True) {
global $File;
if (
strlen($title) > 1 and
$title[0].$title[1] == ": "
) {
$title = substr($title, 2);
}
if (str_contains($title, ". ")) {
$title = str_replace(". ", " ", $title);
}
if (
$remove_dot == True and
str_contains($title, ".")
) {
$title = str_replace(".", "", $title);
}
$title = $File -> Sanitize($title);
return $title;
}
}
if (function_exists("Define_Title") == False) {
function Define_Title($array) {
global $Language;
global $language;
$key = "Original";
if (array_key_exists($language, $array) == True) {
$key = $language;
}
elseif (array_key_exists("Romanized", $array) == True) {
$key = "Romanized";
}
return $array[$key];
}
}
if (function_exists("Get_URL_Parameters") == False) {
function Get_URL_Parameters() {
$query_string = explode("&", $_SERVER["QUERY_STRING"]);
$parameters = array();
foreach ($query_string as $query) {
$explode = explode("=", $query);
$key = $explode[0];
if (isset($explode[1])) {
$value = $explode[1];
$parameters[$key] = $value;
}
}
return $parameters;
}
}
?>