header('Content-Type: text/html; charset=utf-8'); define("DCRM", true); error_reporting(E_ALL ^ E_WARNING); require_once 'function.php'; $header_title = __('Installer'); // 检查数据库配置文件 if (!file_exists(CONF_PATH . 'connect.inc.php')) { header('location: setup-config.php?' . $step_language); exit; } // 检查环境 $disabled = true; $env_vars = check_env($disabled); $dir_file_vars = check_dir($disabled); $func_vars = check_func($disabled); $notice = check_notice(true); $step = isset($_GET['step']) ? $_GET['step'] : 0; require_once CONF_PATH . 'connect.inc.php'; // Test Connect $con = mysql_connect(DCRM_CON_SERVER . ':' . (defined("DCRM_CON_SERVER_PORT") ? DCRM_CON_SERVER_PORT : '3306'), DCRM_CON_USERNAME, DCRM_CON_PASSWORD); if (!$con) { $inst_alert = mysql_error(); _e('<strong>ERROR</strong>: Can’t connect database server.') . '<br/>' . $inst_alert; exit; } // Make sure DCRM is not already installed. // Check installed.lock file. if (!defined("DEVELOP_ENABLED")) { if (file_exists(CONF_PATH . 'installed.lock')) { display_header(); echo '<h1>' . __('Already Installed') . '</h1><p>' . __('You appear to have already installed DCRM. You should delete /system/config/installed.lock before reinstall.') . '</p><p class="step"><a href="../manage/login.php" class="button button-large">' . __('Log In') . '</a></p></body></html>';
* (at your option) any later version. * * WEIPDCRM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with WEIPDCRM. If not, see <http://www.gnu.org/licenses/>. */ header('Content-Type: text/html; charset=utf-8'); define("DCRM", true); error_reporting(E_ALL ^ E_WARNING); require_once 'function.php'; $header_title = __('Configuration Wizard'); $notice = check_notice($install = false); $step = isset($_GET['step']) ? $_GET['step'] : 0; $disabled = true; $env_vars = check_env($disabled); $dir_file_vars = check_dir($disabled); $func_vars = check_func($disabled); if ($step != 0 && $step != 1 && $disabled == false) { header('location: setup-config.php?step=1&' . $step_language); exit; } switch ($step) { case 0: display_header($notice); if (empty($notice) && available(BASE_URL . 'rewritetest') !== 200) { ?> <div class="alert alert-warning"><strong><?php