예제 #1
0
파일: upgrade.php 프로젝트: noikiy/meilala
 public function ajax()
 {
     //ajax权限验证
     if (!$this->CheckAccess()) {
         $this->ajax['s'] = 0;
         //ajax操作失败
         $this->ajax['i'] = '您没有权限进行系统升级操作!';
         die($this->json->encode($this->ajax));
     }
     include $this->update_path . 'upgrade.php';
     $updateinfo = UpgradeSystem();
     if ($updateinfo !== true) {
         $this->ajax['s'] = 0;
         //ajax操作失败
         $this->ajax['i'] = '升级未完成! ' . $updateinfo;
     }
     die($this->json->encode($this->ajax));
 }
예제 #2
0
// |     Copyright  2010 - 2028 WeLive           |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+
define('AUTH', true);
include 'includes/welive.Core.php';
include BASEPATH . 'includes/welive.Admin.php';
if ($userinfo['usergroupid'] != 1) {
    exit;
}
$action = ForceIncomingString('action');
$upgradefinished = false;
// ############################### RUN  UPGRADES ###############################
if ($action == 'upgraderunning') {
    include BASEPATH . 'upgrade/upgrade.php';
    $upgradefinished = UpgradeSystem();
}
if ($action == 'deleteupgradefiles') {
    @unlink(BASEPATH . 'upgrade/upgrade.php');
    @unlink(BASEPATH . 'upgrade/version.php');
}
// ############################### DISPLAY UPGRADES #############################
$availableupgrades = 0;
if (file_exists(BASEPATH . 'upgrade/upgrade.php') and file_exists(BASEPATH . 'upgrade/version.php')) {
    $availableupgrades = 1;
}
if ($availableupgrades) {
    $updatestatus = '<span class=blue>已检测到升级程序, 请按提示进行升级!</span>';
} else {
    if ($upgradefinished) {
        $updatestatus = '<span class=green>系统升级已完成!</span>';