public function check()
 {
     $discuz_patch = new discuz_patch();
     $discuz_patch->check_patch();
     $discuz_patch = new discuz_patch();
     $patchnum = 0;
     $patchnotice = $discuz_patch->fetch_patch_notice();
     if ($patchnotice['data']) {
         foreach ($patchnotice['data'] as $patch) {
             if ($patch['status'] <= 0) {
                 $patchnum++;
             }
         }
     }
     if ($patchnum) {
         $return = array('status' => 1, 'type' => 'header', 'lang' => lang('optimizer', 'optimizer_patch_have', array('patchnum' => $patchnum)));
     } else {
         $return = array('status' => 0, 'type' => 'none', 'lang' => lang('optimizer', 'optimizer_patch_check_safe'));
     }
     return $return;
 }
示例#2
0
 *      $Id: misc_patch.php 30849 2012-06-26 02:21:32Z zhangguosheng $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if ($_GET['action'] == 'checkpatch') {
    header('Content-Type: text/javascript');
    if ($_G['uid'] && $_G['member']['allowadmincp'] == 1) {
        $discuz_patch = new discuz_patch();
        $discuz_patch->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 .= '<div class="bm' . ($patchnotice['fixed'] ? ' allfixed' : '') . '"><div class="bm_h cl"><a href="javascript:;" onclick="$(\'patch_notice\').style.display=\'none\'" class="y" title="' . $lang['patch_close'] . '">' . $lang['patch_close'] . '</a><h2 class="i">';
            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 .= '</h2></div><div class="bm_c"><table width="100%" class="mbm"><tr><th>' . $lang['patch_name'] . '</th><th class="patchdate">' . $lang['patch_dateline'] . '</th><th class="patchstat">' . $lang['patch_status'] . '</th><tr>';
            foreach ($patchnotice['data'] as $notice) {
                $patchlist .= '<tr><td>' . $notice['serial'] . '</td><td>' . dgmdate($notice['dateline'], 'Y-m-d') . '</td><td>';
                if ($notice['status'] >= 1) {
                    $patchlist .= '<span class="fixed">' . $lang['patch_fixed_status'] . '<span>';
                } elseif ($notice['status'] < 0) {
示例#3
0
	}
}
require './source/admincp/admincp_menu.php';
$basescript = ADMINSCRIPT;

//vot Multi-Lingual
$change_language = cplang('change_language');
$lang_list='';
foreach($_G['config']['languages'] AS $lng => $lngarray) {
  $lang_list .= '	<a href="javascript:;" onclick="setlang(\''.$lng.'\')" title="'.$lngarray['title'].'">
	<img src="'.$_G[siteroot].'source/language/'.$lng.'/'.$lngarray['icon'].'"/> '.$lngarray['name'].'
      	</a>'."\n";
}
$shownotice = '';
if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && ($_G['setting']['showpatchnotice'] == 1 || !isset($_G['cookie']['checkpatch']))) {
	$discuz_patch = new discuz_patch();
	if($_G['setting']['showpatchnotice'] == 1) {
		$notice = $discuz_patch->fetch_patch_notice();
		if($notice['data']) {
			$shownotice = '<div class="notice"><a href="'.$basescript.'?action=patch" id="notice">'.($notice['fixed'] ? $lang['patch_fix_complete'] : $lang['patch_fix_rigth_now']).'</a></div>';
		}
	}
	if(!isset($_G['cookie']['checkpatch'])) {
		$discuz_patch->check_patch();
	}
}
if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !$shownotice && $_G['setting']['upgrade']) {
	$shownotice = '<div class="notice"><a href="'.$basescript.'?action=upgrade" id="notice">'.$lang['upgrade_right_now'].'</a></div>';
}
if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !isset($_G['cookie']['checkupgrade'])) {
	$discuz_upgrade = new discuz_upgrade();
示例#4
0
<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: cron_checkpatch_daily.php 23672 2011-08-03 06:27:03Z svn_project_zhangjie $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$discuz_patch = new discuz_patch();
$discuz_patch->check_patch();
示例#5
0
<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: admincp_patch.php 29258 2012-03-31 03:56:17Z zhengqingpeng $
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
cpheader();
$operation = in_array($operation, array('patchsetting', 'fixpatch', 'checkpatch', 'recheckpatch')) ? $operation : 'checkpatch';
$discuz_patch = new discuz_patch();
if ($operation == 'patchsetting') {
    $save_master = C::t('common_setting')->fetch_all(array('mastermobile', 'masterqq', 'masteremail'));
    $save_mastermobile = $save_master['mastermobile'];
    $save_mastermobile = !empty($save_mastermobile) ? authcode($save_mastermobile, 'DECODE', $_G['config']['security']['authkey']) : '';
    if (!submitcheck('settingsubmit')) {
        $view_mastermobile = !empty($save_mastermobile) ? substr($save_mastermobile, 0, 3) . '*****' . substr($save_mastermobile, -3) : '';
        shownav('founder', 'nav_founder_patch');
        showsubmenu('nav_founder_patch', array(array('founder_patch_list', 'patch&operation=fixpatch', 0), array('founder_patch_updatesetting', 'patch&operation=patchsetting', 1)));
        showformheader('patch&operation=patchsetting');
        showtableheader();
        showsetting('founder_patch_autoupdate', 'settingnew[patch][autoopened]', $_G['setting']['patch']['autoopened'], 'radio');
        showsubmit('settingsubmit', 'submit');
        showtablefooter();
        showformfooter();
    } else {
        $settings = array();
        $settingnew = $_POST['settingnew'];