} function waitingdb($curstep, $sqlarray) { global $theurl; foreach($sqlarray as $key => $sql) { $sqlurl .= '&sql[]='.md5($sql); $sendsql .= '<img width="1" height="1" src="'.$theurl.'?step='.$curstep.'&waitingdb=1&sqlid='.$key.'">'; } show_msg("Tối ưu hóa các bảng dữ liệu", $theurl.'?step=waitingdb&nextstep='.$curstep.$sqlurl.'&sendsql='.base64_encode($sendsql), 5000, 1); } if(empty($_GET['step'])) $_GET['step'] = 'start'; if($_GET['step'] == 'start') { include_once('../config/config_ucenter.php'); include_once('../uc_client/client.php'); $version = uc_check_version(); $version = $version['db']; if(!$devmode && !C::t('common_setting')->fetch('bbclosed')) { C::t('common_setting')->update('bbclosed', 1); require_once libfile('function/cache'); updatecache('setting'); show_msg('Forum của bạn chưa được đóng cửa, chúng tôi sẽ tự động đóng cửa xin chờ trong giây lát....', $theurl.'?step=start', 5000); } if(version_compare($version, '1.5.2') <= 0) { show_msg('Bạn phải nâng cấp UCenter lên version 1.6.0 mới có thể update được。<br>Vui lòng tải UCenter 1.6.0 tại forum support sau đó xóa toàn bộ dữ liệu trong ./uc_server chỉ trừ file ./uc_server/data/config.inc.php rồi chạy chương trình update để nâng cấp.'); } else { show_msg('Mô tả <br> Quá trình nâng cấp sẽ dùng file install.sql mới nhất, để đồng bộ hóa và nâng cấp dữ liệu。<br> Hãy chắc file ./data/install.sql sử dụng phiên bản mới nhất.<br><br> Trước khi nâng cấp vui lòng đóng tất cả các Plugin đang hoạt động để đảm bảo quá trình nâng cấp điễn ra tốt hơn.<br><br> <a href="'.$theurl.'?step=prepare'.($_GET['from'] ? '&from='.rawurlencode($_GET['from']).'&frommd5='.rawurlencode($_GET['frommd5']) : '').'">Bất đầu quá trình Update.</a>'); }
将程序包 ./upload/ 目录中,除 config.new.php 文件、./install/ 目录以外的其他所有文件,全部上传并覆盖当前程序。<b>特别注意的是,最新数据库结构 ./data/install.sql 文件不要忘记上传,否则会导致升级失败</b>;<br><br> <b>第三步:</b><br> 确认已经将程序包 ./update 目录中最新的 update.php 升级程序上传到服务器程序根目录中<br> <br><br> <a href="update.php?step=check">已经做好了以上工作,升级开始</a><br><br> 特别提醒:为了数据安全,升级完毕后,不要忘记删除本升级文件。 </div> '); } elseif ($_GET['step'] == 'check') { //UCenter_Client include_once S_ROOT . './uc_client/client.php'; if (!function_exists('uc_check_version')) { show_msg('请将SupeSite程序包中最新版本的 ./upload/uc_client 上传至程序根目录覆盖原有目录和文件后,再尝试升级。'); } $uc_root = get_uc_root(); $return = uc_check_version(); if (empty($return)) { $upgrade_url = 'http://' . $_SERVER['HTTP_HOST'] . $PHP_SELF . '?step=sql'; } else { if ($return['db'] == '1.5.0') { header("Location: update.php?step=sql"); //UC升级完成 exit; } $upgrade_url = 'http://' . $_SERVER['HTTP_HOST'] . $PHP_SELF . '?step=check'; } $ucupdate = UC_API . "/upgrade/upgrade2.php?action=db&forward=" . urlencode($upgrade_url); show_msg('<b>您的 UCenter 程序还没有升级完成,请如下操作:</b><br>SupeSite支持了最新版本的UCenter,请先升级您的UCenter。<br><br> 1. <a href="http://download.comsenz.com/UCenter/1.5.0/" target="_blank">点击这里下载对应编码的 UCenter 1.5.0 程序</a><br> 2. 将解压缩得到的 ./upload 目录下的程序覆盖到已安装的UCenter目录 <b>' . ($uc_root ? $uc_root : UC_API) . '</b><br> (确保其升级程序 <b>./upgrade/upgrade2.php</b> 也已经上传到UCenter的 ./upgrade 目录)<br><br>