-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhooker.class.php
More file actions
57 lines (46 loc) · 1.34 KB
/
Copy pathhooker.class.php
File metadata and controls
57 lines (46 loc) · 1.34 KB
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
<?php
/*
[DISCUZ!] dps_exadmincp/hooker.class.php - 文件作用描述
Version: 0.01
Author: Bovvic(671064591@qq.com)
Copyright: For author
Last Modified: 2012.12.05
*/
class plugin_dps_header {
function __construct() {
}
function global_header_analytics() {
global $_G;
$siteurl = $_G['siteurl'];
$siteurl = preg_replace('/(http|https)\:\/\//i', '', $siteurl);
$siteurl = substr($siteurl, 0, strpos($siteurl, '/'));
$siteurl = substr($siteurl, strrpos($siteurl, '.', strrpos($siteurl, '.') - strlen($siteurl) - 1));
$analytics = (array)dunserialize($_G['setting']['analytics']);
include template('dps_header:_tpl_'.__FUNCTION__);
return $return;
}
function global_header_xmlns() {
global $_G;
$xmlnslist = (array)dunserialize($_G['setting']['xmlns']);
include template('dps_header:_tpl_'.__FUNCTION__);
return $return;
}
function global_header_meta() {
global $_G;
include template('dps_header:_tpl_'.__FUNCTION__);
return $return;
}
}
if(!function_exists('tmp')) {
function tmp($name = null) {
if($name === null) {
$backtrace = debug_backtrace();
$filename = basename($backtrace[0]['file']);
$dotpos = strpos($filename, '.');
$basename = substr($filename, 0, $dotpos);
} else {
$basename = $name;
}
return template(IDENTIFIER.':'.$basename);
}
}