-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalytics.inc.php
More file actions
35 lines (31 loc) · 1.48 KB
/
Copy pathanalytics.inc.php
File metadata and controls
35 lines (31 loc) · 1.48 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
<?PHP (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) && die('Access Denied');
/*
[DISCUZ!] dps_exadmincp/analytics.inc.php - 关于谷歌分析
Version: 0.01
Author: Bovvic(671064591@qq.com)
Copyright: For author
Last Modified: 2012.12.05
*/
global $_G;
$identifier = "dps_header";
cpheader();
if(!submitcheck('analyticssubmit')) {
$setting = C::t('common_setting')->fetch_all(array('analytics'));
$setting['analytics'] = (array)dunserialize($setting['analytics']);
showformheader('plugins&operation=config&do='.$pluginid.'&identifier='.$identifier.'&pmod=analytics');
showtableheader();
showsetting('启用谷歌分析', 'analyticsnew[allow]', $setting['analytics']['allow'], 'radio', 0, 1);
showsetting('谷歌分析媒体资源ID', 'analyticsnew[_setAccount]', $setting['analytics']['_setAccount'], 'text');
//showsetting('站点域名', 'analyticsnew[siteurl]', $siteurl, 'text');
showsetting('跟踪站点加载速度的采样率', 'analyticsnew[_setSiteSpeedSampleRate]', $setting['analytics']['_setSiteSpeedSampleRate'], 'text');
showtagfooter('tbody');
showsubmit('analyticssubmit');
showtablefooter();
showformfooter();
//echo $siteurl;
} else {
$analyticsnew = serialize($_GET['analyticsnew']);
C::t('common_setting')->update('analytics', $analyticsnew);
updatecache(array('setting'));
cpmsg('setting_update_succeed', 'action=plugins&operation=config&do='.$pluginid.'&identifier='.$identifier.'&pmod=analytics', 'succeed');
}