<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ goto rr_3w; Lq2Dr: define('INSTALL_LOCK_FILE', APP_PATH . '/storage/install.lock'); goto B_Eqn; OvqQQ: function env($ySsOv, $YoV0U = '') { goto vcW1F; ScRnX: return isset($GMPEM[$ySsOv]) ? $GMPEM[$ySsOv] : $YoV0U; goto b4ti3; vcW1F: static $GMPEM = null; goto POGVo; POGVo: if (null === $GMPEM) { $GMPEM = \ModStart\Core\Util\EnvUtil::all(ENV_FILE_EXAMPLE); } goto ScRnX; b4ti3: } goto OqoHE; PEMsw: function get_env_config($ySsOv, $xnV93 = '') { goto B_JpO; LLzwr: $ro25C = array('db_host' => 'DB_HOST', 'db_port' => 'DB_PORT', 'db_name' => 'DB_DATABASE', 'db_username' => 'DB_USERNAME', 'db_password' => 'DB_PASSWORD', 'db_prefix' => 'DB_PREFIX', 'admin_username' => 'ADMIN_USERNAME', 'admin_password' => 'ADMIN_PASSWORD'); goto AGDxn; LeXZl: $miITi = array('db_host' => array('DB_HOST', 'MYSQL_HOST'), 'db_port' => array('DB_DATABASE', 'MYSQL_PORT'), 'db_name' => array('DB_DATABASE', 'MYSQL_DB'), 'db_username' => array('DB_USERNAME', 'MYSQL_USER'), 'db_password' => array('DB_PASSWORD', 'MYSQL_PASSWORD'), 'db_prefix' => array('DB_PREFIX'), 'admin_username' => array('ADMIN_USERNAME'), 'admin_password' => array('ADMIN_PASSWORD')); goto KxO2a; KxO2a: if (isset($miITi[$ySsOv])) { foreach ($miITi[$ySsOv] as $d2HEV) { $hf0nR = @getenv($d2HEV); if (!empty($hf0nR)) { return $hf0nR; } } } goto LLzwr; AGDxn: if (isset($ro25C[$ySsOv])) { $hf0nR = env($ro25C[$ySsOv], null); if (!is_null($hf0nR)) { return $hf0nR; } } goto EgECp; apX6D: if (null == $ttIWF) { $ttIWF = array(); if (!empty($IiUDL = glob(APP_PATH . '/env.*.json'))) { foreach ($IiUDL as $yWiyg) { $Xprb2 = @json_decode(@file_get_contents($yWiyg), true); if (!empty($Xprb2)) { $ttIWF = array_merge($ttIWF, $Xprb2); } } } } goto tFmQj; EgECp: return $xnV93; goto tUX3C; tFmQj: if (isset($ttIWF[$ySsOv])) { return $ttIWF[$ySsOv]; } goto LeXZl; B_JpO: static $ttIWF = null; goto apX6D; tUX3C: } goto vtOhd; TLIYQ: function request_is_post() { return !empty($_POST); } goto NEZ54; c1ewv: function request_schema() { goto ISXHs; XbNgm: if (is_https()) { $XdHW_ = 'https'; } goto tUS_6; ISXHs: $XdHW_ = 'http'; goto XbNgm; tUS_6: return $XdHW_; goto zXGgj; zXGgj: } goto oZLvF; kneIv: if (file_exists($Qt3Da = APP_PATH . '/license_url.txt')) { define('LICENSE_URL', trim(file_get_contents($Qt3Da))); } goto yb2un; Tyrx1: function response_json_quit($wnufX, $wk1ic, $q62oK = null, $TWMed = null) { goto LK70a; PGeq5: echo json_encode(array('code' => $wnufX, 'msg' => $wk1ic, 'data' => $q62oK, 'redirect' => $TWMed)); goto b2x6D; LK70a: header('Content-type: application/json'); goto PGeq5; b2x6D: die; goto Dm473; Dm473: } goto c1ewv; J4ryV: if (!defined('INSTALL_APP_VERSION')) { define('INSTALL_APP_VERSION', '0.0.0'); } goto sC0gz; cwp9r: function php_is_laravel9() { return in_array(INSTALL_APP, array('CMS9', 'BLOG9')); } goto R3SDE; mQb81: function rewrite_check() { goto cARRU; r5EFT: $oHb9_ = \ModStart\Core\Util\CurlUtil::get($HheJC, array(), array('timeout' => 3)); goto zl3jm; srm1K: $r5olo = request_domain(); goto bTOE2; cARRU: if (file_exists(APP_PATH . '/storage/rewrite.skip')) { return array('code' => 0, 'msg' => 'ok'); } goto srm1K; pjtVb: if (!empty($oHb9_['error'])) { if (false !== strpos($oHb9_['error'], 'Resolving timed out')) { $hgOWv[] = "- 域名 {$r5olo} 解析失败（可能您没有解析域名）"; $hgOWv[] = "- 在服务器不能访问 {$HheJC} ，需要在程序中通过改地址访问到程序"; } else { $hgOWv[] = '- ERROR:' . $oHb9_['error']; } } goto ngMTF; VPPKT: return array('code' => -1, 'msg' => 'Rewrite规则错误可能原因（仅供参考）：<br/>' . join('<br/>', $hgOWv)); goto BnWAe; sC1bV: $hgOWv = array(); goto pjtVb; ngMTF: if (!empty($oHb9_['code'])) { if (!empty($oHb9_['body'])) { goto clKVa; yg6TB: $hgOWv[] = '- 程序出错:' . preg_replace('/\\s+/', ' ', preg_replace('/<[^>]+>/', '', $wk1ic)); goto Ygrjt; W80to: if (false !== $gIdrT) { $wk1ic = substr($wk1ic, 0, $gIdrT); } goto yg6TB; clKVa: $wk1ic = $oHb9_['body']; goto MrIr1; A6sVj: $gIdrT = strpos($oHb9_['body'], '</body>'); goto W80to; MxO2r: if (false !== $gIdrT) { $wk1ic = substr($wk1ic, $gIdrT); } goto A6sVj; MrIr1: $gIdrT = strpos($oHb9_['body'], '<body>'); goto MxO2r; Ygrjt: } } goto JGcav; JGcav: $hgOWv[] = "- 您还可以在浏览器访问 <a href='{$HheJC}' target='_blank'>{$HheJC}</a> 查看报错信息，调整配置保证测试页面提示“ok”字样"; goto VPPKT; bTOE2: $HheJC = request_url() . '/install/ping'; goto r5EFT; zl3jm: if ($oHb9_['body'] === 'ok') { return array('code' => 0, 'msg' => ''); } goto sC1bV; BnWAe: } goto OvqQQ; ujRx4: include APP_PATH . '/vendor/modstart/modstart/src/Core/Util/CurlUtil.php'; goto Od8LF; sV68s: include APP_PATH . '/vendor/modstart/modstart/src/Data/FileManager.php'; goto ZiNt1; DUSzn: function text_warning($wk1ic, $mQNKV = null) { echo '<div class="ub-alert warning">? ' . $wk1ic . ' ' . ($mQNKV ? '<a target="_blank" href="' . $mQNKV . '">解决办法</a>' : '') . '</div>'; } goto eBw6C; sC0gz: if (!file_exists(ENV_FILE)) { file_put_contents(ENV_FILE, 'APP_ENV=beta
APP_DEBUG=true
APP_KEY=' . \ModStart\Core\Util\RandomUtil::string(32)); } goto cwp9r; mtETL: function php_version_ok() { goto HeeAa; tLQar: if (version_compare(PHP_VERSION, '7.1.0', '>=')) { return false; } goto vGyBs; QtPZb: if (version_compare(PHP_VERSION, '5.5.9', '<')) { return false; } goto tLQar; vGyBs: return true; goto Z27fU; HeeAa: if (php_is_laravel9()) { if (version_compare(PHP_VERSION, '8.1.0', '<')) { return false; } return true; } goto QtPZb; Z27fU: } goto PEMsw; Od8LF: include APP_PATH . '/vendor/modstart/modstart/src/Core/Util/FileUtil.php'; goto Lq2Dr; ZiNt1: include APP_PATH . '/vendor/modstart/modstart/src/Core/Env/EnvUtil.php'; goto zBF3k; iwBjt: function text_success($wk1ic) { echo '<div class="ub-alert success">√ ' . $wk1ic . '</div>'; } goto iVVsq; B_Eqn: define('ENV_FILE_EXAMPLE', APP_PATH . '/env.example'); goto EX_7s; oZLvF: function request_domain() { return $_SERVER['HTTP_HOST']; } goto kNu4X; R3SDE: function php_version_requires() { if (php_is_laravel9()) { return join('，', array('8.1.x')); } return join(', ', array('5.6.x', '7.0.x')); } goto mtETL; kNu4X: function request_url() { return request_schema() . '://' . request_domain(); } goto TLIYQ; NEZ54: function is_https() { if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') { return true; } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { return true; } elseif (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') { return true; } return false; } goto kEWek; csZmZ: if (!defined('INSTALL_APP_NAME')) { if (defined('INSTALL_APP')) { define('INSTALL_APP_NAME', INSTALL_APP); } else { define('INSTALL_APP_NAME', 'APP'); } } goto J4ryV; AB0aL: include APP_PATH . '/vendor/modstart/modstart/src/Core/Util/RandomUtil.php'; goto ujRx4; wZ_Uy: if (class_exists(\App\Constant\AppConstant::class)) { goto c9W5A; a873M: if (defined('\\App\\Constant\\AppConstant::APP_NAME')) { define('INSTALL_APP_NAME', \App\Constant\AppConstant::APP_NAME); } goto ohbsx; ohbsx: if (defined('\\App\\Constant\\AppConstant::VERSION')) { define('INSTALL_APP_VERSION', \App\Constant\AppConstant::VERSION); } goto wxkab; c9W5A: if (defined('\\App\\Constant\\AppConstant::APP')) { define('INSTALL_APP', strtoupper(\App\Constant\AppConstant::APP)); } goto a873M; wxkab: } goto whzo2; kEWek: function request_post($d2HEV, $YoV0U = '') { return isset($_POST[$d2HEV]) ? $_POST[$d2HEV] : $YoV0U; } goto iwBjt; whzo2: if (!defined('INSTALL_APP')) { define('INSTALL_APP', 'APP'); } goto csZmZ; EX_7s: define('ENV_FILE', APP_PATH . '/.env'); goto kneIv; kq1vl: function env_writable() { goto eFldZ; eFldZ: $obXaA = APP_PATH . '/.env'; goto YbuCt; vkbEf: if (false === file_put_contents($obXaA, $fKViA)) { return false; } goto LNx5d; LNx5d: return true; goto mzDUN; YbuCt: if (!file_exists($obXaA)) { goto aV9sd; vCmw2: @unlink($obXaA); goto SO0W4; aV9sd: if (false === file_put_contents($obXaA, '')) { @unlink($obXaA); return false; } goto vCmw2; SO0W4: return true; goto l9TWC; l9TWC: } goto BdBic; BdBic: $fKViA = @file_get_contents($obXaA); goto vkbEf; mzDUN: } goto mQb81; xiaO1: if (file_exists($r6_O_ = APP_PATH . '/app/Constant/AppConstant.php')) { include $r6_O_; } goto sV68s; yb2un: if (file_exists($SmIaZ = APP_PATH . '/public/data_demo/data.php')) { define('DEMO_DATA', true); } goto wZ_Uy; vtOhd: function response_json_error_quit($wk1ic) { response_json_quit(-1, $wk1ic); } goto Tyrx1; iVVsq: function text_error($wk1ic, $mQNKV = null, $vXksR = true) { if ($vXksR) { error_counter(); } echo '<div class="ub-alert danger">× ' . $wk1ic . ' ' . ($mQNKV ? '<a target="_blank" href="' . $mQNKV . '">解决办法</a>' : '') . '</div>'; } goto DUSzn; eBw6C: function error_counter($P7FdV = 1) { goto woQzr; oxIXb: $SFL3A += $P7FdV; goto zjgzZ; zjgzZ: return $SFL3A; goto nxDZl; woQzr: static $SFL3A = 0; goto oxIXb; nxDZl: } goto kq1vl; zBF3k: include APP_PATH . '/vendor/modstart/modstart/src/Core/Util/EnvUtil.php'; goto AB0aL; rr_3w: define('APP_PATH', realpath(__DIR__ . '/../../../')); goto xiaO1; OqoHE: function is_dir_really_writable($vm4GG) { goto U3_JH; vmkpj: return true; goto avPST; h8JdV: @file_put_contents($GzI8A, 'test'); goto XZVym; xMxMd: if (file_get_contents($GzI8A) != 'test') { return false; } goto xTJj_; U3_JH: $vm4GG = rtrim($vm4GG, '/\\') . '/'; goto lL_h3; lL_h3: $GzI8A = $vm4GG . '.writable_test_file'; goto h8JdV; xTJj_: @unlink($GzI8A); goto vmkpj; XZVym: if (!file_exists($GzI8A)) { return false; } goto xMxMd; avPST: }