helper_manyou.php
1.56 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
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: helper_manyou.php 27449 2012-02-01 05:32:35Z zhangguosheng $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class helper_manyou {
public static function manyoulog($logtype, $uids, $action, $fid = '') {
global $_G;
if($_G['setting']['my_app_status'] && $logtype == 'user') {
$action = daddslashes($action);
$values = array();
$uids = is_array($uids) ? $uids : array($uids);
foreach($uids as $uid) {
$uid = intval($uid);
C::t('common_member_log')->insert(array('uid' => $uid, 'action' => $action, 'dateline' => TIMESTAMP), false, true);
}
}
}
public static function getuserapp($panel = 0) {
require_once libfile('function/manyou');
manyou_getuserapp($panel);
return true;
}
public static function getmyappiconpath($appid, $iconstatus=0) {
if($iconstatus > 0) {
return getglobal('setting/attachurl').'./'.'myapp/icon/'.$appid.'.jpg';
}
return 'http://appicon.manyou.com/icons/'.$appid;
}
public static function checkupdate() {
global $_G;
if($_G['setting']['my_app_status'] && empty($_G['setting']['my_closecheckupdate']) && $_G['group']['radminid'] == 1) {
$sid = $_G['setting']['my_siteid'];
$ts = $_G['timestamp'];
$key = md5($sid.$ts.$_G['setting']['my_sitekey']);
echo '<script type="text/javascript" src="http://notice.uchome.manyou.com/notice?sId='.$sid.'&ts='.$ts.'&key='.$key.'" charset="UTF-8"></script>';
}
}
}
?>