if ($step == 1) { showtablerow('class="header"', '', $lang['founder_upgrade_preupdatelist']); foreach ($updatefilelist as $file) { $file = '<em class="files bold">' . $file . '</em>'; showtablerow('', '', array($file)); } $linkurl = ADMINSCRIPT . '?action=' . $theurl . '&step=2'; showtablerow('', '', array($lang['founder_upgrade_store_directory'] . './data/update/Discuz! X' . $version . ' Release[' . $release . ']')); showtablerow('', '', array('<input type="button" class="btn" onclick="window.location.href=\'' . $linkurl . '\'" value="' . $lang['founder_upgrade_download'] . '">')); echo upgradeinformation(0); } elseif ($step == 2) { $fileseq = intval($_GET['fileseq']); $fileseq = $fileseq ? $fileseq : 1; if ($fileseq > count($updatefilelist)) { if ($upgradeinfo['isupdatedb']) { $discuz_upgrade->download_file($upgradeinfo, 'install/data/install.sql'); $discuz_upgrade->download_file($upgradeinfo, 'install/data/install_data.sql'); $discuz_upgrade->download_file($upgradeinfo, 'update.php', 'utility'); } $linkurl = 'action=' . $theurl . '&step=3'; cpmsg('upgrade_download_complete_to_compare', $linkurl, 'loading', array('upgradeurl' => upgradeinformation(0))); } else { $downloadstatus = $discuz_upgrade->download_file($upgradeinfo, $updatefilelist[$fileseq - 1], 'upload', $updatemd5filelist[$fileseq - 1]); if ($downloadstatus == 1) { $linkurl = 'action=' . $theurl . '&step=2&fileseq=' . $fileseq; cpmsg('upgrade_downloading_file', $linkurl, 'loading', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))); } elseif ($downloadstatus == 2) { $linkurl = 'action=' . $theurl . '&step=2&fileseq=' . ($fileseq + 1); cpmsg('upgrade_downloading_file', $linkurl, 'loading', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))); } else { cpmsg('upgrade_redownload', 'action=' . $theurl . '&step=2&fileseq=' . $fileseq, 'form', array('file' => $updatefilelist[$fileseq - 1], 'upgradeurl' => upgradeinformation(-3)));