forked from aerograf/xtorrent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
69 lines (64 loc) · 1.99 KB
/
header.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
<?php
include_once __DIR__ . '/../../mainfile.php';
include XOOPS_ROOT_PATH . '/modules/xtorrent/include/functions.php';
$moduleHandler = xoops_getHandler('module');
$configHandler = xoops_getHandler('config');
$xoopsModule = $moduleHandler->getByDirname('xtorrent');
$xoopsModuleConfig = $configHandler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
error_reporting(E_ALL);
if (!function_exists('xoops_sef')){
function xoops_sef($datab, $char ='-')
{
$replacement_chars = [];
$accepted = [
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'm',
'o',
'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z',
'0',
'9',
'8',
'7',
'6',
'5',
'4',
'3',
'2',
'1'
];
for($i=0; $i < 256; $i++)
{
if (!in_array(strtolower(chr($i)), $accepted))
{
$replacement_chars[] = chr($i);
}
}
$return_data = (str_replace($replacement_chars,$char,$datab));
#print $return_data . "<BR><BR>";
return($return_data);
}
}
$myts = MyTextSanitizer::getInstance(); // MyTextSanitizer object