diff --git a/adm/board_copy_update.php b/adm/board_copy_update.php
index e72c2bc36..5f6c83763 100644
--- a/adm/board_copy_update.php
+++ b/adm/board_copy_update.php
@@ -40,7 +40,6 @@ $sql = " insert into {$g4['board_table']}
bo_download_level = '{$board[bo_download_level]}',
bo_html_level = '{$board[bo_html_level]}',
bo_link_level = '{$board[bo_link_level]}',
- bo_trackback_level = '{$board[bo_trackback_level]}',
bo_count_modify = '{$board[bo_count_modify]}',
bo_count_delete = '{$board[bo_count_delete]}',
bo_read_point = '{$board[bo_read_point]}',
@@ -57,7 +56,6 @@ $sql = " insert into {$g4['board_table']}
bo_use_nogood = '{$board[bo_use_nogood]}',
bo_use_signature = '{$board[bo_use_signature]}',
bo_use_ip_view = '{$board[bo_use_ip_view]}',
- bo_use_trackback = '{$board[bo_use_trackback]}',
bo_use_list_view = '{$board['o_use_list_view']}',
bo_use_list_content = '{$board[bo_use_list_content]}',
bo_table_width = '{$board[bo_table_width]}',
diff --git a/adm/board_form.php b/adm/board_form.php
index d9a52a452..8823b3cf2 100644
--- a/adm/board_form.php
+++ b/adm/board_form.php
@@ -247,17 +247,6 @@ include_once ('./admin.head.php');
동일그룹 모두 적용
-
목록에서 내용 사용
diff --git a/adm/board_form_update.php b/adm/board_form_update.php
index 9e393e949..e261c7c3e 100644
--- a/adm/board_form_update.php
+++ b/adm/board_form_update.php
@@ -70,7 +70,6 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_comment_level = '{$_POST[bo_comment_level]}',
bo_html_level = '{$_POST[bo_html_level]}',
bo_link_level = '{$_POST[bo_link_level]}',
- bo_trackback_level = '{$_POST[bo_trackback_level]}',
bo_count_modify = '{$_POST[bo_count_modify]}',
bo_count_delete = '{$_POST[bo_count_delete]}',
bo_upload_level = '{$_POST[bo_upload_level]}',
@@ -92,7 +91,6 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_use_name = '{$_POST[bo_use_name]}',
bo_use_signature = '{$_POST[bo_use_signature]}',
bo_use_ip_view = '{$_POST[bo_use_ip_view]}',
- bo_use_trackback = '{$_POST[bo_use_trackback]}',
bo_use_list_view = '{$_POST[bo_use_list_view]}',
bo_use_list_content = '{$_POST[bo_use_list_content]}',
bo_use_email = '{$_POST[bo_use_email]}',
@@ -248,7 +246,6 @@ if ($chk_link_level) $s .= " , bo_link_level = '{$bo_link_level}' ";
if ($chk_upload_level) $s .= " , bo_upload_level = '{$bo_upload_level}' ";
if ($chk_download_level) $s .= " , bo_download_level = '{$bo_download_level}' ";
if ($chk_html_level) $s .= " , bo_html_level = '{$bo_html_level}' ";
-if ($chk_trackback_level) $s .= " , bo_trackback_level = '{$bo_trackback_level}' ";
if ($chk_count_modify) $s .= " , bo_count_modify = '{$bo_count_modify}' ";
if ($chk_count_delete) $s .= " , bo_count_delete = '{$bo_count_delete}' ";
if ($chk_read_point) $s .= " , bo_read_point = '{$bo_read_point}' ";
@@ -269,7 +266,6 @@ if ($chk_use_nogood) $s .= " , bo_use_nogood = '{$bo_use_nogood}' ";
if ($chk_use_name) $s .= " , bo_use_name = '{$bo_use_name}' ";
if ($chk_use_signature) $s .= " , bo_use_signature = '{$bo_use_signature}' ";
if ($chk_use_ip_view) $s .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
-if ($chk_use_trackback) $s .= " , bo_use_trackback = '{$bo_use_trackback}' ";
if ($chk_use_list_view) $s .= " , bo_use_list_view = '{$bo_use_list_view}' ";
if ($chk_use_list_content) $s .= " , bo_use_list_content = '{$bo_use_list_content}' ";
if ($chk_use_email) $s .= " , bo_use_email = '{$bo_use_email}' ";
diff --git a/bbs/move_update.php b/bbs/move_update.php
index 0482834b7..84a1b68d3 100644
--- a/bbs/move_update.php
+++ b/bbs/move_update.php
@@ -59,7 +59,6 @@ while ($row = sql_fetch_array($result))
wr_link2 = '".addslashes($row2[wr_link2])."',
wr_link1_hit = '$row2[wr_link1_hit]',
wr_link2_hit = '$row2[wr_link2_hit]',
- wr_trackback = '".addslashes($row2[wr_trackback])."',
wr_hit = '$row2[wr_hit]',
wr_good = '$row2[wr_good]',
wr_nogood = '$row2[wr_nogood]',
diff --git a/bbs/tb.php b/bbs/tb.php
deleted file mode 100644
index 023ebaa9c..000000000
--- a/bbs/tb.php
+++ /dev/null
@@ -1,194 +0,0 @@
-
-//
-// 트랙백 핑 받는 페이지
-//
-define("_GNUBOARD_", TRUE);
-
-include_once('./_common.php');
-// 오류는 write_log() 함수로 남긴다.
-include_once($g4['path'].'/lib/etc.lib.php');
-
-function tb_xml_msg($error, $msg='')
-{
- global $g4;
-
- $s = '';
- $s .= ''.PHP_EOL;
- $s .= ''.PHP_EOL;
- $s .= ''.$error.' '.PHP_EOL;
- $s .= ''.$msg.' '.PHP_EOL;
- $s .= ' '.PHP_EOL;
-
- return $s;
-}
-
-$arr = explode("/", $_SERVER[PATH_INFO]);
-// 영문자 숫자 _ 과 일치하지 않는 문자는 삭제한다. (최대 20자)
-$bo_table = preg_replace("/\W/", "", substr($arr[1],0,20));
-// 정수형으로 변환
-$wr_id = (int)$arr[2];
-// 영소문자 숫자 와 일치하지 않는 문자는 삭제한다. (최대 32자)
-$to_token = preg_replace("/[^a-z0-9]/", "", substr($arr[3],0,32));
-
-$write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 전체이름
-
-$sql = " select wr_id, ca_name, wr_email from {$write_table} where wr_id = '{$wr_id}' ";
-$wr = sql_fetch($sql, FALSE);
-
-// wr_id가 없거나 트랙백으로 넘어온게 아니라면
-if (!$wr[wr_id] || !($_POST[title] && $_POST[excerpt] && $_POST[url] && $_POST[blog_name]))
-{
- $tmp_dir = str_replace('/tb.php', '', $_SERVER[SCRIPT_NAME]);
- header('location:'.$tmp_dir.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
- exit;
-}
-
-if (!$to_token)
-{
- if (isset($_POST))
- write_log($g4['path'].'/data/log/tb.log', $_POST);
-
- echo tb_xml_msg(1, '토큰값이 넘어오지 않았습니다.');
- exit;
-}
-
-$sql = " select to_token from {$g4[token_table]} where to_token = '{$to_token}' ";
-$row = sql_fetch($sql);
-if ($row[to_token] && $to_token)
-{
- // 두번 이상 트랙백을 보내지 못하도록 하기 위하여 토큰을 삭제한다
- sql_query(" delete from {$g4[token_table]} where to_token = '{$to_token}' ");
-
- // 토큰검사 (3시간 이상 지난 토큰은 삭제)
- if (isset($g4['token_time']) == false)
- $g4['token_time'] = 3;
-
- $sql = " delete from {$g4[token_table]} where to_datetime < '".date("Y-m-d", $g4[server_time] - 3600 * $g4['token_time'])."' ";
- sql_query($sql);
-}
-else
-{
- echo tb_xml_msg(1, '트랙백 주소가 올바르지 않습니다. (토큰 유효시간 경과 등)');
- exit;
-}
-
-$title = $_POST[title];
-$excerpt = $_POST[excerpt];
-
-if (strlen($title) > 255) $title = cut_str($title, 255);
-if (strlen($excerpt) > 255) $excerpt = cut_str($excerpt, 255);
-
-$msg = "";
-// 두번씩 INSERT 되는것을 막기 위해
-if ($_POST[title])
-{
- $board = sql_fetch(" select bo_subject, bo_use_trackback from {$g4[board_table]} where bo_table = '{$bo_table}' ");
- if (!$board[bo_use_trackback])
- $msg = '트랙백 사용이 금지된 게시판입니다.';
-
- if (!$msg)
- {
- $next_num = get_next_num($write_table);
-
- $sql = " select max(wr_comment) as max_comment from {$write_table} where wr_parent = '{$wr_id}' and wr_is_comment = 1 ";
- $row = sql_fetch($sql);
- $row[max_comment] += 1;
-
- $sql = " insert into {$g4[write_prefix]}{$bo_table}
- set wr_num = '{$next_num}',
- wr_parent = '{$wr_id}',
- wr_is_comment = 1,
- wr_comment = '{$row[max_comment]}',
- wr_content = '{$title}\n{$excerpt}',
- wr_trackback = '{$_POST[url]}',
- wr_name = '{$_POST[blog_name]}',
- wr_password = '".sql_password($g4[server_time])."',
- wr_datetime = '{$g4[time_ymdhis]}',
- wr_ip = '{$_SERVER[REMOTE_ADDR]}' ";
- $result = sql_query($sql, FALSE);
- if ($result)
- {
- $comment_id = mysql_insert_id();
- sql_query(" update {$write_table} set wr_comment = wr_comment + 1 where wr_id = '{$wr_id}' ", FALSE);
- sql_query(" insert into {$g4[board_new_table]} ( bo_table, wr_id, wr_parent, bn_datetime ) values ( '{$bo_table}', '{$comment_id}', '{$wr_id}', '{$g4[time_ymdhis]}' ) ");
- sql_query(" update {$g4[board_table]} set bo_count_comment = bo_count_comment + 1 where bo_table = '{$bo_table}' ", FALSE);
- } else
- $msg = "$write_table TABLE INSERT 오류";
- }
-
- //write_log("$g4['path']/data/log/aaa", $msg);
-
- if ($msg) // 비정상(오류)
- {
- echo tb_xml_msg(1, $msg);
- exit;
- }
- else // 정상
- {
- // 메일발송 사용
- if ($config[cf_email_use] && $board[bo_use_email])
- {
- include_once($g4['path'].'/lib/mailer.lib.php');
-
- // 관리자의 정보를 얻고
- $super_admin = get_admin('super');
- $group_admin = get_admin('group');
- $board_admin = get_admin('board');
-
- $wr_name = $blog_name = get_text(stripslashes($_POST[blog_name]));
- $wr_subject = $title = get_text(stripslashes($title));
- $wr_content = $excerpt = nl2br(get_text(stripslashes($excerpt)));
-
- $link_url = 'http://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI];
-
- $subject = $board[bo_subject].' 게시판에 트랙백에 의한 글이 올라왔습니다.';
-
- define("_GNUBOARD_", TRUE);
- ob_start();
- include_once ('./write_update_mail.php');
- $content = ob_get_contents();
- ob_end_clean();
-
- // 게시판 관리자에게 보내는 메일
- if ($config[cf_email_wr_board_admin])
- mailer($blog_name, '', $board_admin[mb_email], $subject, $content, 1);
-
- // 그룹 관리자에게 보내는 메일
- if ($group_admin[mb_email] != $board_admin[mb_email])
- {
- if ($config[cf_email_wr_group_admin])
- mailer($blog_name, '', $group_admin[mb_email], $subject, $content, 1);
- }
-
- // 최고관리자에게 보내는 메일
- if ($super_admin[mb_email] != $board_admin[mb_email])
- {
- if ($config[cf_email_wr_super_admin])
- mailer($blog_name, '', $super_admin[mb_email], $subject, $content, 1);
- }
-
- // 답변 메일받기 (원게시자에게 보내는 메일)
- //if ($wr[wr_recv_email] && $wr[wr_email] && $wr[wr_email] != $admin[mb_email])
- if (strstr($wr[wr_option], 'mail') && $wr[wr_email] && $wr[wr_email] != $admin[mb_email])
- {
- if ($config[cf_email_wr_write])
- mailer($blog_name, "", $wr[wr_email], $subject, $content, 1);
-
- // 코멘트 쓴 모든이에게 메일 발송
- if ($config[cf_email_wr_comment_all])
- {
- $sql = " select wr_email from {$write_table}
- where wr_email not in ( '{$admin[mb_email]}' , '{$wr[wr_email]}', '' )
- and wr_parent = '{$wr_id}'
- group by wr_email ";
- $result = sql_query($sql);
- while ($row=sql_fetch_array($result))
- mailer($blog_name, '', $row[wr_email], $subject, $content, 1);
- }
- }
- }
- }
-}
-
-echo tb_xml_msg(0, '');
-?>
diff --git a/bbs/tb_token.php b/bbs/tb_token.php
deleted file mode 100644
index ec35b7ab5..000000000
--- a/bbs/tb_token.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
-// 토큰 생성
-include_once('./_common.php');
-
-// 오류는 write_log() 로 잡는다.
-include_once($g4['path'].'/lib/etc.lib.php');
-//write_log($g4['path'].'/lib/log/aaa', 1);
-
-if (isset($g4['token_time']) == false)
- $g4['token_time'] = 3;
-
-$sql = " delete from {$g4[token_table]}
- where to_datetime < '".date("Y-m-d", $g4[server_time] - 86400 * $g4['token_time'])."' ";
-sql_query($sql);
-
-$sql = " select count(*) as cnt from {$g4[token_table]}
- where to_ip = '{$_SERVER[REMOTE_ADDR]}' ";
-$row = sql_fetch($sql);
-if ($row[cnt] >= 100)
- return;
-
-$i=0;
-while(1) {
- $token = md5(uniqid(rand(), true));
- $sql = " insert into g4_token
- set to_token = '{$token}',
- to_datetime = '{$g4['time_ymdhis']}',
- to_ip = '{$_SERVER[REMOTE_ADDR]}' ";
- $result = sql_query($sql, FALSE);
- if ($result)
- break;
- // 무한루프방지
- if ($i++ >= 10)
- break;
-}
-echo $token;
-?>
\ No newline at end of file
diff --git a/bbs/view.php b/bbs/view.php
index d86d8285c..d4da599c7 100644
--- a/bbs/view.php
+++ b/bbs/view.php
@@ -126,14 +126,6 @@ if (strstr($sfl, 'content'))
//$view['rich_content'] = preg_replace("/{img\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view['content']);
$view['rich_content'] = preg_replace("/{이미지\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view['content']);
-// 트랙백
-$trackback_url = '';
-if ($member['mb_level'] >= $board['bo_trackback_level']) {
- if (isset($g4['token_time']) == false)
- $g4['token_time'] = 3;
- $trackback_url = $g4['url'].'/'.$g4['bbs'].'/tb.php/'.$bo_table.'/'.$wr_id;
-}
-
$is_signature = false;
$signature = '';
if ($board['bo_use_signature'] && $view['mb_id']) {
diff --git a/bbs/view_comment.php b/bbs/view_comment.php
index eec2c658a..8653dfc66 100644
--- a/bbs/view_comment.php
+++ b/bbs/view_comment.php
@@ -45,7 +45,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
}
- $list[$i]['trackback'] = url_auto_link($row['wr_trackback']);
$list[$i]['datetime'] = substr($row['wr_datetime'],2,14);
// 관리자가 아니라면 중간 IP 주소를 감춘후 보여줍니다.
diff --git a/bbs/write.php b/bbs/write.php
index 640a22efc..7f675d869 100644
--- a/bbs/write.php
+++ b/bbs/write.php
@@ -253,12 +253,6 @@ if ($board['bo_use_file_content']) {
$is_file_content = true;
}
-// 트랙백
-$is_trackback = false;
-if ($board['bo_use_trackback'] && $member['mb_level'] >= $board['bo_trackback_level']) {
- $is_trackback = true;
-}
-
$name = "";
$email = "";
$homepage = "";
@@ -275,7 +269,6 @@ if ($w == "" || $w == "r") {
$html_checked = "";
$html_value = "";
$secret_checked = "";
-$trackback = "";
if ($w == '') {
$password_required = 'required';
@@ -299,8 +292,6 @@ if ($w == '') {
$link[$i] = $write['wr_link'.$i];
}
- $trackback = $write['wr_trackback'];
-
if (strstr($write['wr_option'], 'html1')) {
$html_checked = 'checked';
$html_value = 'html1';
diff --git a/bbs/write_update.php b/bbs/write_update.php
index cfab11dad..365226283 100644
--- a/bbs/write_update.php
+++ b/bbs/write_update.php
@@ -11,8 +11,6 @@ if (substr_count($wr_content, '') > 50) {
@include_once($board_skin_path.'/write_update.head.skin.php');
-include_once($g4['path'].'/lib/trackback.lib.php');
-
$upload_max_filesize = ini_get('upload_max_filesize');
if (empty($_POST))
@@ -291,7 +289,6 @@ if ($w == '' || $w == 'r')
wr_link2 = '{$wr_link2}',
wr_link1_hit = 0,
wr_link2_hit = 0,
- wr_trackback = '{$wr_trackback}',
wr_hit = 0,
wr_good = 0,
wr_nogood = 0,
@@ -595,18 +592,6 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
// 사용자 코드 실행
@include_once ($board_skin_path.'/write_update.skin.php');
-// 트랙백 주소가 있다면
-if (($w != 'u' && $wr_trackback) || ($w=='u' && $wr_trackback && $re_trackback))
-{
- $trackback_url = $g4['url'].'/'.$g4['bbs'].'/tb.php/'.$bo_table.'/'.$wr_id;
- $msg = "";
- $msg = send_trackback($wr_trackback, $trackback_url, $wr_subject, $board['bo_subject'], $_POST['wr_content']);
- if ($msg) {
- echo ' '.PHP_EOL;
- echo '';
- }
-}
-
@include_once($board_skin_path.'/write_update.tail.skin.php');
if ($g4['https_url'])
$https_url = $g4['url'].'/'.$g4['bbs'];
diff --git a/js/ajax.js b/js/ajax.js
index fea0558fc..9630c8b5a 100644
--- a/js/ajax.js
+++ b/js/ajax.js
@@ -20,22 +20,3 @@ function create_request() {
else
return request;
}
-
-// 트랙백을 사용한다면 토큰을 실시간으로 생성
-var trackback_url = "";
-function trackback_send_server(url) {
- req = create_request();
- trackback_url = url;
- req.onreadystatechange = function() {
- if (req.readyState == 4) {
- if (req.status == 200) {
- var token = req.responseText;
- prompt("아래 주소를 복사하세요. 이 주소는 스팸을 막기 위하여 한번만 사용 가능합니다.", trackback_url+"/"+token);
- trackback_url = "";
- }
- }
- }
- req.open("POST", g4_path+'/'+g4_bbs+'/'+'tb_token.php', true);
- //req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- req.send(null);
-}
diff --git a/lib/trackback.lib.php b/lib/trackback.lib.php
deleted file mode 100644
index 47bddd235..000000000
--- a/lib/trackback.lib.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
-if (!defined('_GNUBOARD_')) exit;
-
-/////////////////////////////////////////
-// //
-// mics'php - Trackback Sender //
-// //
-// COPYLEFT (c) by micsland.com //
-// //
-// MODIFIED (c) by sir.co.kr //
-// //
-/////////////////////////////////////////
-
-// return 값이 있으면 오류, 없으면 정상
-function send_trackback($tb_url, $url, $title, $blog_name, $excerpt)
-{
- /*
- // allow_url_fopen = Off 일 경우 트랙백 사용할 수 없었던 오류를 수정
- // allow_url_fopen = On 일 경우에만 사용 가능
- //주소가 유효한지 검사
- $p_fp = fopen($tb_url,"r");
- if($p_fp)
- @fclose($p_fp);
- else
- return "트랙백 URL이 존재하지 않습니다.";
- */
-
- //내용 정리
- $title = strip_tags($title);
- $excerpt = strip_tags($excerpt);
-
- $tmp_data = "url=".rawurlencode($url)."&title=".rawurlencode($title)."&blog_name=".rawurlencode($blog_name)."&excerpt=".rawurlencode($excerpt);
-
- //주소 처리
- $uinfo = parse_url($tb_url);
- if($uinfo['query']) $tmp_data .= "&".$uinfo['query'];
- if(!$uinfo['port']) $uinfo['port'] = "80";
-
- //최종 전송 자료
- $send_str = 'POST '.$uinfo['path'].' HTTP/1.1\r\n'.
- 'Host: '.$uinfo['host'].'\r\n'.
- 'User-Agent: GNUBOARD\r\n'.
- 'Content-Type: application/x-www-form-urlencoded\r\n'.
- 'Content-length: ".strlen($tmp_data)."\r\n'.
- 'Connection: close\r\n\r\n'.
- $tmp_data;
- $fp = @fsockopen($uinfo['host'],$uinfo['port']);
- if(!$fp)
- return '트랙백 URL이 존재하지 않습니다.';
-
- //전송
- //$fp = fsockopen($uinfo[host],$uinfo[port]);
- fputs($fp,$send_str);
-
- //응답 받음
- while(!feof($fp)) $response .= fgets($fp,128);
- fclose($fp);
-
- //트랙백 URL인지 확인
- if(!strstr($response,''))
- return '올바른 트랙백 URL이 아닙니다.';
-
- //XML 부분만 뽑음
- $response = strchr($response,'');
- $response = substr($response,0,strpos($response,' '));
-
- //에러 검사
- if(strstr($response,'0 '))
- return '';
- else {
- $tb_error_str = strchr($response,'');
- $tb_error_str = substr($tb_error_str,0,strpos($tb_error_str,' '));
- $tb_error_str = str_replace('','',$tb_error_str);
- return '트랙백 전송중 오류가 발생했습니다: '.$tb_error_str;
- }
-}
-?>
\ No newline at end of file
diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php
index ed0ad23f1..4c221eb2d 100644
--- a/skin/board/basic/view.skin.php
+++ b/skin/board/basic/view.skin.php
@@ -45,7 +45,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($scrap_href) { echo " "; } ?>
- if ($trackback_url) { ?> }?>
diff --git a/skin/board/basic/view_comment.skin.php b/skin/board/basic/view_comment.skin.php
index b47f97e39..1b6aa323c 100644
--- a/skin/board/basic/view_comment.skin.php
+++ b/skin/board/basic/view_comment.skin.php
@@ -58,7 +58,6 @@ for ($i=0; $i