틀린 구문 수정

This commit is contained in:
thisgun committed 2018-10-02 11:47:29 +09:00
1 parent f5155c4fed
commit 8d7c0005e4
5 files changed
+43 -24

No files matched your search

+15 -22
View File
@@ -70,34 +70,27 @@ add_javascript('<script src="'.G5_JS_URL.'/remodal/remodal.js"></script>', 10);
<div class="server_rewrite_info">
<div class="is_rewrite remodal" data-remodal-id="modal_apache" role="dialog" aria-labelledby="modalApache" aria-describedby="modal1Desc">
<button type="button" class="connect-close" data-remodal-action="close">
<i class="fa fa-close"></i>
<span class="txt">닫기</span>
</button>
<button type="button" class="connect-close" data-remodal-action="close">
<i class="fa fa-close"></i>
<span class="txt">닫기</span>
</button>
<h4 class="copy_title">.htaccess 파일에 적용할 코드입니다.
<?php if( ! $is_write_file ) { ?>
<br>아래 코드를 복사하여 .htaccess 파일에 붙여넣기 하여 주세요.
<?php } ?>
</h4>
<h4 class="copy_title">.htaccess 파일에 적용할 코드입니다.
<?php if( ! $is_write_file ) { ?>
<br>아래 코드를 복사하여 .htaccess 파일에 붙여넣기 하여 주세요.
<?php } ?>
</h4>
<textarea readonly="readonly" rows="10"><?php echo get_mod_rewrite_rules(true); ?></textarea>
</div>
<div class="is_rewrite remodal" data-remodal-id="modal_nginx" role="dialog" aria-labelledby="modalNginx" aria-describedby="modal2Desc">
<h4 class="copy_title">아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.</h4>
<textarea readonly="readonly" rows="10">
if (!-e $request_filename){
rewrite ^<?php echo $base_path; ?>content/([0-9a-zA-Z_]+)$ <?php echo $base_path; ?>bbs/content.php?co_id=$1&rewrite=1 break;
rewrite ^<?php echo $base_path; ?>content/([^/]+)/$ <?php echo $base_path; ?>bbs/content.php?co_seo_title=$1&rewrite=1 break;
rewrite ^<?php echo $base_path; ?>rss/([0-9a-zA-Z_]+)$ <?php echo $base_path; ?>bbs/rss.php?bo_table=$1 break;
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&rewrite=1 break;
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/([^/]+)/$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1 break;
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/write$ <?php echo $base_path; ?>bbs/write.php?bo_table=$1&rewrite=1 break;
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/p([0-9]+)$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&page=$2 break;
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/([0-9]+)$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&wr_id=$2&rewrite=1 break;
}
</textarea>
<button type="button" class="connect-close" data-remodal-action="close">
<i class="fa fa-close"></i>
<span class="txt">닫기</span>
</button>
<h4 class="copy_title">아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.</h4>
<textarea readonly="readonly" rows="10"><?php echo get_nginx_conf_rules(true); ?></textarea>
</div>
</div>
+1 -1
View File
@@ -10,7 +10,7 @@ CREATE TABLE `__TABLE_NAME__` (
`wr_option` set('html1','html2','secret','mail') NOT NULL,
`wr_subject` varchar(255) NOT NULL,
`wr_content` text NOT NULL,
`wr_seo_title` varchar(255) NOT NULL DEFAULT ''
`wr_seo_title` varchar(255) NOT NULL DEFAULT '',
`wr_link1` text NOT NULL,
`wr_link2` text NOT NULL,
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
+1 -1
View File
@@ -125,7 +125,7 @@ $g5 = array();
$g5_debug = array('php'=>array(),'sql'=>array());
include_once(G5_LIB_PATH.'/hook.lib.php'); // hook 함수 파일
include_once(G5_LIB_PATH.'/get_data.lib.php');
include_once(G5_LIB_PATH.'/get_data.lib.php'); // 데이타 가져오는 함수 모음
include_once(G5_LIB_PATH.'/uri.lib.php'); // URL 함수 파일
include_once(G5_LIB_PATH.'/cache.lib.php');
+3
View File
@@ -4,6 +4,9 @@ include_once('../lib/json.lib.php');
include_once('../lib/common.lib.php'); // 공통 라이브러리
include_once('./install.function.php'); // 인스톨 과정 함수 모음
include_once('../lib/hook.lib.php'); // hook 함수 파일
include_once('../lib/get_data.lib.php'); // 데이타 가져오는 함수 모음
$data_path = '../'.G5_DATA_DIR;
// 파일이 존재한다면 설치할 수 없다.
+23
View File
@@ -188,6 +188,29 @@ function exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id=0){
return exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id);
}
function get_nginx_conf_rules($return_string=false){
$get_path_url = parse_url( G5_URL );
$base_path = isset($get_path_url['path']) ? $get_path_url['path'].'/' : '/';
$rules = array();
$rules[] = '#### '.G5_VERSION.' url rules BOF #####';
$rules[] = 'if (!-e $request_filename){';
$rules[] = "rewrite ^{$base_path}content/([0-9a-zA-Z_]+)$ {$base_path}bbs/content.php?co_id=$1&rewrite=1 break;";
$rules[] = "rewrite ^{$base_path}content/([^/]+)/$ {$base_path}bbs/content.php?co_seo_title=$1&rewrite=1 break;";
$rules[] = "rewrite ^{$base_path}rss/([0-9a-zA-Z_]+)$ {$base_path}bbs/rss.php?bo_table=$1 break;";
$rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)$ {$base_path}bbs/board.php?bo_table=$1&rewrite=1 break;";
$rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)/write$ {$base_path}bbs/write.php?bo_table=$1&rewrite=1 break;";
$rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)/([^/]+)/$ {$base_path}bbs/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1 break;";
$rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)/([0-9]+)$ {$base_path}bbs/board.php?bo_table=$1&wr_id=$2&rewrite=1 break;";
$rules[] = '}';
$rules[] = '#### '.G5_VERSION.' url rules EOF #####';
return $return_string ? implode("\n", $rules) : $rules;
}
function get_mod_rewrite_rules($return_string=false){
$get_path_url = parse_url( G5_URL );