설치 스크립트 수정

This commit is contained in:
chicpro
2013-12-09 09:07:12 +09:00
parent 14fe0a4e03
commit 206cff9d34
2 changed files with 7 additions and 5 deletions

View File

@ -18,13 +18,13 @@ if (!$title) $title = G5_VERSION." 설치";
<span id="bar_txt">INSTALLATION</span>
</div>
<h1><?php echo $title ?></h1>
<?php
// 파일이 존재한다면 설치할 수 없다.
$dbconfig_file = $data_path.'/'.G5_DBCONFIG_FILE;
if (file_exists($dbconfig_file)) {
?>
<h1><?php echo G5_VERSION; ?> 프로그램이 이미 설치되어 있습니다.</h1>
<div class="ins_inner">
<p>프로그램이 이미 설치되어 있습니다.<br />새로 설치하시려면 다음 파일을 삭제 하신 후 새로고침 하십시오.</p>
<ul>
@ -42,6 +42,8 @@ $exists_data_dir = true;
if (!is_dir($data_path))
{
?>
<h1><?php echo G5_VERSION; ?> 설치를 위해 아래 내용을 확인해 주십시오.</h1>
<div class="ins_inner">
<p>
루트 디렉토리에 아래로 <?php echo G5_DATA_DIR ?> 디렉토리를 생성하여 주십시오.<br />
@ -60,8 +62,8 @@ if (!is_dir($data_path))
$write_data_dir = true;
// data 디렉토리에 파일 생성 가능한지 검사.
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cgi') {
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cgi') {
if (!(is_readable($data_path) && is_executable($data_path)))
{
?>

View File

@ -10,7 +10,7 @@ include_once ('../config.php');
$title = G5_VERSION." 초기환경설정 2/3";
include_once ('./install.inc.php');
if (isset($_POST['agree']) && $_POST['agree'] != '동의함') {
if (!isset($_POST['agree']) || $_POST['agree'] != '동의함') {
echo "<div>라이센스(License) 내용에 동의하셔야 설치를 계속하실 수 있습니다.</div>".PHP_EOL;
echo "<div><a href=\"./\">뒤로가기</a></div>".PHP_EOL;
exit;