게시판복사
-
게시판 바로가기
+
게시판 바로가기
게시판 썸네일 삭제
diff --git a/adm/board_list.php b/adm/board_list.php
index c0bdb2ea5..d4ed4282e 100644
--- a/adm/board_list.php
+++ b/adm/board_list.php
@@ -131,7 +131,7 @@ $colspan = 15;
-
+
|
diff --git a/adm/boardgroup_list.php b/adm/boardgroup_list.php
index a688e650d..8e7c5feeb 100644
--- a/adm/boardgroup_list.php
+++ b/adm/boardgroup_list.php
@@ -127,7 +127,7 @@ $colspan = 10;
|
-
|
+
|
diff --git a/adm/boardgroupmember_form.php b/adm/boardgroupmember_form.php
index 7a8c2d11d..ac934a5e3 100644
--- a/adm/boardgroupmember_form.php
+++ b/adm/boardgroupmember_form.php
@@ -85,7 +85,7 @@ $colspan = 4;
|
-
|
+
|
|
|
diff --git a/adm/contentform.php b/adm/contentform.php
index 7ebe8bf01..7b7751301 100644
--- a/adm/contentform.php
+++ b/adm/contentform.php
@@ -77,7 +77,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
class="required frm_input" size="20" maxlength="20">
- 내용확인
+ 내용확인
|
diff --git a/adm/contentlist.php b/adm/contentlist.php
index 95c8e279b..a23437423 100644
--- a/adm/contentlist.php
+++ b/adm/contentlist.php
@@ -77,7 +77,7 @@ $result = sql_query($sql);
|
수정
- 보기
+ 보기
삭제
|
diff --git a/adm/index.php b/adm/index.php
index 9a6d0b259..4a2020238 100644
--- a/adm/index.php
+++ b/adm/index.php
@@ -212,8 +212,8 @@ $colspan = 5;
|
- |
- |
+ |
+ |
|
|
@@ -283,7 +283,7 @@ $colspan = 7;
$link1 = $link2 = "";
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
{
- $link1 = '
';
+ $link1 = '';
$link2 = '';
}
?>
diff --git a/adm/menu_form_search.php b/adm/menu_form_search.php
index f6da6e84e..304bc1609 100644
--- a/adm/menu_form_search.php
+++ b/adm/menu_form_search.php
@@ -52,13 +52,13 @@ if($sql) {
';
+ $link1 = '
';
$link2 = '';
}
diff --git a/bbs/board.php b/bbs/board.php
index 18dbac70a..43e318d1c 100644
--- a/bbs/board.php
+++ b/bbs/board.php
@@ -8,7 +8,7 @@ if (!$board['bo_table']) {
check_device($board['bo_device']);
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
- goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'#c_'.$wr_id);
+ goto_url(get_pretty_url($bo_table, $write['wr_parent'], '#c_'.$wr_id));
}
if (!$bo_table) {
@@ -23,14 +23,14 @@ if (isset($wr_id) && $wr_id) {
// 글이 없을 경우 해당 게시판 목록으로 이동
if (!$write['wr_id']) {
$msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.';
- alert($msg, './board.php?bo_table='.$bo_table);
+ alert($msg, get_pretty_url($bo_table));
}
// 그룹접근 사용
if (isset($group['gr_use_access']) && $group['gr_use_access']) {
if ($is_guest) {
$msg = "비회원은 이 게시판에 접근할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.";
- alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
+ alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
}
// 그룹관리자 이상이라면 통과
@@ -51,14 +51,14 @@ if (isset($wr_id) && $wr_id) {
if ($is_member)
alert('글을 읽을 권한이 없습니다.', G5_URL);
else
- alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
+ alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
}
// 본인확인을 사용한다면
if ($config['cf_cert_use'] && !$is_admin) {
// 인증된 회원만 가능
if ($board['bo_use_cert'] != '' && $is_guest) {
- alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
+ alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
}
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
@@ -108,7 +108,7 @@ if (isset($wr_id) && $wr_id) {
// 이 게시물이 저장된 게시물이 아니면서 관리자가 아니라면
//if ("$bo_table|$write['wr_num']" != get_session("ss_secret"))
if (!get_session($ss_name))
- goto_url('./password.php?w=s&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
+ goto_url(G5_BBS_URL.'/password.php?w=s&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
}
set_session($ss_name, TRUE);
@@ -151,7 +151,7 @@ if (isset($wr_id) && $wr_id) {
if ($config['cf_cert_use'] && !$is_admin) {
// 인증된 회원만 가능
if ($board['bo_use_cert'] != '' && $is_guest) {
- alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
+ alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
}
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
diff --git a/bbs/delete.php b/bbs/delete.php
index 8f3cc9bcd..eccd079ef 100644
--- a/bbs/delete.php
+++ b/bbs/delete.php
@@ -30,7 +30,7 @@ else if ($is_admin == 'group') { // 그룹관리자
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
} else {
if ($write['mb_id'])
- alert('로그인 후 삭제하세요.', './login.php?url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
+ alert('로그인 후 삭제하세요.', './login.php?url='.urlencode(get_pretty_url($bo_table, $wr_id)));
else if (!check_password($wr_password, $write['wr_password']))
alert('비밀번호가 틀리므로 삭제할 수 없습니다.');
}
@@ -134,5 +134,5 @@ if ($count_write > 0 || $count_comment > 0)
delete_cache_latest($bo_table);
-goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
+goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
?>
diff --git a/bbs/delete_all.php b/bbs/delete_all.php
index 943045b19..8bcef3d69 100644
--- a/bbs/delete_all.php
+++ b/bbs/delete_all.php
@@ -156,5 +156,5 @@ if ($count_write > 0 || $count_comment > 0)
delete_cache_latest($bo_table);
-goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
+goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
?>
diff --git a/bbs/download.php b/bbs/download.php
index a69f52b6c..2ebe41742 100644
--- a/bbs/download.php
+++ b/bbs/download.php
@@ -15,7 +15,7 @@ if (!get_session('ss_view_'.$bo_table.'_'.$wr_id))
// 다운로드 차감일 때 비회원은 다운로드 불가
if($board['bo_download_point'] < 0 && $is_guest)
- alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
+ alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id)));
$sql = " select bf_source, bf_file from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$no' ";
$file = sql_fetch($sql);
@@ -38,7 +38,7 @@ if ($member['mb_level'] < $board['bo_download_level']) {
if ($member['mb_id'])
alert($alert_msg);
else
- alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
+ alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id)));
}
$filepath = G5_DATA_PATH.'/file/'.$bo_table.'/'.$file['bf_file'];
diff --git a/bbs/good.php b/bbs/good.php
index d1714c971..2c4d2365f 100644
--- a/bbs/good.php
+++ b/bbs/good.php
@@ -90,7 +90,7 @@ if($_POST['js'] == "on") {
if (!$is_member)
{
- $href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
+ $href = './login.php?'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id));
alert('회원만 가능합니다.', $href);
}
@@ -144,7 +144,7 @@ if($_POST['js'] == "on") {
else
$status = '비추천';
- $href = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
+ $href = get_pretty_url($bo_table, $wr_id);
alert("이 글을 $status 하셨습니다.", '', false);
}
diff --git a/bbs/list.php b/bbs/list.php
index 910e7ccf7..3ccc05a42 100644
--- a/bbs/list.php
+++ b/bbs/list.php
@@ -6,7 +6,7 @@ $is_category = false;
$category_option = '';
if ($board['bo_use_category']) {
$is_category = true;
- $category_href = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
+ $category_href = get_pretty_url($bo_table);
$category_option .= '
0) {
}
}
-$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './board.php?bo_table='.$bo_table.$qstr.'&page=');
+$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, get_pretty_url($bo_table, '', $qstr.'&page='));
$list_href = '';
$prev_part_href = '';
$next_part_href = '';
if ($is_search_bbs) {
- $list_href = './board.php?bo_table='.$bo_table;
+ $list_href = get_pretty_url($bo_table);
$patterns = array('#&page=[0-9]*#', '#&spt=[0-9\-]*#');
@@ -214,14 +214,14 @@ if ($is_search_bbs) {
$prev_spt = $spt - $config['cf_search_part'];
if (isset($min_spt) && $prev_spt >= $min_spt) {
$qstr1 = preg_replace($patterns, '', $qstr);
- $prev_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&spt='.$prev_spt.'&page=1';
+ $prev_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$prev_spt.'&page=1');
$write_pages = page_insertbefore($write_pages, '이전검색');
}
$next_spt = $spt + $config['cf_search_part'];
if ($next_spt < 0) {
$qstr1 = preg_replace($patterns, '', $qstr);
- $next_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&spt='.$next_spt.'&page=1';
+ $next_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$next_spt.'&page=1');
$write_pages = page_insertafter($write_pages, '다음검색');
}
}
diff --git a/bbs/logout.php b/bbs/logout.php
index 81704dbcb..c868e78ee 100644
--- a/bbs/logout.php
+++ b/bbs/logout.php
@@ -29,7 +29,7 @@ if ($url) {
$link = $url;
} else if ($bo_table) {
- $link = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
+ $link = get_pretty_url($bo_table);
} else {
$link = G5_URL;
}
diff --git a/bbs/move_update.php b/bbs/move_update.php
index fd48087fe..198e59dae 100644
--- a/bbs/move_update.php
+++ b/bbs/move_update.php
@@ -207,7 +207,7 @@ if ($sw == 'move')
}
$msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.';
-$opener_href = './board.php?bo_table='.$bo_table.'&page='.$page.'&'.$qstr;
+$opener_href = get_pretty_url($bo_table,'','&page='.$page.'&'.$qstr);
$opener_href1 = str_replace('&', '&', $opener_href);
echo <<'."\n";
?>
-
-
+
+
테스트 버전 0.2 (2004-04-26)
ko
@@ -69,8 +69,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
?>
-
-
-
+
+
]]>
@@ -38,6 +38,9 @@ $sql = " select count(*) as cnt from {$g5['scrap_table']}
and wr_id = '$wr_id' ";
$row = sql_fetch($sql);
if ($row['cnt']) {
+
+ $back_url = get_pretty_url($bo_table, $wr_id);
+
echo <<
if (confirm('이미 스크랩하신 글 입니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
@@ -48,7 +51,7 @@ if ($row['cnt']) {
HEREDOC;
exit;
diff --git a/bbs/scrap_popin_update.php b/bbs/scrap_popin_update.php
index 48513ea8b..ef0baed4b 100644
--- a/bbs/scrap_popin_update.php
+++ b/bbs/scrap_popin_update.php
@@ -5,7 +5,7 @@ include_once(G5_PATH.'/head.sub.php');
if (!$is_member)
{
- $href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
+ $href = './login.php?'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id));
echo '';
exit;
}
@@ -31,7 +31,7 @@ if ($row['cnt'])
';
exit;
}
diff --git a/bbs/search.php b/bbs/search.php
index 9aa1ca42b..33f786bc9 100644
--- a/bbs/search.php
+++ b/bbs/search.php
@@ -172,7 +172,7 @@ if ($stx) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 검색어까지 링크되면 게시판 부하가 일어남
$list[$idx][$i] = $row;
- $list[$idx][$i]['href'] = './board.php?bo_table='.$search_table[$idx].'&wr_id='.$row['wr_parent'];
+ $list[$idx][$i]['href'] = get_pretty_url($search_table[$idx], $row['wr_parent']);
if ($row['wr_is_comment'])
{
diff --git a/bbs/view.php b/bbs/view.php
index 8932eba9c..68bfb864f 100644
--- a/bbs/view.php
+++ b/bbs/view.php
@@ -13,11 +13,11 @@ $sql_search = "";
if ($sca || $stx || $stx === '0') {
// where 문을 얻음
$sql_search = get_sql_search($sca, $sfl, $stx, $sop);
- $search_href = './board.php?bo_table='.$bo_table.'&page='.$page.$qstr;
- $list_href = './board.php?bo_table='.$bo_table;
+ $search_href = get_pretty_url($bo_table,'','&page='.$page.$qstr);
+ $list_href = get_pretty_url($bo_table);
} else {
$search_href = '';
- $list_href = './board.php?bo_table='.$bo_table.'&page='.$page;
+ $list_href = get_pretty_url($bo_table,'',$qstr);
}
if (!$board['bo_use_list_view']) {
@@ -47,7 +47,7 @@ if (!$board['bo_use_list_view']) {
$prev_href = '';
if (isset($prev['wr_id']) && $prev['wr_id']) {
$prev_wr_subject = get_text(cut_str($prev['wr_subject'], 255));
- $prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].$qstr;
+ $prev_href = get_pretty_url($bo_table, $prev['wr_id'], $qstr);
$prev_wr_date = $prev['wr_datetime'];
}
@@ -55,7 +55,7 @@ if (isset($prev['wr_id']) && $prev['wr_id']) {
$next_href = '';
if (isset($next['wr_id']) && $next['wr_id']) {
$next_wr_subject = get_text(cut_str($next['wr_subject'], 255));
- $next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].$qstr;
+ $next_href = get_pretty_url($bo_table, $next['wr_id'], $qstr);
$next_wr_date = $next['wr_datetime'];
}
@@ -76,20 +76,20 @@ if ($member['mb_level'] >= $board['bo_reply_level']) {
$update_href = $delete_href = '';
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] === $write['mb_id'])) || $is_admin) {
- $update_href = './write.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
+ $update_href = G5_BBS_URL.'/write.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
set_session('ss_delete_token', $token = uniqid(time()));
- $delete_href ='./delete.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&token='.$token.'&page='.$page.urldecode($qstr);
+ $delete_href = G5_BBS_URL.'/delete.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&token='.$token.'&page='.$page.urldecode($qstr);
}
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
- $update_href = './password.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
- $delete_href = './password.php?w=d&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
+ $update_href = G5_BBS_URL.'/password.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
+ $delete_href = G5_BBS_URL.'/password.php?w=d&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
}
// 최고, 그룹관리자라면 글 복사, 이동 가능
$copy_href = $move_href = '';
if ($write['wr_reply'] == '' && ($is_admin == 'super' || $is_admin == 'group')) {
- $copy_href = './move.php?sw=copy&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
- $move_href = './move.php?sw=move&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
+ $copy_href = G5_BBS_URL.'/move.php?sw=copy&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
+ $move_href = G5_BBS_URL.'/move.php?sw=move&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
}
$scrap_href = '';
@@ -97,15 +97,15 @@ $good_href = '';
$nogood_href = '';
if ($is_member) {
// 스크랩 링크
- $scrap_href = './scrap_popin.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
+ $scrap_href = G5_BBS_URL.'/scrap_popin.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
// 추천 링크
if ($board['bo_use_good'])
- $good_href = './good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=good';
+ $good_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=good';
// 비추천 링크
if ($board['bo_use_nogood'])
- $nogood_href = './good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=nogood';
+ $nogood_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=nogood';
}
$view = get_view($write, $board, $board_skin_path);
diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php
index f7fdd3ea3..a1b55501d 100644
--- a/bbs/write_comment_update.php
+++ b/bbs/write_comment_update.php
@@ -205,7 +205,7 @@ if ($w == 'c') // 댓글 입력
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
// 4.00.15 - 메일로 보내는 댓글의 바로가기 링크 수정
- $link_url = G5_BBS_URL."/board.php?bo_table=".$bo_table."&wr_id=".$wr_id."&".$qstr."#c_".$comment_id;
+ $link_url = get_pretty_url($bo_table, $wr_id, $qstr."#c_".$comment_id);
include_once(G5_LIB_PATH.'/mailer.lib.php');
@@ -337,5 +337,5 @@ else if ($w == 'cu') // 댓글 수정
delete_cache_latest($bo_table);
-goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&'.$qstr.'&#c_'.$comment_id);
+goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&'.$qstr.'&#c_'.$comment_id));
?>
diff --git a/bbs/write_comment_update.sns.php b/bbs/write_comment_update.sns.php
index 0425f2d4c..0b3a0754b 100644
--- a/bbs/write_comment_update.sns.php
+++ b/bbs/write_comment_update.sns.php
@@ -22,7 +22,7 @@ if ($_POST['facebook_checked']) {
if ($user) {
try {
- $link = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'c_'.$comment_id;
+ $link = get_pretty_url($bo_table, $wr['wr_parent'], 'c_'.$comment_id);
$attachment = array(
'message' => stripslashes($wr_content),
'name' => $wr_subject,
@@ -53,7 +53,7 @@ if ($_POST['twitter_checked']) {
include_once(G5_SNS_PATH."/twitter/twitterconfig.php");
if ( !(empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) ) {
- $comment_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'c_'.$comment_id;
+ $comment_url = get_pretty_url($bo_table, $wr['wr_parent'], 'c_'.$comment_id);
$post = googl_short_url($comment_url).' '.$wr_content;
$post = utf8_strcut($post, 140);
diff --git a/bbs/write_update.php b/bbs/write_update.php
index a97ea4a0e..55ddde35b 100644
--- a/bbs/write_update.php
+++ b/bbs/write_update.php
@@ -304,10 +304,10 @@ if ($w == '' || $w == 'r') {
}
} else if ($w == 'u') {
if (get_session('ss_bo_table') != $_POST['bo_table'] || get_session('ss_wr_id') != $_POST['wr_id']) {
- alert('올바른 방법으로 수정하여 주십시오.', G5_BBS_URL.'/board.php?bo_table='.$bo_table);
+ alert('올바른 방법으로 수정하여 주십시오.', get_pretty_url($bo_table));
}
- $return_url = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
+ $return_url = get_pretty_url($bo_table, $wr_id);
if ($is_admin == 'super') // 최고관리자 통과
;
@@ -655,7 +655,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
- $link_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&'.$qstr;
+ $link_url = get_pretty_url($bo_table, $wr_id, $qstr);
include_once(G5_LIB_PATH.'/mailer.lib.php');
@@ -698,8 +698,12 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
delete_cache_latest($bo_table);
+$redirect_url = apply_replace('write_update_move_url', short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr), $board, $wr_id, $w, $qstr, $file_upload_msg);
+
+start_event('write_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
+
if ($file_upload_msg)
- alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
+ alert($file_upload_msg, $redirect_url);
else
- goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
+ goto_url($redirect_url);
?>
diff --git a/config.php b/config.php
index 205df5833..d165d9cb1 100644
--- a/config.php
+++ b/config.php
@@ -60,6 +60,9 @@ define('G5_PHPMAILER_DIR', 'PHPMailer');
define('G5_SESSION_DIR', 'session');
define('G5_THEME_DIR', 'theme');
+define('G5_GROUP_DIR', 'group');
+define('G5_CONTENT_DIR', 'content');
+
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
if (G5_DOMAIN) {
define('G5_URL', G5_DOMAIN);
diff --git a/lib/URI/uri.class.php b/lib/URI/uri.class.php
index 2f650e45b..17e25c16e 100644
--- a/lib/URI/uri.class.php
+++ b/lib/URI/uri.class.php
@@ -2,6 +2,147 @@
if (!defined('_GNUBOARD_')) exit;
class G5_URI {
+ public $basename;
+ public $parts;
+ public $slashes;
+ public static function getInstance()
+ { //싱글톤
+ static $instance = null;
+ if (null === $instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ public function parseURL() {
+ /* grab URL query string and script name */
+ $uri = $_SERVER['REQUEST_URI'];
+ $script = $_SERVER['SCRIPT_NAME'];
+ /* get extension */
+ $ext = end( explode(".",$script) );
+
+ /* if extension is found in URL, eliminate it */
+ if(strstr($uri,".")) {
+ $arr_uri = explode('.', $uri);
+ /* get last part */
+ $last = end($arr_uri);
+
+ if($last == $ext){
+ array_pop($arr_uri);
+ $uri = implode('.', $arr_uri);
+ }
+ }
+
+ /* pick the name without extension */
+ $basename = basename ($script, '.'.$ext);
+ /* slicing query string */
+ $temp = explode('/',$uri);
+ $key = array_search($basename,$temp);
+ $parts = array_slice ($temp, $key+1);
+ $this->basename = $basename;
+ $this->parts = $parts;
+
+ }
+
+ public function setRelative($relativevar) {
+ /* count the number of slash
+ to define relative path */
+ $numslash = count($this->parts);
+ $slashes="";
+ for($i=0;$i<$numslash;$i++){
+ $slashes .= "../";
+ }
+ $this->slashes = $slashes;
+ /* make relative path variable available for webpage */
+ //eval("\$GLOBALS['$relativevar'] = '$slashes';");
+
+ $links = array();
+ $links[$relativevar] = $slashes;
+
+ return $links;
+ }
+
+ public function getParts() {
+ /* return array of sliced query string */
+ return $this->parts;
+ }
+
+ public function setParts() {
+ /* pair off query string variable and query string value */
+ $numargs = func_num_args();
+ $arg_list = func_get_args();
+ $urlparts = $this->getParts();
+ $links = array();
+ for ($i = 0; $i < $numargs; $i++) {
+ /* make them available for webpage */
+ //eval ("\$GLOBALS['".$arg_list[$i] ."']= '$urlparts[$i]';");
+ $links[$arg_list[$i]] = $urlparts[$i];
+ }
+
+ return $links;
+ }
+
+ public function makeClean($stringurl) {
+ /* convert normal URL query string to clean URL */
+ $url=parse_url($stringurl);
+ $strurl = basename($url['path'],".php");
+ $qstring = parse_str($url['query'],$vars);
+ while(list($k,$v) = each($vars)) $strurl .= "/".$v;
+ return $strurl;
+ }
+
+ public function url_clean($stringurl, $add_qry='') {
+ $stringurl = str_replace('&', '&', $stringurl);
+ $url=parse_url($stringurl);
+ $strurl = basename($url['path'],".php");
+
+ if( ! in_array($strurl, array('board', 'view_comment.page')) ){ //게시판이 아니면 리턴
+ return $stringurl;
+ }
+
+ $return_url = '';
+ $qstring = parse_str($url['query'],$vars);
+
+ // 예) Array ( [scheme] => http [host] => sir.kr [path] => /bbs/board.php [query] => wr_id=1110870&bo_table=cm_free&cpage=1 [fragment] => c_1110946 )
+ //while(list($k,$v) = each($vars)) $strurl .= "/".$v;
+
+ $tmp = array('bo_table'=>'', 'wr_id'=>'');
+ $s = array();
+
+ foreach( $tmp as $key=>$v ){
+ if( !isset($vars[$key]) || empty($vars[$key]) ) continue;
+ $add = '';
+ $s[$key] = $vars[$key];
+ }
+
+ $fragment = isset($url['fragment']) ? '#'.$url['fragment'] : '';
+
+ $host = G5_URL;
+
+ if( isset($url['host']) ){
+ $str_path = isset($url['path']) ? $url['path'] : '';
+ $http = 'http://';
+ if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
+ $http = 'https://';
+ }
+ $host = $http.$url['host'].str_replace('/'.G5_BBS_DIR.'/board.php', '', $str_path);
+ }
+
+ $add_param = '';
+
+ if( $result = array_diff_key($vars, $tmp ) ){
+ $add_param = '?'.http_build_query($result,'','&');
+ }
+
+ if( $add_qry ){
+ $add_param .= $add_param ? '&'.$add_qry : '?'.$add_qry;
+ }
+
+ while(list($k,$v) = each($s)) $return_url .= "/".$v;
+
+ return $host.$return_url.$add_param.$fragment;
+ }
}
?>
\ No newline at end of file
diff --git a/lib/common.lib.php b/lib/common.lib.php
index ba5fd126e..afd5e2433 100644
--- a/lib/common.lib.php
+++ b/lib/common.lib.php
@@ -1257,7 +1257,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
if(!$bo_table)
return $name;
- $tmp_name = ''.$name.'';
+ $tmp_name = ''.$name.'';
$title_mb_id = '[비회원]';
}
@@ -1275,9 +1275,9 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
$str2 .= "자기소개\n";
if($bo_table) {
if($mb_id)
- $str2 .= "아이디로 검색\n";
+ $str2 .= "아이디로 검색\n";
else
- $str2 .= "이름으로 검색\n";
+ $str2 .= "이름으로 검색\n";
}
if($mb_id)
$str2 .= "전체게시물\n";
diff --git a/lib/uri.lib.php b/lib/uri.lib.php
index 2fa173324..efd8354b7 100644
--- a/lib/uri.lib.php
+++ b/lib/uri.lib.php
@@ -1,13 +1,13 @@
url_clean($url, $add_qry);
+ }
+
+ return $url;
+}
?>
\ No newline at end of file
diff --git a/skin/board/basic/write.skin.php b/skin/board/basic/write.skin.php
index f17507837..6238be68d 100644
--- a/skin/board/basic/write.skin.php
+++ b/skin/board/basic/write.skin.php
@@ -165,7 +165,7 @@ add_stylesheet('', 0