check_patch();
}
exit;
} elseif($_GET['action'] == 'patchnotice') {
$patchlist = '';
if($_G['member']['allowadmincp'] == 1) {
$discuz_patch = new discuz_patch();
$patchnotice = $discuz_patch->fetch_patch_notice();
if(!empty($patchnotice['data'])) {
$lang = lang('forum/misc');
$patchlist .= '
'.$lang['patch_close'].'';
if($patchnotice['fixed']) {
$patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_is_fixed'];
} else {
$patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_need_fix'];
}
$patchlist .= '
'.$lang['patch_name'].' | '.$lang['patch_dateline'].' | '.$lang['patch_status'].' |
---|
';
foreach($patchnotice['data'] as $notice) {
$patchlist .= '
'.$notice['serial'].' | '.dgmdate($notice['dateline'], 'Y-m-d').' | ';
if($notice['status'] >= 1) {
$patchlist .= ''.$lang['patch_fixed_status'].'';
} elseif($notice['status'] < 0) {
$patchlist .= ''.$lang['patch_fix_failed_status'].'';
} else {
$patchlist .= ''.$lang['patch_unfix_status'].'';
}
$patchlist .= ' |
';
}
$patchlist .= '
'.($patchnotice['fixed'] ? $lang['patch_view_fix_detail'] : $lang['patch_fix_right_now']).'
';
$patchlist .= '
';
}
}
include template('common/header_ajax');
echo $patchlist;
include template('common/footer_ajax');
exit;
} elseif($_GET['action'] == 'pluginnotice') {
require_once libfile('function/admincp');
require_once libfile('function/plugin');
require_once libfile('function/cloudaddons');
$pluginarray = C::t('common_plugin')->fetch_all_data();
$addonids = $vers = array();
foreach($pluginarray as $row) {
if(ispluginkey($row['identifier'])) {
$addonids[] = $row['identifier'].'.plugin';
$vers[$row['identifier'].'.plugin'] = $row['version'];
}
}
$checkresult = dunserialize(cloudaddons_upgradecheck($addonids));
savecache('addoncheck_plugin', $checkresult);
$newversion = 0;
foreach($checkresult as $addonid => $value) {
list(, $newver, $sysver) = explode(':', $value);
if($sysver && $sysver > $vers[$addonid] || $newver) {
$newversion++;
}
}
include template('common/header_ajax');
if($newversion) {
$lang = lang('forum/misc');
echo '';
echo '
'.lang('forum/misc', 'plugin_memo', array('number' => $newversion)).'
';
echo '
';
echo '
';
}
include template('common/footer_ajax');
exit;
} elseif($_GET['action'] == 'ipnotice') {
require_once libfile('function/misc');
include template('common/header_ajax');
if($_G['cookie']['lip'] && $_G['cookie']['lip'] != ',' && $_G['uid'] && $_G['setting']['disableipnotice'] != 1) {
$status = C::t('common_member_status')->fetch($_G['uid']);
$lip = explode(',', $_G['cookie']['lip']);
$lastipConvert = convertip($lip[0]);
$lastipDate = dgmdate($lip[1]);
$nowipConvert = convertip($status['lastip']);
$lastipConvert = process_ipnotice($lastipConvert);
$nowipConvert = process_ipnotice($nowipConvert);
if($lastipConvert != $nowipConvert && stripos($lastipConvert, $nowipConvert) == false && stripos($nowipConvert, $lastipConvert) == false) {
$lang = lang('forum/misc');
include template('common/ipnotice');
}
}
include template('common/footer_ajax');
exit;
}
?>