설치: 설치 과정 스타일 완료

This commit is contained in:
whitedot
2013-03-08 10:11:19 +09:00
parent 5fa8c328f2
commit 2d0add10ce
3 changed files with 105 additions and 87 deletions

View File

@ -13,17 +13,18 @@ if (!$title) $title = "그누보드4S 설치";
<style> <style>
body {margin:0;padding:0;background:#f7f7f7} body {margin:0;padding:0;background:#f7f7f7}
h1 {margin:50px auto 30px;width:540px;font-size:1.4em} h1 {margin:50px auto 30px;width:540px;font-size:1.4em}
h2 {font-size:1.2em}
p {line-height:1.5em} p {line-height:1.5em}
table {width:100%;border-collapse:collapse;border-spacing:0;font-size:0.895em} table {width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:0.895em}
caption {padding:0 0 20px;font-weight:bold;text-align:left} caption {padding:0 0 20px;font-weight:bold;text-align:left}
th,td {padding:5px;border:1px solid #ddd} th,td {padding:5px;border:0;border-top:1px solid #ddd;border-bottom:1px solid #ddd}
th {text-align:left} th {text-align:left}
td span {display:block;margin:0 0 5px;color:#666;font-size:0.9em} td span {display:block;margin:0 0 5px;color:#666;font-size:0.9em}
#wrapper {margin:0 auto;padding:20px;width:500px;border:1px solid #eee;background:#fff} #wrapper {margin:0 auto 20px;padding:20px;width:500px;border:1px solid #eee;background:#fff}
#idx_license {padding:10px;width:480px;height:300px;border:1px solid #ccc;background:#000;color:#fff} #idx_license {padding:10px;width:480px;height:300px;border:1px solid #ccc;background:#000;color:#fff}
#idx_agree {padding:20px;font-weight:bold;text-align:center} #idx_agree {padding:0 20px 20px;font-weight:bold;text-align:center}
#btn_confirm {text-align:center} #btn_confirm {text-align:center}

View File

@ -11,9 +11,8 @@ header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0 header('Pragma: no-cache'); // HTTP/1.0
if ($_POST['agree'] != '동의함') { if ($_POST['agree'] != '동의함') {
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL; echo "<div>라이센스(License) 내용에 동의하셔야 설치를 계속하실 수 있습니다.</div>".PHP_EOL;
echo '<div>라이센스(License) 내용에 동의하셔야 설치를 계속하실 수 있습니다.</div>'.PHP_EOL; echo "<div><a href=\"./\">뒤로가기</a></div>".PHP_EOL;
echo '<div><a href="./">뒤로가기</a></div>'.PHP_EOL;
exit; exit;
} }
?> ?>
@ -105,7 +104,7 @@ if ($_POST['agree'] != '동의함') {
<p class="outside"> <p class="outside">
<strong class="st_strong">주의! 이미 그누보드4S가 존재한다면 DB 자료가 망실되므로 주의하십시오.</strong><br> <strong class="st_strong">주의! 이미 그누보드4S가 존재한다면 DB 자료가 망실되므로 주의하십시오.</strong><br>
주의사항을 읽으셨다면 다음을 눌러 설치를 계속하십시오. 주의사항을 이해하고, 새로 설치하시려면 다음을 눌러 설치를 계속하십시오.
</p> </p>
<div id="btn_confirm"> <div id="btn_confirm">

View File

@ -42,14 +42,10 @@ if (!$select_db) {
exit; exit;
} }
?> ?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>그누보드4 설치 (3/3) - DB</title>
</head>
<body> <h2>그누보드4S 설치가 시작되었습니다.</h2>
<div>그누보드4S 설치시작</div>
<ol>
<? <?
// 테이블 생성 ------------------------------------ // 테이블 생성 ------------------------------------
$file = implode('', file('./gnuboard4s.sql')); $file = implode('', file('./gnuboard4s.sql'));
@ -63,9 +59,11 @@ for ($i=0; $i<count($f); $i++) {
mysql_query($f[$i]) or die(mysql_error()); mysql_query($f[$i]) or die(mysql_error());
} }
// 테이블 생성 ------------------------------------ // 테이블 생성 ------------------------------------
?>
echo '<div>전체 테이블 생성 완료</div>'; <li>전체 테이블 생성 완료</li>
<?
$read_point = -1; $read_point = -1;
$write_point = 5; $write_point = 5;
$comment_point = 1; $comment_point = 1;
@ -107,7 +105,7 @@ $sql = " insert into `{$table_prefix}config`
cf_leave_day = '30', cf_leave_day = '30',
cf_search_part = '10000', cf_search_part = '10000',
cf_email_use = '1', cf_email_use = '1',
cf_prohibit_id = 'admin,administrator,관리자,운영자,어드민,주인장,webmaster,웹마스터,sysop,시삽,시샵,manager,매니저,메니저,root,루트,su,guest,방문객', cf_prohibit_id = 'admin,administrator,관리자,관리자,어드민,주인장,webmaster,웹마스터,sysop,시삽,시샵,manager,매니저,메니저,root,루트,su,guest,방문객',
cf_prohibit_email = '', cf_prohibit_email = '',
cf_new_del = '30', cf_new_del = '30',
cf_memo_del = '180', cf_memo_del = '180',
@ -128,7 +126,7 @@ $sql = " insert into `{$table_prefix}config`
"; ";
mysql_query($sql) or die(mysql_error() . "<p>" . $sql); mysql_query($sql) or die(mysql_error() . "<p>" . $sql);
// 운영자 회원가입 // 관리자 회원가입
$sql = " insert into `{$table_prefix}member` $sql = " insert into `{$table_prefix}member`
set mb_id = '$admin_id', set mb_id = '$admin_id',
mb_password = PASSWORD('$admin_pass'), mb_password = PASSWORD('$admin_pass'),
@ -143,11 +141,13 @@ $sql = " insert into `{$table_prefix}member`
mb_ip = '{$_SERVER['REMOTE_ADDR']}' mb_ip = '{$_SERVER['REMOTE_ADDR']}'
"; ";
@mysql_query($sql); @mysql_query($sql);
?>
echo '<div>DB설정 완료</div>'; <li>DB설정 완료</li>
<?
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
// 디렉토리 생성 // 디렉토리 생성
$dir_arr = array ( $dir_arr = array (
$data_path.'/cache', $data_path.'/cache',
@ -162,8 +162,11 @@ for ($i=0; $i<count($dir_arr); $i++) {
@mkdir($dir_arr[$i], 0707); @mkdir($dir_arr[$i], 0707);
@chmod($dir_arr[$i], 0707); @chmod($dir_arr[$i], 0707);
} }
?>
echo '<div>데이터 디렉토리 생성 완료</div>'; <li>데이터 디렉토리 생성 완료</li>
<?
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
// DB 설정 파일 생성 // DB 설정 파일 생성
@ -203,8 +206,11 @@ fwrite($f, "?>");
fclose($f); fclose($f);
@chmod($file, 0606); @chmod($file, 0606);
echo "<div>DB설정 파일 생성 완료 ($file)"; ?>
<li>DB설정 파일 생성 완료 (<?=$file?>)</li>
<?
// data 디렉토리 및 하위 디렉토리에서는 .htaccess .htpasswd .php .phtml .html .htm .inc .cgi .pl 파일을 실행할수 없게함. // data 디렉토리 및 하위 디렉토리에서는 .htaccess .htpasswd .php .phtml .html .htm .inc .cgi .pl 파일을 실행할수 없게함.
$f = fopen($data_path.'/.htaccess', 'w'); $f = fopen($data_path.'/.htaccess', 'w');
$str = <<<EOD $str = <<<EOD
@ -216,11 +222,23 @@ EOD;
fwrite($f, $str); fwrite($f, $str);
fclose($f); fclose($f);
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
echo '<div>필요한 DB Table, File, 디렉토리 생성을 모두 완료 하였습니다.</div>'.PHP_EOL;
echo '<div>메인화면에서 운영자 로그인을 한 후 운영자 화면으로 이동하여 환경설정을 변경해 주십시오.</div>';
echo '<div><a href="../index.php">메인화면으로 가기</a></div>';
?> ?>
</ol>
<p class="st_strong">축하합니다. 그누보드4S 설치가 완료되었습니다.</p>
<h2>환경설정 변경은 다음의 과정을 따르십시오.</h2>
<ol>
<li>메인화면으로 이동</li>
<li>관리자 로그인</li>
<li>관리자 모드 접속</li>
<li>환경설정 메뉴의 기본환경설정 페이지로 이동</li>
</ol>
</div>
<div id="btn_confirm"><a href="../index.php">메인화면으로 가기</a></div>
</body> </body>
</html> </html>