Example #1
0
<?php

if (!defined('IN_DZZ')) {
    exit('Access Denied');
}
include_once DZZ_ROOT . './core/core_version.php';
if ($_GET['action'] == 'checkupgrade') {
    header('Content-Type: text/javascript');
    if ($_G['uid'] && $_G['member']['adminid'] == 1) {
        $dzz_upgrade = new dzz_upgrade();
        $dzz_upgrade->check_upgrade();
        dsetcookie('checkupgrade', 1, 60 * 60 * 24);
    }
    exit;
} elseif ($_GET['action'] == 'upgradenotice') {
    $html = '';
    $list = array();
    if ($_G['member']['adminid'] == 1) {
        $notelist = '';
        $dbversion = helper_dbtool::dbversion();
        $appid = C::t('app_market')->fetch_appid_by_mod('mod=system');
        foreach ($_G['setting']['upgrade'] as $type => $upgrade) {
            if (version_compare($upgrade['phpversion'], PHP_VERSION) > 0 || version_compare($upgrade['mysqlversion'], $dbversion) > 0) {
                $list[$type]['note'] = '要求配置达到 php v' . PHP_VERSION . 'MYSQL v' . $dbversion;
            }
            $list[$type]['appid'] = $appid;
            $list[$type]['official'] = '<a class="btn btn-link" href="' . $upgrade['official'] . '" target="_blank" onclick="jQuery(\'#notice\').hide();">查看详细</a>';
            $list[$type]['title'] = 'DzzOffice' . $upgrade['latestversion'];
            $list[$type]['appurl'] = 'admin.php?mod=system&op=upgrade';
            //&operation='.$type.'&version='.$upgrade['latestversion'].'&locale='.$locale.'&charset='.$charset.'&release='.$upgrade['latestrelease'];
        }
Example #2
0
/*
 * @copyright   Leyun internet Technology(Shanghai)Co.,Ltd
 * @license     http://www.dzzoffice.com/licenses/license.txt
 * @package     DzzOffice
 * @link        http://www.dzzoffice.com
 * @author      zyx(zyx@dzz.cc)
 */
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
    exit('Access Denied');
}
@set_time_limit(0);
include_once DZZ_ROOT . './core/core_version.php';
include_once libfile('function/admin');
include_once libfile('function/cache');
$dzz_upgrade = new dzz_upgrade();
$step = intval($_GET['step']);
$step = $step ? $step : 1;
$operation = $_GET['operation'] ? trim($_GET['operation']) : 'check';
$steplang = array('', lang('template', 'founder_upgrade_updatelist'), lang('template', 'founder_upgrade_download'), lang('template', 'founder_upgrade_compare'), lang('template', 'founder_upgrade_upgrading'), lang('template', 'founder_upgrade_complete'), 'dbupdate' => lang('template', 'founder_upgrade_dbupdate'));
if ($operation == 'patch' || $operation == 'cross') {
    if (!$_G['setting']['bbclosed']) {
        $msg = '<p style="margin:10px 0;color:red">' . lang('template', 'upgrade_close_site') . '</p>';
        $msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.reload();" value="' . lang('template', 'founder_upgrade_reset') . '" /></p>';
        $msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
        $msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('template', 'message_return') . "</a>');";
        $msg .= "</script></p>";
        if (!$_GET['iframe']) {
            include template('upgrade');
            exit;
        } else {