#133 에 따른 설치프로그램 수정

This commit is contained in:
chicpro
2013-05-06 18:43:07 +09:00
parent 225f3ec708
commit 5db1965de1
7 changed files with 114 additions and 97 deletions

BIN
install/company_h Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -63,6 +63,12 @@ if (isset($_POST['agree']) && $_POST['agree'] != '동의함') {
<input name="shop_prefix" type="text" value="shop_" id="shop_prefix"> <input name="shop_prefix" type="text" value="shop_" id="shop_prefix">
</td> </td>
</tr> </tr>
<tr>
<th scope="row"><label for="">그누보드4s 재설치</label></th>
<td>
<input name="g4s_install" type="checkbox" value="1" id="g4s_install">재설치
</td>
</tr>
<tr> <tr>
<th scope="row"><label for="">쇼핑몰설치</label></th> <th scope="row"><label for="">쇼핑몰설치</label></th>
<td> <td>

View File

@ -18,6 +18,7 @@ $mysql_user = $_POST['mysql_user'];
$mysql_pass = $_POST['mysql_pass']; $mysql_pass = $_POST['mysql_pass'];
$mysql_db = $_POST['mysql_db']; $mysql_db = $_POST['mysql_db'];
$table_prefix= $_POST['table_prefix']; $table_prefix= $_POST['table_prefix'];
$g4s_install = $_POST['g4s_install'];
$shop_prefix = $_POST['shop_prefix']; $shop_prefix = $_POST['shop_prefix'];
$shop_install= $_POST['shop_install']; $shop_install= $_POST['shop_install'];
$admin_id = $_POST['admin_id']; $admin_id = $_POST['admin_id'];
@ -48,6 +49,11 @@ if (!$select_db) {
<ol> <ol>
<?php <?php
$sql = " desc {$table_prefix}config";
$result = @mysql_query($sql);
// 그누보드4s 재설치에 체크하였거나 그누보드4s가 설치되어 있지 않다면
if($g4s_install || !$result) {
// 테이블 생성 ------------------------------------ // 테이블 생성 ------------------------------------
$file = implode('', file('./gnuboard4s.sql')); $file = implode('', file('./gnuboard4s.sql'));
eval("\$file = \"$file\";"); eval("\$file = \"$file\";");
@ -59,6 +65,7 @@ for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == '') continue; if (trim($f[$i]) == '') continue;
mysql_query($f[$i]) or die(mysql_error()); mysql_query($f[$i]) or die(mysql_error());
} }
}
// 쇼핑몰 테이블 생성 ----------------------------- // 쇼핑몰 테이블 생성 -----------------------------
if($shop_install) { if($shop_install) {
@ -71,8 +78,6 @@ if($shop_install) {
if (trim($f[$i]) == '') continue; if (trim($f[$i]) == '') continue;
mysql_query($f[$i]) or die(mysql_error()); mysql_query($f[$i]) or die(mysql_error());
} }
$cf_title = '쇼핑몰';
} }
// 테이블 생성 ------------------------------------ // 테이블 생성 ------------------------------------
?> ?>
@ -87,8 +92,9 @@ $download_point = 0;
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
// config 테이블 설정 // config 테이블 설정
if($g4s_install || !$result) {
$sql = " insert into `{$table_prefix}config` $sql = " insert into `{$table_prefix}config`
set cf_title = '$cf_title', set cf_title = '그누보드4s',
cf_admin = '$admin_id', cf_admin = '$admin_id',
cf_use_point = '1', cf_use_point = '1',
cf_use_norobot = '1', cf_use_norobot = '1',
@ -162,6 +168,7 @@ $sql = " insert into `{$table_prefix}member`
mb_ip = '{$_SERVER['REMOTE_ADDR']}' mb_ip = '{$_SERVER['REMOTE_ADDR']}'
"; ";
@mysql_query($sql); @mysql_query($sql);
}
if($shop_install) { if($shop_install) {
// 이미지 사이즈 // 이미지 사이즈
@ -257,7 +264,7 @@ if($shop_install) {
de_sms_cont2 = '{이름}님 주문해주셔서 고맙습니다.\n{주문번호}\n{주문금액}원\n{회사명}', de_sms_cont2 = '{이름}님 주문해주셔서 고맙습니다.\n{주문번호}\n{주문금액}원\n{회사명}',
de_sms_cont3 = '{이름}님께서 주문하셨습니다.\n{주문번호}\n{주문금액}원\n{회사명}', de_sms_cont3 = '{이름}님께서 주문하셨습니다.\n{주문번호}\n{주문금액}원\n{회사명}',
de_sms_cont4 = '{이름}님 입금 감사합니다.\n{입금액}원\n주문번호:\n{주문번호}\n{회사명}', de_sms_cont4 = '{이름}님 입금 감사합니다.\n{입금액}원\n주문번호:\n{주문번호}\n{회사명}',
de_sms_cont5 = '{이름}님 배송합니다.\n택배:{택배회사}\n운송장번호:\n{운송장번호}\n{회사명}', de_sms_cont5 = '{이름}님 배송합니다.\n택배:{택배회사}\n운송장번호:\n{운송장번호}\n{회사명}'
"; ";
mysql_query($sql) or die(mysql_error() . "<p>" . $sql); mysql_query($sql) or die(mysql_error() . "<p>" . $sql);
@ -405,14 +412,7 @@ fwrite($f, "define('G4_MYSQL_HOST', '{$mysql_host}');\n");
fwrite($f, "define('G4_MYSQL_USER', '{$mysql_user}');\n"); fwrite($f, "define('G4_MYSQL_USER', '{$mysql_user}');\n");
fwrite($f, "define('G4_MYSQL_PASSWORD', '{$mysql_pass}');\n"); fwrite($f, "define('G4_MYSQL_PASSWORD', '{$mysql_pass}');\n");
fwrite($f, "define('G4_MYSQL_DB', '{$mysql_db}');\n\n"); fwrite($f, "define('G4_MYSQL_DB', '{$mysql_db}');\n\n");
if($shop_install) {
fwrite($f, "define('G4_USE_SHOP', true);\n\n");
fwrite($f, "define('G4_TABLE_PREFIX', '{$table_prefix}');\n");
fwrite($f, "define('SHOP_TABLE_PREFIX', '{$shop_prefix}');\n\n");
} else {
fwrite($f, "define('G4_TABLE_PREFIX', '{$table_prefix}');\n\n"); fwrite($f, "define('G4_TABLE_PREFIX', '{$table_prefix}');\n\n");
}
fwrite($f, "\$g4['write_prefix'] = G4_TABLE_PREFIX.'write_'; // 게시판 테이블명 접두사\n\n"); fwrite($f, "\$g4['write_prefix'] = G4_TABLE_PREFIX.'write_'; // 게시판 테이블명 접두사\n\n");
fwrite($f, "\$g4['auth_table'] = G4_TABLE_PREFIX.'auth'; // 관리권한 설정 테이블\n"); fwrite($f, "\$g4['auth_table'] = G4_TABLE_PREFIX.'auth'; // 관리권한 설정 테이블\n");
fwrite($f, "\$g4['config_table'] = G4_TABLE_PREFIX.'config'; // 기본환경 설정 테이블\n"); fwrite($f, "\$g4['config_table'] = G4_TABLE_PREFIX.'config'; // 기본환경 설정 테이블\n");
@ -435,8 +435,12 @@ fwrite($f, "\$g4['visit_table'] = G4_TABLE_PREFIX.'visit'; // 방문자 테이
fwrite($f, "\$g4['visit_sum_table'] = G4_TABLE_PREFIX.'visit_sum'; // 방문자 합계 테이블\n"); fwrite($f, "\$g4['visit_sum_table'] = G4_TABLE_PREFIX.'visit_sum'; // 방문자 합계 테이블\n");
fwrite($f, "\$g4['uniqid_table'] = G4_TABLE_PREFIX.'uniqid'; // 유니크한 값을 만드는 테이블\n"); fwrite($f, "\$g4['uniqid_table'] = G4_TABLE_PREFIX.'uniqid'; // 유니크한 값을 만드는 테이블\n");
fwrite($f, "\$g4['syndi_log_table'] = G4_TABLE_PREFIX.'syndi_log'; // 네이버 신디케이션 컨텐츠 삭제 로그 테이블\n"); fwrite($f, "\$g4['syndi_log_table'] = G4_TABLE_PREFIX.'syndi_log'; // 네이버 신디케이션 컨텐츠 삭제 로그 테이블\n");
fwrite($f, "?>");
if($shop_install) { if($shop_install) {
fwrite($f, "\n"); fwrite($f, "\n\n<?php\n");
fwrite($f, "define('G4_USE_SHOP', true);\n\n");
fwrite($f, "define('SHOP_TABLE_PREFIX', '{$shop_prefix}');\n\n");
fwrite($f, "\$g4['shop_default_table'] = SHOP_TABLE_PREFIX.'default'; // 쇼핑몰설정 테이블\n"); fwrite($f, "\$g4['shop_default_table'] = SHOP_TABLE_PREFIX.'default'; // 쇼핑몰설정 테이블\n");
fwrite($f, "\$g4['shop_banner_table'] = SHOP_TABLE_PREFIX.'banner'; // 배너 테이블\n"); fwrite($f, "\$g4['shop_banner_table'] = SHOP_TABLE_PREFIX.'banner'; // 배너 테이블\n");
fwrite($f, "\$g4['shop_card_history_table'] = SHOP_TABLE_PREFIX.'card_history'; // 전자결제이력 테이블\n"); fwrite($f, "\$g4['shop_card_history_table'] = SHOP_TABLE_PREFIX.'card_history'; // 전자결제이력 테이블\n");
@ -457,8 +461,8 @@ if($shop_install) {
fwrite($f, "\$g4['shop_order_table'] = SHOP_TABLE_PREFIX.'order'; // 주문서 테이블\n"); fwrite($f, "\$g4['shop_order_table'] = SHOP_TABLE_PREFIX.'order'; // 주문서 테이블\n");
fwrite($f, "\$g4['shop_wish_table'] = SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블\n"); fwrite($f, "\$g4['shop_wish_table'] = SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블\n");
fwrite($f, "\$g4['shop_item_info_table'] = SHOP_TABLE_PREFIX.'item_info'; // 상품요약정보 테이블 (상품정보고시)\n"); fwrite($f, "\$g4['shop_item_info_table'] = SHOP_TABLE_PREFIX.'item_info'; // 상품요약정보 테이블 (상품정보고시)\n");
}
fwrite($f, "?>"); fwrite($f, "?>");
}
fclose($f); fclose($f);
@chmod($file, 0606); @chmod($file, 0606);
@ -477,11 +481,18 @@ Deny from all
EOD; EOD;
fwrite($f, $str); fwrite($f, $str);
fclose($f); fclose($f);
@copy('./logo_img', $data_path.'/common/logo_img');
@copy('./main_img', $data_path.'/common/main_img');
@copy('./company_h', $data_path.'/content/company_h');
@copy('./privacy_h', $data_path.'/content/privacy_h');
@copy('./provision_h', $data_path.'/content/provision_h');
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
?> ?>
</ol> </ol>
<p class="st_strong">축하합니다. <?php echo $cf_title; ?> 설치가 완료되었습니다.</p> <p class="st_strong">축하합니다. 그누보드4s 설치가 완료되었습니다.</p>
<h2>환경설정 변경은 다음의 과정을 따르십시오.</h2> <h2>환경설정 변경은 다음의 과정을 따르십시오.</h2>

BIN
install/logo_img Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
install/main_img Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
install/privacy_h Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
install/provision_h Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB