diff --git a/bbs/_common.php b/bbs/_common.php index 07519b018..e04878f17 100644 --- a/bbs/_common.php +++ b/bbs/_common.php @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/bbs/_head.php b/bbs/_head.php index a3adcd264..f680fbdc5 100644 --- a/bbs/_head.php +++ b/bbs/_head.php @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/bbs/_tail.php b/bbs/_tail.php index ecb08437a..7f752475a 100644 --- a/bbs/_tail.php +++ b/bbs/_tail.php @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/bbs/board.php b/bbs/board.php index 6c9f9fbd9..1d4814d8a 100644 --- a/bbs/board.php +++ b/bbs/board.php @@ -1,12 +1,12 @@ 1) { if ($member[mb_point] + $board[bo_read_point] < 0) - alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글읽기(".number_format($board[bo_read_point]).")가 불가합니다.\\n\\n포인트를 모으신 후 다시 글읽기 해 주십시오."); + alert('보유하신 포인트('.number_format($member[mb_point]).')가 없거나 모자라서 글읽기('.number_format($board[bo_read_point]).')가 불가합니다.'.PHP_EOL.PHP_EOL.'포인트를 모으신 후 다시 글읽기 해 주십시오.'); - insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id 글읽기", $bo_table, $wr_id, '읽기'); + insert_point($member[mb_id], $board[bo_read_point], '{$board[bo_subject]} {$wr_id} 글읽기', $bo_table, $wr_id, '읽기'); } */ // 글읽기 포인트가 설정되어 있다면 if ($board[bo_read_point] && $member[mb_point] + $board[bo_read_point] < 0) - alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글읽기(".number_format($board[bo_read_point]).")가 불가합니다.\\n\\n포인트를 모으신 후 다시 글읽기 해 주십시오."); + alert('보유하신 포인트('.number_format($member[mb_point]).')가 없거나 모자라서 글읽기('.number_format($board[bo_read_point]).')가 불가합니다.'.PHP_EOL.PHP_EOL.'포인트를 모으신 후 다시 글읽기 해 주십시오.'); - insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id 글읽기", $bo_table, $wr_id, '읽기'); + insert_point($member[mb_id], $board[bo_read_point], '{$board[bo_subject]} {$wr_id} 글읽기', $bo_table, $wr_id, '읽기'); } set_session($ss_name, TRUE); } - $g4[title] = "$group[gr_subject] > $board[bo_subject] > " . strip_tags(conv_subject($write[wr_subject], 255)); + $g4['title'] = strip_tags(conv_subject($write[wr_subject], 255).' > '.$board[bo_subject].' > '.$group[gr_subject]); } else { if ($member[mb_level] < $board[bo_list_level]) { if ($member[mb_id]) - alert("목록을 볼 권한이 없습니다.", $g4[path]); + alert('목록을 볼 권한이 없습니다.', $g4['path']); else - alert("목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", "./login.php?wr_id=$wr_id{$qstr}&url=".urlencode("board.php?bo_table=$bo_table&wr_id=$wr_id")); + alert('목록을 볼 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode('board.php?bo_table='.$bo_table.'&wr_id='.$wr_id)); } if (!$page) $page = 1; - $g4[title] = "$group[gr_subject] > $board[bo_subject] $page 페이지"; + $g4['title'] = $board[bo_subject].$page.' 페이지 > '.$group[gr_subject]; } -include_once("$g4[path]/head.sub.php"); +include_once($g4['path'].'/head.sub.php'); $width = $board[bo_table_width]; if ($width <= 100) $width .= '%'; @@ -181,7 +181,7 @@ if ($is_admin) { // 분류 사용 $is_category = false; -$category_name = ""; +$category_name = ''; if ($board[bo_use_category]) { $is_category = true; $category_name = $write[ca_name]; // 분류명 @@ -200,29 +200,29 @@ if ($board[bo_use_nogood]) $admin_href = ""; // 최고관리자 또는 그룹관리자라면 if ($member[mb_id] && ($is_admin == 'super' || $group[gr_admin] == $member[mb_id])) - $admin_href = "$g4[admin_path]/board_form.php?w=u&bo_table=$bo_table"; + $admin_href = $g4[admin_path].'/board_form.php?w=u&bo_table=.'$bo_table; if (!($board[bo_use_comment] && $cwin)) - include_once("./board_head.php"); + include_once('./board_head.php'); -echo ""; +echo ''; if (!($board[bo_use_comment] && $cwin)) { // 게시물 아이디가 있다면 게시물 보기를 INCLUDE if ($wr_id) - include_once("./view.php"); + include_once('./view.php'); // 전체목록보이기 사용이 "예" 또는 wr_id 값이 없다면 목록을 보임 //if ($board[bo_use_list_view] || empty($wr_id)) if ($member[mb_level] >= $board[bo_list_level] && $board[bo_use_list_view] || empty($wr_id)) - include_once ("./list.php"); + include_once ('./list.php'); - include_once("./board_tail.php"); + include_once('./board_tail.php'); } else - include_once("./view_comment.php"); + include_once('./view_comment.php'); -echo "\n\n"; +echo PHP_EOL.''.PHP_EOL; -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> diff --git a/bbs/board_head.php b/bbs/board_head.php index 1b63c439d..704bb5a7c 100644 --- a/bbs/board_head.php +++ b/bbs/board_head.php @@ -7,7 +7,7 @@ if ($board[bo_include_head]) // 게시판 관리의 상단 이미지 경로 if ($board[bo_image_head]) - echo ""; + echo ''; // 게시판 관리의 상단 내용 if ($board[bo_content_head]) diff --git a/bbs/board_tail.php b/bbs/board_tail.php index 892daaef4..8b8b2a2fb 100644 --- a/bbs/board_tail.php +++ b/bbs/board_tail.php @@ -7,7 +7,7 @@ if ($board[bo_content_tail]) // 게시판 관리의 하단 이미지 경로 if ($board[bo_image_tail]) - echo ""; + echo ''; // 게시판 관리의 하단 파일 경로 if ($board[bo_include_tail]) diff --git a/bbs/calendar.php b/bbs/calendar.php index d5f8793d0..a8a675b0b 100644 --- a/bbs/calendar.php +++ b/bbs/calendar.php @@ -1,19 +1,19 @@ 12) $fr_yyyy = $yyyy - 80; $to_yyyy = $yyyy + 80; -$yyyy_before_href = "$_SERVER[PHP_SELF]?yyyy=".($yyyy-1)."&mm={$mm}&cur_date={$cur_date}&fld={$fld}&delimiter={$delimiter}"; -$yyyy_after_href = "$_SERVER[PHP_SELF]?yyyy=".($yyyy+1)."&mm={$mm}&cur_date={$cur_date}&fld={$fld}&delimiter={$delimiter}"; +$yyyy_before_href = $_SERVER[PHP_SELF].'?yyyy='.($yyyy-1).'&mm='.$mm.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; +$yyyy_after_href = $_SERVER[PHP_SELF].'?yyyy='.($yyyy+1).'&mm='.$mm.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; -$mm_after_href = "$_SERVER[PHP_SELF]?yyyy={$yyyy_after}&mm={$mm_after}&cur_date={$cur_date}&fld={$fld}&delimiter={$delimiter}"; -$mm_before_href = "$_SERVER[PHP_SELF]?yyyy={$yyyy_before}&mm={$mm_before}&cur_date={$cur_date}&fld={$fld}&delimiter={$delimiter}"; +$mm_after_href = $_SERVER[PHP_SELF].'?yyyy='.$yyyy_after.'&mm='.$mm_after.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; +$mm_before_href = $_SERVER[PHP_SELF].'?yyyy='.$yyyy_before.'&mm='.$mm_before.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; -$yyyy_select = "'; for ($i=$fr_yyyy; $i<=$to_yyyy; $i++) { - if ($i == $yyyy) $selected = " selected"; + if ($i == $yyyy) $selected = ' selected'; else $selected = ""; - $yyyy_select .= ""; + $yyyy_select .= ''; } -$yyyy_select .= ""; +$yyyy_select .= ''; -$mm_select = "'; for ($i=1; $i<=12; $i++) { - if ($i == $mm) $selected = " selected"; + if ($i == $mm) $selected = ' selected'; else $selected = ""; - $mm_select .= ""; + $mm_select .= ''; } -$mm_select .= ""; +$mm_select .= ''; -$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]"; -include_once("$member_skin_path/calendar.skin.php"); +$member_skin_path = $g4['path'].'/skin/member/.'$config[cf_member_skin]; +include_once($member_skin_path.'/calendar.skin.php'); ?> - diff --git a/bbs/current_connect.php b/bbs/current_connect.php index 18d338c94..6dc4d1c87 100644 --- a/bbs/current_connect.php +++ b/bbs/current_connect.php @@ -1,15 +1,15 @@ '$config[cf_admin]' - order by a.lo_datetime desc "; + from {$g4[login_table]} a left join {$g4[member_table]} b on (a.mb_id = b.mb_id) + where a.mb_id <> '{$config[cf_admin]}' + order by a.lo_datetime desc "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { @@ -26,15 +26,15 @@ for ($i=0; $row=sql_fetch_array($result); $i++) $list[$i][name] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row[lo_ip]); } - $list[$i][num] = sprintf("%03d",$i+1); + $list[$i][num] = sprintf('%03d',$i+1); } -$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "?gr_id=$gr_id&page="); +$write_pages = get_paging($config[cf_write_pages], $page, $total_page, '?gr_id=$gr_id&page='); -echo "\n"; +echo ''; -$connect_skin_path = "$g4[path]/skin/connect/$config[cf_connect_skin]"; -include_once("$connect_skin_path/current_connect.skin.php"); +$connect_skin_path = $g4['path'].'/skin/connect/'.$config[cf_connect_skin]; +include_once($connect_skin_path.'/current_connect.skin.php'); -include_once("./_tail.php"); +include_once('./_tail.php'); ?> \ No newline at end of file diff --git a/bbs/delete.php b/bbs/delete.php index 0ea066e62..4b41c221f 100644 --- a/bbs/delete.php +++ b/bbs/delete.php @@ -1,38 +1,38 @@ '$write[wr_id]' - and wr_num = '$write[wr_num]' +$sql = " select count(*) as cnt from {$write_table} + where wr_reply like '{$reply}%' + and wr_id <> '{$write[wr_id]}' + and wr_num = '{$write[wr_num]}' and wr_is_comment = 0 "; $row = sql_fetch($sql); if ($row[cnt] && !$is_admin) - alert("이 글과 관련된 답변글이 존재하므로 삭제 할 수 없습니다.\\n\\n우선 답변글부터 삭제하여 주십시오."); + alert('이 글과 관련된 답변글이 존재하므로 삭제 할 수 없습니다..PHP_EOL.PHP_EOL.우선 답변글부터 삭제하여 주십시오.'); // 코멘트 달린 원글의 삭제 여부 -$sql = " select count(*) as cnt from $write_table - where wr_parent = '$wr_id' - and mb_id <> '$member[mb_id]' +$sql = " select count(*) as cnt from {$write_table} + where wr_parent = '{$wr_id}' + and mb_id <> '{$member[mb_id]}' and wr_is_comment = 1 "; $row = sql_fetch($sql); if ($row[cnt] >= $board[bo_count_delete] && !$is_admin) - alert("이 글과 관련된 코멘트가 존재하므로 삭제 할 수 없습니다.\\n\\n코멘트가 {$board[bo_count_delete]}건 이상 달린 원글은 삭제할 수 없습니다."); + alert('이 글과 관련된 코멘트가 존재하므로 삭제 할 수 없습니다.'.PHP_EOL.PHP_EOL.'코멘트가 '.$board[bo_count_delete].'건 이상 달린 원글은 삭제할 수 없습니다.'); // 사용자 코드 실행 -@include_once("$board_skin_path/delete.skin.php"); +@include_once($board_skin_path.'/delete.skin.php'); // 나라오름님 수정 : 원글과 코멘트수가 정상적으로 업데이트 되지 않는 오류를 잡아 주셨습니다. //$sql = " select wr_id, mb_id, wr_comment from $write_table where wr_parent = '$write[wr_id]' order by wr_id "; -$sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '$write[wr_id]' order by wr_id "; +$sql = " select wr_id, mb_id, wr_is_comment from {$write_table} where wr_parent = '{$write[wr_id]}' order by wr_id "; $result = sql_query($sql); while ($row = sql_fetch_array($result)) { @@ -74,16 +74,16 @@ while ($row = sql_fetch_array($result)) { // 원글 포인트 삭제 if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기')) - insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제"); + insert_point($row[mb_id], $board[bo_write_point] * (-1), "{$board[bo_subject]} {$row[wr_id]} 글삭제"); // 업로드된 파일이 있다면 파일삭제 - $sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' "; + $sql2 = " select * from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$row[wr_id]}' "; $result2 = sql_query($sql2); while ($row2 = sql_fetch_array($result2)) - @unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]"); + @unlink($g4['path'].'/data/file/'.$bo_table.'/'.$row2[bf_file]); // 파일테이블 행 삭제 - sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' "); + sql_query(" delete from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$row[wr_id]}' "); $count_write++; } @@ -91,20 +91,20 @@ while ($row = sql_fetch_array($result)) { // 코멘트 포인트 삭제 if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '코멘트')) - insert_point($row[mb_id], $board[bo_comment_point] * (-1), "$board[bo_subject] {$write[wr_id]}-{$row[wr_id]} 코멘트삭제"); + insert_point($row[mb_id], $board[bo_comment_point] * (-1), "{$board[bo_subject]} {$write[wr_id]}-{$row[wr_id]} 코멘트삭제"); $count_comment++; } } // 게시글 삭제 -sql_query(" delete from $write_table where wr_parent = '$write[wr_id]' "); +sql_query(" delete from {$write_table} where wr_parent = '{$write[wr_id]}' "); // 최근게시물 삭제 -sql_query(" delete from $g4[board_new_table] where bo_table = '$bo_table' and wr_parent = '$write[wr_id]' "); +sql_query(" delete from {$g4[board_new_table]} where bo_table = '{$bo_table}' and wr_parent = '{$write[wr_id]}' "); // 스크랩 삭제 -sql_query(" delete from $g4[scrap_table] where bo_table = '$bo_table' and wr_id = '$write[wr_id]' "); +sql_query(" delete from {$g4[scrap_table]} where bo_table = '{$bo_table}' and wr_id = '{$write[wr_id]}' "); // 공지사항 삭제 $notice_array = explode("\n", trim($board[bo_notice])); @@ -113,13 +113,13 @@ for ($k=0; $k 0 || $count_comment > 0) - sql_query(" update $g4[board_table] set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' "); + sql_query(" update {$g4[board_table]} set bo_count_write = bo_count_write - '{$count_write}', bo_count_comment = bo_count_comment - '{$count_comment}' where bo_table = '{$bo_table}' "); -@include_once("$board_skin_path/delete.tail.skin.php"); +@include_once($board_skin_path.'/delete.tail.skin.php'); -goto_url("./board.php?bo_table=$bo_table&page=$page" . $qstr); +goto_url('./board.php?bo_table='.$bo_table.'&page='.$page.$qstr); ?> diff --git a/bbs/delete_all.php b/bbs/delete_all.php index c7e638217..ea453b9b7 100644 --- a/bbs/delete_all.php +++ b/bbs/delete_all.php @@ -1,8 +1,8 @@ =0; $i--) { - $write = sql_fetch(" select * from $write_table where wr_id = '{$tmp_array[$i]}' "); + $write = sql_fetch(" select * from {$write_table} where wr_id = '{$tmp_array[$i]}' "); - if ($is_admin == "super") // 최고관리자 통과 + if ($is_admin == 'super') // 최고관리자 통과 ; - else if ($is_admin == "group") // 그룹관리자 + else if ($is_admin == 'group') // 그룹관리자 { $mb = get_member($write[mb_id]); if ($member[mb_id] == $group[gr_admin]) // 자신이 관리하는 그룹인가? @@ -38,7 +38,7 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) else continue; } - else if ($is_admin == "board") // 게시판관리자이면 + else if ($is_admin == 'board') // 게시판관리자이면 { $mb = get_member($write[mb_id]); if ($member[mb_id] == $board[bo_admin]) // 자신이 관리하는 게시판인가? @@ -65,18 +65,18 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) $reply = substr($write[wr_reply], 0, $len); // 원글만 구한다. - $sql = " select count(*) as cnt from $write_table - where wr_reply like '$reply%' - and wr_id <> '$write[wr_id]' - and wr_num = '$write[wr_num]' + $sql = " select count(*) as cnt from {$write_table} + where wr_reply like '{$reply}%' + and wr_id <> '{$write[wr_id]}' + and wr_num = '{$write[wr_num]}' and wr_is_comment = 0 "; $row = sql_fetch($sql); if ($row[cnt]) continue; // 나라오름님 수정 : 원글과 코멘트수가 정상적으로 업데이트 되지 않는 오류를 잡아 주셨습니다. - //$sql = " select wr_id, mb_id, wr_comment from $write_table where wr_parent = '$write[wr_id]' order by wr_id "; - $sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '$write[wr_id]' order by wr_id "; + //$sql = " select wr_id, mb_id, wr_comment from {$write_table} where wr_parent = '{$write[wr_id]}' order by wr_id "; + $sql = " select wr_id, mb_id, wr_is_comment from {$write_table} where wr_parent = '{$write[wr_id]}' order by wr_id "; $result = sql_query($sql); while ($row = sql_fetch_array($result)) { @@ -85,17 +85,17 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) { // 원글 포인트 삭제 if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기')) - insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제"); + insert_point($row[mb_id], $board[bo_write_point] * (-1), "{$board[bo_subject]} {$row[wr_id]} 글 삭제"); // 업로드된 파일이 있다면 - $sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' "; + $sql2 = " select * from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$row[wr_id]}' "; $result2 = sql_query($sql2); while ($row2 = sql_fetch_array($result2)) // 파일삭제 - @unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]"); + @unlink($g4['path'].'/data/file/'.$bo_table.'/'.$row2[bf_file]); // 파일테이블 행 삭제 - sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' "); + sql_query(" delete from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$row[wr_id]}' "); $count_write++; } @@ -103,38 +103,38 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) { // 코멘트 포인트 삭제 if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '코멘트')) - insert_point($row[mb_id], $board[bo_comment_point] * (-1), "$board[bo_subject] {$write[wr_id]}-{$row[wr_id]} 코멘트삭제"); + insert_point($row[mb_id], $board[bo_comment_point] * (-1), "{$board[bo_subject]} {$write[wr_id]}-{$row[wr_id]} 코멘트삭제"); $count_comment++; } } // 게시글 삭제 - sql_query(" delete from $write_table where wr_parent = '$write[wr_id]' "); + sql_query(" delete from {$write_table} where wr_parent = '{$write[wr_id]}' "); // 최근게시물 삭제 - sql_query(" delete from $g4[board_new_table] where bo_table = '$bo_table' and wr_parent = '$write[wr_id]' "); + sql_query(" delete from {$g4[board_new_table]} where bo_table = '{$bo_table}' and wr_parent = '{$write[wr_id]}' "); // 스크랩 삭제 - sql_query(" delete from $g4[scrap_table] where bo_table = '$bo_table' and wr_id = '$write[wr_id]' "); + sql_query(" delete from {$g4[scrap_table]} where bo_table = '{$bo_table}' and wr_id = '{$write[wr_id]}' "); // 공지사항 삭제 - $notice_array = explode("\n", trim($board[bo_notice])); + $notice_array = explode(',', trim($board[bo_notice])); $bo_notice = ""; for ($k=0; $k 0 || $count_comment > 0) - sql_query(" update $g4[board_table] set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' "); + sql_query(" update {$g4[board_table]} set bo_count_write = bo_count_write - '{$count_write}', bo_count_comment = bo_count_comment - '{$count_comment}' where bo_table = '{$bo_table}' "); // 4.11 -@include_once("$board_skin_path/delete_all.tail.skin.php"); +@include_once($board_skin_path.'/delete_all.tail.skin.php'); -goto_url("./board.php?bo_table=$bo_table&page=$page" . $qstr); +goto_url('./board.php?bo_table='.$bo_table.'&page='.$page.$qstr); ?> diff --git a/bbs/delete_comment.php b/bbs/delete_comment.php index dd9b44fb3..4f61e0f0b 100644 --- a/bbs/delete_comment.php +++ b/bbs/delete_comment.php @@ -1,87 +1,87 @@ = $mb[mb_level]) // 자신의 레벨이 크거나 같다면 통과 ; else - alert("그룹관리자의 권한보다 높은 회원의 코멘트이므로 삭제할 수 없습니다."); + alert('그룹관리자의 권한보다 높은 회원의 코멘트이므로 삭제할 수 없습니다.'); } else - alert("자신이 관리하는 그룹의 게시판이 아니므로 코멘트를 삭제할 수 없습니다."); -} else if ($is_admin == "board") { // 게시판관리자이면 + alert('자신이 관리하는 그룹의 게시판이 아니므로 코멘트를 삭제할 수 없습니다.'); +} else if ($is_admin == 'board') { // 게시판관리자이면 $mb = get_member($write[mb_id]); if ($member[mb_id] == $board[bo_admin]) { // 자신이 관리하는 게시판인가? if ($member[mb_level] >= $mb[mb_level]) // 자신의 레벨이 크거나 같다면 통과 ; else - alert("게시판관리자의 권한보다 높은 회원의 코멘트이므로 삭제할 수 없습니다."); + alert('게시판관리자의 권한보다 높은 회원의 코멘트이므로 삭제할 수 없습니다.'); } else - alert("자신이 관리하는 게시판이 아니므로 코멘트를 삭제할 수 없습니다."); + alert('자신이 관리하는 게시판이 아니므로 코멘트를 삭제할 수 없습니다.'); } else if ($member[mb_id]) { if ($member[mb_id] != $write[mb_id]) - alert("자신의 글이 아니므로 삭제할 수 없습니다."); + alert('자신의 글이 아니므로 삭제할 수 없습니다.'); } else { if (sql_password($wr_password) != $write[wr_password]) - alert("패스워드가 틀립니다."); + alert('패스워드가 틀립니다.'); } $len = strlen($write[wr_comment_reply]); if ($len < 0) $len = 0; $comment_reply = substr($write[wr_comment_reply], 0, $len); -$sql = " select count(*) as cnt from $write_table - where wr_comment_reply like '$comment_reply%' - and wr_id <> '$comment_id' - and wr_parent = '$write[wr_parent]' - and wr_comment = '$write[wr_comment]' +$sql = " select count(*) as cnt from {$write_table} + where wr_comment_reply like '{$comment_reply}%' + and wr_id <> '{$comment_id}' + and wr_parent = '{$write[wr_parent]}' + and wr_comment = '{$write[wr_comment]}' and wr_is_comment = 1 "; $row = sql_fetch($sql); if ($row[cnt] && !$is_admin) - alert("이 코멘트와 관련된 답변코멘트가 존재하므로 삭제 할 수 없습니다."); + alert('이 코멘트와 관련된 답변코멘트가 존재하므로 삭제 할 수 없습니다.'); // 코멘트 삭제 if (!delete_point($write[mb_id], $bo_table, $comment_id, '코멘트')) - insert_point($write[mb_id], $board[bo_comment_point] * (-1), "$board[bo_subject] {$write[wr_parent]}-{$comment_id} 코멘트삭제"); + insert_point($write[mb_id], $board[bo_comment_point] * (-1), "{$board[bo_subject]} {$write[wr_parent]}-{$comment_id} 코멘트삭제"); // 코멘트 삭제 -sql_query(" delete from $write_table where wr_id = '$comment_id' "); +sql_query(" delete from {$write_table} where wr_id = '{$comment_id}' "); // 코멘트가 삭제되므로 해당 게시물에 대한 최근 시간을 다시 얻는다. -$sql = " select max(wr_datetime) as wr_last from $write_table where wr_parent = '$write[wr_parent]' "; +$sql = " select max(wr_datetime) as wr_last from {$write_table} where wr_parent = '{$write[wr_parent]}' "; $row = sql_fetch($sql); // 원글의 코멘트 숫자를 감소 -sql_query(" update $write_table set wr_comment = wr_comment - 1, wr_last = '$row[wr_last]' where wr_id = '$write[wr_parent]' "); +sql_query(" update {$write_table} set wr_comment = wr_comment - 1, wr_last = '{$row[wr_last]}' where wr_id = '{$write[wr_parent]}' "); // 코멘트 숫자 감소 -sql_query(" update $g4[board_table] set bo_count_comment = bo_count_comment - 1 where bo_table = '$bo_table' "); +sql_query(" update {$g4[board_table]} set bo_count_comment = bo_count_comment - 1 where bo_table = '{$bo_table}' "); // 새글 삭제 -sql_query(" delete from $g4[board_new_table] where bo_table = '$bo_table' and wr_id = '$comment_id' "); +sql_query(" delete from {$g4[board_new_table]} where bo_table = '{$bo_table}' and wr_id = '{$comment_id}' "); // 사용자 코드 실행 -@include_once("$board_skin_path/delete_comment.skin.php"); +@include_once($board_skin_path.'/delete_comment.skin.php'); // 4.1 -@include_once("$board_skin_path/delete_comment.tail.skin.php"); +@include_once($board_skin_path.'/delete_comment.tail.skin.php'); -goto_url("./board.php?bo_table=$bo_table&wr_id=$write[wr_parent]&cwin=$cwin&page=$page" . $qstr); +goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write[wr_parent].'&cwin='.$cwin.'&page='.$page. $qstr); ?> diff --git a/bbs/download.php b/bbs/download.php index 2137444d0..15d85477c 100644 --- a/bbs/download.php +++ b/bbs/download.php @@ -1,38 +1,38 @@ $board[bo_subject] > " . conv_subject($write[wr_subject], 255) . " > 다운로드"; +$g4['title'] = '다운로드 > '.conv_subject($write[wr_subject], 255).' > '.$board[bo_subject].' > '.$group[gr_subject]; if (preg_match("/^utf/i", $g4[charset])) $original = urlencode($file[bf_source]); else $original = $file[bf_source]; -@include_once("$board_skin_path/download.tail.skin.php"); +@include_once($board_skin_path.'/download.tail.skin.php'); if(preg_match("/msie/i", $_SERVER[HTTP_USER_AGENT]) && preg_match("/5\.5/", $_SERVER[HTTP_USER_AGENT])) { header("content-type: doesn/matter"); @@ -80,7 +80,7 @@ header("pragma: no-cache"); header("expires: 0"); flush(); -$fp = fopen("$filepath", "rb"); +$fp = fopen($filepath, 'rb'); // 4.00 대체 // 서버부하를 줄이려면 print 나 echo 또는 while 문을 이용한 방법보다는 이방법이... diff --git a/bbs/email_certify.php b/bbs/email_certify.php index 8bd9cb6d1..d45982b79 100644 --- a/bbs/email_certify.php +++ b/bbs/email_certify.php @@ -1,21 +1,21 @@ \ No newline at end of file diff --git a/bbs/email_stop.php b/bbs/email_stop.php index c3ad7b431..f328b68dc 100644 --- a/bbs/email_stop.php +++ b/bbs/email_stop.php @@ -1,21 +1,21 @@ \ No newline at end of file diff --git a/bbs/formmail.php b/bbs/formmail.php index 626a2964e..b91b897fd 100644 --- a/bbs/formmail.php +++ b/bbs/formmail.php @@ -1,31 +1,31 @@ 3) - alert_close('한번 접속후 일정수의 메일만 발송할 수 있습니다.\n\n계속해서 메일을 보내시려면 다시 로그인 또는 접속하여 주십시오.'); + alert_close('한번 접속후 일정수의 메일만 발송할 수 있습니다.'.PHP_EOL.PHP_EOL.'계속해서 메일을 보내시려면 다시 로그인 또는 접속하여 주십시오.'); -$g4[title] = "메일 쓰기"; -include_once("$g4[path]/head.sub.php"); +$g4['title'] = '메일 쓰기'; +include_once($g4['path'].'/head.sub.php'); if (!$name) $name = base64_decode($email); @@ -34,10 +34,10 @@ if (!isset($type)) $type = 0; $type_checked[0] = $type_checked[1] = $type_checked[2] = ""; -$type_checked[$type] = "checked"; +$type_checked[$type] = 'checked'; -$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]"; -include_once("$member_skin_path/formmail.skin.php"); +$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin]; +include_once($member_skin_path.'/formmail.skin.php'); -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> diff --git a/bbs/formmail_send.php b/bbs/formmail_send.php index ca64bdf62..6f9289e6d 100644 --- a/bbs/formmail_send.php +++ b/bbs/formmail_send.php @@ -1,12 +1,12 @@ 1) alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.'); -$key = get_session("captcha_keystring"); +$key = get_session('captcha_keystring'); if (!($key && $key == $_POST[wr_key])) { - session_unregister("captcha_keystring"); - alert("정상적인 접근이 아닌것 같습니다."); + session_unregister('captcha_keystring'); + alert('정상적인 접근이 아닌것 같습니다.'); } for ($i=1; $i<=$attach; $i++) { - if ($_FILES["file".$i][name]) - $file[] = attach_file($_FILES["file".$i][name], $_FILES["file".$i][tmp_name]); + if ($_FILES['file'.$i][name]) + $file[] = attach_file($_FILES['file'.$i][name], $_FILES['file'.$i][tmp_name]); } $content = stripslashes($content); @@ -38,7 +38,7 @@ if ($type == 2) if ($type) { $current_url = $g4[url]; - $mail_content = "메일보내기$content"; + $mail_content = '메일보내기'.$content.''; } else $mail_content = $content; @@ -46,10 +46,10 @@ else mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file); //$html_title = $tmp_to . "님께 메일발송"; -$html_title = "메일 발송중"; -include_once("$g4[path]/head.sub.php"); +$html_title = '메일 발송중'; +include_once($g4['path'].'/head.sub.php'); -alert_close("메일을 정상적으로 발송하였습니다."); +alert_close('메일을 정상적으로 발송하였습니다.'); -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> \ No newline at end of file diff --git a/bbs/good.php b/bbs/good.php index 561f99abe..2610f1e20 100644 --- a/bbs/good.php +++ b/bbs/good.php @@ -1,71 +1,71 @@ "; +echo ''; 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('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id); - echo ""; + echo ''; exit; } if (!($bo_table && $wr_id)) - alert_close("값이 제대로 넘어오지 않았습니다."); + alert_close('값이 제대로 넘어오지 않았습니다.'); -$ss_name = "ss_view_{$bo_table}_{$wr_id}"; +$ss_name = 'ss_view_'.$bo_table.'_'.$wr_id; if (!get_session($ss_name)) - alert_close("해당 게시물에서만 추천 또는 비추천 하실 수 있습니다."); + alert_close('해당 게시물에서만 추천 또는 비추천 하실 수 있습니다.'); $row = sql_fetch(" select count(*) as cnt from {$g4[write_prefix]}{$bo_table} ", FALSE); if (!$row[cnt]) - alert_close("존재하는 게시판이 아닙니다."); + alert_close('존재하는 게시판이 아닙니다.'); -if ($good == "good" || $good == "nogood") +if ($good == 'good' || $good == 'nogood') { if($write[mb_id] == $member[mb_id]) - alert_close("자신의 글에는 추천 또는 비추천 하실 수 없습니다."); + alert_close('자신의 글에는 추천 또는 비추천 하실 수 없습니다.'); - if (!$board[bo_use_good] && $good == "good") - alert_close("이 게시판은 추천 기능을 사용하지 않습니다."); + if (!$board[bo_use_good] && $good == 'good') + alert_close('이 게시판은 추천 기능을 사용하지 않습니다.'); if (!$board[bo_use_nogood] && $good == "nogood") - alert_close("이 게시판은 비추천 기능을 사용하지 않습니다."); + alert_close('이 게시판은 비추천 기능을 사용하지 않습니다.'); - $sql = " select bg_flag from $g4[board_good_table] - where bo_table = '$bo_table' - and wr_id = '$wr_id' - and mb_id = '$member[mb_id]' + $sql = " select bg_flag from {$g4[board_good_table]} + where bo_table = '{$bo_table}' + and wr_id = '{$wr_id}' + and mb_id = '{$member[mb_id]}' and bg_flag in ('good', 'nogood') "; $row = sql_fetch($sql); if ($row[bg_flag]) { - if ($row[bg_flag] == "good") - $status = "추천"; + if ($row[bg_flag] == 'good') + $status = '추천'; else - $status = "비추천"; + $status = '비추천'; - echo ""; + echo ''; } else { // 추천(찬성), 비추천(반대) 카운트 증가 - sql_query(" update {$g4[write_prefix]}{$bo_table} set wr_{$good} = wr_{$good} + 1 where wr_id = '$wr_id' "); + sql_query(" update {$g4[write_prefix]}{$bo_table} set wr_{$good} = wr_{$good} + 1 where wr_id = '{$wr_id}' "); // 내역 생성 - sql_query(" insert $g4[board_good_table] set bo_table = '$bo_table', wr_id = '$wr_id', mb_id = '$member[mb_id]', bg_flag = '$good', bg_datetime = '$g4[time_ymdhis]' "); + sql_query(" insert {$g4[board_good_table]} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member[mb_id]}', bg_flag = '{$good}', bg_datetime = '{$g4[time_ymdhis]}' "); - if ($good == "good") - $status = "추천"; + if ($good == 'good') + $status = '추천'; else - $status = "비추천"; + $status = '비추천'; - echo ""; + echo ''; } } -@include_once("$board_skin_path/good.tail.skin.php"); +@include_once($board_skin_path.'/good.tail.skin.php'); ?> - \ No newline at end of file + \ No newline at end of file diff --git a/bbs/group.php b/bbs/group.php index f4199ed74..6b38917ea 100644 --- a/bbs/group.php +++ b/bbs/group.php @@ -1,11 +1,11 @@ @@ -35,5 +35,5 @@ include_once("./_head.php"); diff --git a/bbs/link.php b/bbs/link.php index 1df7fd6a9..df5bd795d 100644 --- a/bbs/link.php +++ b/bbs/link.php @@ -1,5 +1,5 @@ $board[bo_subject] > " . conv_subject($write[wr_subject], 255) . " > 링크"; diff --git a/bbs/list.php b/bbs/list.php index bd8fc1371..68ed38c0c 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -130,7 +130,7 @@ while ($row = sql_fetch_array($result)) $k++; } -$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "./board.php?bo_table=$bo_table".$qstr."&page="); +$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "./board.php?bo_table=$bo_table".$qstr."&page="); $list_href = ''; $prev_part_href = ''; @@ -142,11 +142,11 @@ if ($sca || $stx) //if ($prev_spt >= $min_spt) $prev_spt = $spt - $config[cf_search_part]; if (isset($min_spt) && $prev_spt >= $min_spt) - $prev_part_href = "./board.php?bo_table=$bo_table".$qstr."&spt=$prev_spt&page=1"; + $prev_part_href = "./board.php?bo_table=$bo_table".$qstr."&spt=$prev_spt&page=1"; $next_spt = $spt + $config[cf_search_part]; if ($next_spt < 0) - $next_part_href = "./board.php?bo_table=$bo_table".$qstr."&spt=$next_spt&page=1"; + $next_part_href = "./board.php?bo_table=$bo_table".$qstr."&spt=$next_spt&page=1"; } $write_href = ""; diff --git a/bbs/login.php b/bbs/login.php index 1f0dd12e9..18181a1c5 100644 --- a/bbs/login.php +++ b/bbs/login.php @@ -1,8 +1,8 @@ diff --git a/bbs/login_check.php b/bbs/login_check.php index 1214d41b3..f2c2d2757 100644 --- a/bbs/login_check.php +++ b/bbs/login_check.php @@ -1,5 +1,5 @@ diff --git a/bbs/logout.php b/bbs/logout.php index 2c78a4260..c7682e4a9 100644 --- a/bbs/logout.php +++ b/bbs/logout.php @@ -1,5 +1,5 @@ diff --git a/bbs/member_email_check.php b/bbs/member_email_check.php index fd3f2b3a2..3cd20c60b 100644 --- a/bbs/member_email_check.php +++ b/bbs/member_email_check.php @@ -1,8 +1,8 @@ + @@ -41,5 +41,5 @@ HEREDOC; } } -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> \ No newline at end of file diff --git a/bbs/member_id_check.php b/bbs/member_id_check.php index 492c7d650..e575e6599 100644 --- a/bbs/member_id_check.php +++ b/bbs/member_id_check.php @@ -1,15 +1,15 @@ "; + echo ""; } } -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> \ No newline at end of file diff --git a/bbs/member_leave.php b/bbs/member_leave.php index a7e5684be..f24aaa974 100644 --- a/bbs/member_leave.php +++ b/bbs/member_leave.php @@ -1,5 +1,5 @@ diff --git a/bbs/member_nick_check.php b/bbs/member_nick_check.php index 1459c5f16..c9d6e908b 100644 --- a/bbs/member_nick_check.php +++ b/bbs/member_nick_check.php @@ -1,14 +1,14 @@ "; + echo ""; } else { if (preg_match("/[\,]?{$mb_nick}/i", $config[cf_prohibit_id])) { - echo ""; } else { - echo ""; +echo ""; -$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]"; +$member_skin_path = "$g4['path']/skin/member/$config[cf_member_skin]"; include_once("$member_skin_path/memo.skin.php"); -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> diff --git a/bbs/memo_delete.php b/bbs/memo_delete.php index a0e9143c1..dc08ff2ee 100644 --- a/bbs/memo_delete.php +++ b/bbs/memo_delete.php @@ -1,5 +1,5 @@ diff --git a/bbs/memo_form_update.php b/bbs/memo_form_update.php index 1f2187ee5..40edeb7de 100644 --- a/bbs/memo_form_update.php +++ b/bbs/memo_form_update.php @@ -1,5 +1,5 @@ "; +echo ""; -$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]"; +$member_skin_path = "$g4['path']/skin/member/$config[cf_member_skin]"; include_once("$member_skin_path/memo_view.skin.php"); -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> diff --git a/bbs/move.php b/bbs/move.php index 99cf3b95e..19b849715 100644 --- a/bbs/move.php +++ b/bbs/move.php @@ -1,5 +1,5 @@ -\n"; +echo "\n"; include_once("$new_skin_path/new.skin.php"); -include_once("./_tail.php"); +include_once('./_tail.php'); ?> diff --git a/bbs/norobot.inc.php b/bbs/norobot.inc.php index f3dbc86d8..ac3d1fa52 100644 --- a/bbs/norobot.inc.php +++ b/bbs/norobot.inc.php @@ -58,4 +58,4 @@ if ($config[cf_use_norobot]) { set_session("ss_norobot_key", ""); } ?> - \ No newline at end of file + \ No newline at end of file diff --git a/bbs/norobot_image.php b/bbs/norobot_image.php index a3868787f..75bcc24c8 100644 --- a/bbs/norobot_image.php +++ b/bbs/norobot_image.php @@ -1,5 +1,5 @@ diff --git a/bbs/password_check.php b/bbs/password_check.php index a7a9bce9a..3e28dc206 100644 --- a/bbs/password_check.php +++ b/bbs/password_check.php @@ -1,8 +1,8 @@ + "; +echo ""; if (!$skin_dir) $skin_dir = "basic"; -$poll_skin_path = "$g4[path]/skin/poll/$skin_dir"; +$poll_skin_path = "$g4['path']/skin/poll/$skin_dir"; if (!file_exists("$poll_skin_path/poll_result.skin.php")) die("skin error"); include_once ("$poll_skin_path/poll_result.skin.php"); -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> diff --git a/bbs/poll_update.php b/bbs/poll_update.php index 06f766acd..6c0965f1a 100644 --- a/bbs/poll_update.php +++ b/bbs/poll_update.php @@ -1,5 +1,5 @@ "; +echo ""; -$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]"; +$member_skin_path = "$g4['path']/skin/member/$config[cf_member_skin]"; include_once("$member_skin_path/profile.skin.php"); -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); ?> diff --git a/bbs/register.php b/bbs/register.php index 7239e5c88..71eae5416 100644 --- a/bbs/register.php +++ b/bbs/register.php @@ -1,17 +1,17 @@ diff --git a/bbs/register_form.php b/bbs/register_form.php index 39554e99e..9a3a3e189 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index e145ddaf2..7b223f3b6 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -1,6 +1,6 @@ alert('{$msg}');"; + echo ""; /* // 결과페이지는 https 에서 http 로 변경이 되어야 함 @@ -372,7 +372,7 @@ if ($w == "") { if ($old_email != $mb_email && $config[cf_use_email_certify]) { set_session("ss_mb_id", ""); - alert("회원 정보가 수정 되었습니다.\\n\\nE-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.", $g4[path]); + alert("회원 정보가 수정 되었습니다..PHP_EOL.PHP_EOL.E-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.", $g4['path']); } else { echo " 회원정보수정 @@ -382,7 +382,7 @@ if ($w == "") { - diff --git a/bbs/register_result.php b/bbs/register_result.php index c00bcf8dd..e2c258b91 100644 --- a/bbs/register_result.php +++ b/bbs/register_result.php @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/bbs/rss.php b/bbs/rss.php index 4efc7697c..ef5ce1741 100644 --- a/bbs/rss.php +++ b/bbs/rss.php @@ -1,5 +1,5 @@ \n"; echo "".specialchars_replace($row[wr_subject])."\n"; - echo "".specialchars_replace("$g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$row[wr_id]")."\n"; + echo "".specialchars_replace("$g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$row[wr_id]")."\n"; echo "\n"; echo "".specialchars_replace($row[wr_name])."\n"; $date = $row[wr_datetime]; diff --git a/bbs/scrap.php b/bbs/scrap.php index 2dcdfa659..981a01c2d 100644 --- a/bbs/scrap.php +++ b/bbs/scrap.php @@ -1,11 +1,11 @@ diff --git a/bbs/scrap_delete.php b/bbs/scrap_delete.php index ab80c055e..f99e225f5 100644 --- a/bbs/scrap_delete.php +++ b/bbs/scrap_delete.php @@ -1,5 +1,5 @@ + "; + $href = "./login.php?$qstr&url=".urlencode("./board.php?bo_table=$bo_table&wr_id=$wr_id"); + echo ""; exit; } @@ -18,8 +18,8 @@ $row = sql_fetch($sql); if ($row[cnt]) { echo " - "; + echo ""; } $group_select = ""; if (!$sfl) $sfl = "wr_subject"; if (!$sop) $sop = "or"; -$search_skin_path = "$g4[path]/skin/search/$config[cf_search_skin]"; +$search_skin_path = "$g4['path']/skin/search/$config[cf_search_skin]"; include_once("$search_skin_path/search.skin.php"); -include_once("./_tail.php"); +include_once('./_tail.php'); ?> diff --git a/bbs/tb.php b/bbs/tb.php index afbd4cff6..23129a486 100644 --- a/bbs/tb.php +++ b/bbs/tb.php @@ -4,9 +4,9 @@ // define("_GNUBOARD_", TRUE); -include_once("./_common.php"); +include_once('./_common.php'); // 오류는 write_log() 함수로 남긴다. -include_once("$g4[path]/lib/etc.lib.php"); +include_once("$g4['path']/lib/etc.lib.php"); function tb_xml_msg($error, $msg="") { @@ -40,7 +40,7 @@ $wr = sql_fetch($sql, FALSE); 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"); + header("location:$tmp_dir/board.php?bo_table=$bo_table&wr_id=$wr_id"); exit; } @@ -48,7 +48,7 @@ if (!$wr[wr_id] || !($_POST[title] && $_POST[excerpt] && $_POST[url] && $_POST[b if (!$to_token) { if (isset($_POST)) - write_log("$g4[path]/data/log/tb.log", $_POST); + write_log("$g4['path']/data/log/tb.log", $_POST); echo tb_xml_msg(1, "토큰값이 넘어오지 않았습니다."); exit; @@ -118,7 +118,7 @@ if ($_POST[title]) $msg = "$write_table TABLE INSERT 오류"; } - //write_log("$g4[path]/data/log/aaa", $msg); + //write_log("$g4['path']/data/log/aaa", $msg); if ($msg) // 비정상(오류) { @@ -130,7 +130,7 @@ if ($_POST[title]) // 메일발송 사용 if ($config[cf_email_use] && $board[bo_use_email]) { - include_once("$g4[path]/lib/mailer.lib.php"); + include_once("$g4['path']/lib/mailer.lib.php"); // 관리자의 정보를 얻고 $super_admin = get_admin("super"); diff --git a/bbs/tb_token.php b/bbs/tb_token.php index 507312353..7a26a6e60 100644 --- a/bbs/tb_token.php +++ b/bbs/tb_token.php @@ -1,10 +1,10 @@ = $board[bo_write_level]) // 답변 링크 $reply_href = ""; if ($member[mb_level] >= $board[bo_reply_level]) - $reply_href = "./write.php?w=r&bo_table=$bo_table&wr_id=$wr_id" . $qstr; + $reply_href = "./write.php?w=r&bo_table=$bo_table&wr_id=$wr_id" . $qstr; // 수정, 삭제 링크 $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; - $delete_href = "javascript:del('./delete.php?bo_table=$bo_table&wr_id=$wr_id&page=$page".urldecode($qstr)."');"; + $update_href = "./write.php?w=u&bo_table=$bo_table&wr_id=$wr_id&page=$page" . $qstr; + $delete_href = "javascript:del('./delete.php?bo_table=$bo_table&wr_id=$wr_id&page=$page".urldecode($qstr)."');"; if ($is_admin) { set_session("ss_delete_token", $token = uniqid(time())); - $delete_href = "javascript:del('./delete.php?bo_table=$bo_table&wr_id=$wr_id&token=$token&page=$page".urldecode($qstr)."');"; + $delete_href = "javascript:del('./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 = "./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; } // 최고, 그룹관리자라면 글 복사, 이동 가능 $copy_href = $move_href = ""; if ($write[wr_reply] == "" && ($is_admin == "super" || $is_admin == "group")) { - $copy_href = "javascript:win_open('./move.php?sw=copy&bo_table=$bo_table&wr_id=$wr_id&page=$page".$qstr."', 'boardcopy', 'left=50, top=50, width=500, height=550, scrollbars=1');"; - $move_href = "javascript:win_open('./move.php?sw=move&bo_table=$bo_table&wr_id=$wr_id&page=$page".$qstr."', 'boardmove', 'left=50, top=50, width=500, height=550, scrollbars=1');"; + $copy_href = "javascript:win_open('./move.php?sw=copy&bo_table=$bo_table&wr_id=$wr_id&page=$page".$qstr."', 'boardcopy', 'left=50, top=50, width=500, height=550, scrollbars=1');"; + $move_href = "javascript:win_open('./move.php?sw=move&bo_table=$bo_table&wr_id=$wr_id&page=$page".$qstr."', 'boardmove', 'left=50, top=50, width=500, height=550, scrollbars=1');"; } $scrap_href = ""; @@ -96,15 +96,15 @@ $good_href = ""; $nogood_href = ""; if ($member[mb_id]) { // 스크랩 링크 - $scrap_href = "./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id"; + $scrap_href = "./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 = "./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 = "./good.php?bo_table=$bo_table&wr_id=$wr_id&good=nogood"; } $view = get_view($write, $board, $board_skin_path, 255); @@ -147,7 +147,7 @@ if ($board[bo_use_signature] && $view[mb_id]) $signature = conv_content($signature, 1); } -echo ""; +echo ""; include_once("$board_skin_path/view.skin.php"); @include_once("$board_skin_path/view.tail.skin.php"); diff --git a/bbs/view_comment.php b/bbs/view_comment.php index 20ac8eba4..75bd4491c 100644 --- a/bbs/view_comment.php +++ b/bbs/view_comment.php @@ -66,7 +66,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) { if ($row[mb_id] == $member[mb_id] || $is_admin) { - $list[$i][del_link] = "./delete_comment.php?bo_table=$bo_table&comment_id=$row[wr_id]&token=$token&cwin=$cwin&page=$page".$qstr; + $list[$i][del_link] = "./delete_comment.php?bo_table=$bo_table&comment_id=$row[wr_id]&token=$token&cwin=$cwin&page=$page".$qstr; $list[$i][is_edit] = true; $list[$i][is_del] = true; } @@ -74,7 +74,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) else { if (!$row[mb_id]) { - $list[$i][del_link] = "./password.php?w=x&bo_table=$bo_table&comment_id=$row[wr_id]&cwin=$cwin&page=$page".$qstr; + $list[$i][del_link] = "./password.php?w=x&bo_table=$bo_table&comment_id=$row[wr_id]&cwin=$cwin&page=$page".$qstr; $list[$i][is_del] = true; } } @@ -113,11 +113,11 @@ else include_once("$board_skin_path/view_comment.skin.php"); // 필터 -//echo "\n"; -//echo "\n"; +//echo "\n"; +//echo "\n"; if (!$member[mb_id]) // 비회원일 경우에만 - echo "\n"; + echo "\n"; @include_once("$board_skin_path/view_comment.tail.skin.php"); ?> \ No newline at end of file diff --git a/bbs/write.php b/bbs/write.php index 7b2aa8d0f..d7dd32ccb 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -1,5 +1,5 @@ 0) ? $member[mb_point] : 0; if ($tmp_point + $board[bo_write_point] < 0 && !$is_admin) - alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글쓰기(".number_format($board[bo_write_point]).")가 불가합니다.\\n\\n포인트를 적립하신 후 다시 글쓰기 해 주십시오."); + alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글쓰기(".number_format($board[bo_write_point]).")가 불가합니다..PHP_EOL.PHP_EOL.포인트를 적립하신 후 다시 글쓰기 해 주십시오."); $title_msg = "글쓰기"; } @@ -56,7 +56,7 @@ else if ($w == "u") if ($member[mb_id]) alert("글을 수정할 권한이 없습니다."); else - alert("글을 수정할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", "./login.php?$qstr&url=".urlencode("$_SERVER[PHP_SELF]?bo_table=$bo_table")); + alert("글을 수정할 권한이 없습니다..PHP_EOL.PHP_EOL.회원이시라면 로그인 후 이용해 보십시오.", "./login.php?$qstr&url=".urlencode("$_SERVER[PHP_SELF]?bo_table=$bo_table")); } $len = strlen($write[wr_reply]); @@ -71,7 +71,7 @@ else if ($w == "u") and wr_is_comment = 0 "; $row = sql_fetch($sql); if ($row[cnt] && !$is_admin) - alert("이 글과 관련된 답변글이 존재하므로 수정 할 수 없습니다.\\n\\n답변글이 있는 원글은 수정할 수 없습니다."); + alert("이 글과 관련된 답변글이 존재하므로 수정 할 수 없습니다..PHP_EOL.PHP_EOL.답변글이 있는 원글은 수정할 수 없습니다."); // 코멘트 달린 원글의 수정 여부 $sql = " select count(*) as cnt from $write_table @@ -80,7 +80,7 @@ else if ($w == "u") and wr_is_comment = 1 "; $row = sql_fetch($sql); if ($row[cnt] >= $board[bo_count_modify] && !$is_admin) - alert("이 글과 관련된 코멘트가 존재하므로 수정 할 수 없습니다.\\n\\n코멘트가 {$board[bo_count_modify]}건 이상 달린 원글은 수정할 수 없습니다."); + alert("이 글과 관련된 코멘트가 존재하므로 수정 할 수 없습니다..PHP_EOL.PHP_EOL.코멘트가 {$board[bo_count_modify]}건 이상 달린 원글은 수정할 수 없습니다."); $title_msg = "글수정"; } @@ -90,17 +90,17 @@ else if ($w == "r") if ($member[mb_id]) alert("글을 답변할 권한이 없습니다."); else - alert("글을 답변할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", "./login.php?$qstr&url=".urlencode("$_SERVER[PHP_SELF]?bo_table=$bo_table")); + alert("글을 답변할 권한이 없습니다..PHP_EOL.PHP_EOL.회원이시라면 로그인 후 이용해 보십시오.", "./login.php?$qstr&url=".urlencode("$_SERVER[PHP_SELF]?bo_table=$bo_table")); } /* if ($member[mb_point] + $board[bo_comment_point] < 0) - alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글답변(".number_format($board[bo_comment_point]).")가 불가합니다.\\n\\n포인트를 적립하신 후 다시 글답변 해 주십시오."); + alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글답변(".number_format($board[bo_comment_point]).")가 불가합니다..PHP_EOL.PHP_EOL.포인트를 적립하신 후 다시 글답변 해 주십시오."); */ $tmp_point = $member[mb_point] ? $member[mb_point] : 0; if ($tmp_point + $board[bo_write_point] < 0 && !$is_admin) - alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글답변(".number_format($board[bo_comment_point]).")가 불가합니다.\\n\\n포인트를 적립하신 후 다시 글답변 해 주십시오."); + alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 글답변(".number_format($board[bo_comment_point]).")가 불가합니다..PHP_EOL.PHP_EOL.포인트를 적립하신 후 다시 글답변 해 주십시오."); //if (preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board[bo_notice])) if (in_array((int)$wr_id, $notice_array)) @@ -131,7 +131,7 @@ else if ($w == "r") // 최대 답변은 테이블에 잡아놓은 wr_reply 사이즈만큼만 가능합니다. if (strlen($reply_array[wr_reply]) == 10) - alert("더 이상 답변하실 수 없습니다.\\n\\n답변은 10단계 까지만 가능합니다."); + alert("더 이상 답변하실 수 없습니다..PHP_EOL.PHP_EOL.답변은 10단계 까지만 가능합니다."); $reply_len = strlen($reply_array[wr_reply]) + 1; if ($board[bo_reply_order]) { @@ -151,7 +151,7 @@ else if ($w == "r") if (!$row[reply]) $reply_char = $begin_reply_char; else if ($row[reply] == $end_reply_char) // A~Z은 26 입니다. - alert("더 이상 답변하실 수 없습니다.\\n\\n답변은 26개 까지만 가능합니다."); + alert("더 이상 답변하실 수 없습니다..PHP_EOL.PHP_EOL.답변은 26개 까지만 가능합니다."); else $reply_char = chr(ord($row[reply]) + $reply_number); @@ -166,7 +166,7 @@ else if ($w == "r") if ($group[gr_use_access]) { if (!$member[mb_id]) - alert("접근 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", "login.php?$qstr&url=".urlencode("$_SERVER[PHP_SELF]?bo_table=$bo_table")); + alert("접근 권한이 없습니다..PHP_EOL.PHP_EOL.회원이시라면 로그인 후 이용해 보십시오.", "login.php?$qstr&url=".urlencode("$_SERVER[PHP_SELF]?bo_table=$bo_table")); if ($is_admin == 'super' || $group[gr_admin] == $member[mb_id] || $board[bo_admin] == $member[mb_id]) ; // 통과 @@ -175,14 +175,14 @@ if ($group[gr_use_access]) $sql = " select gr_id from $g4[group_member_table] where gr_id = '$board[gr_id]' and mb_id = '$member[mb_id]' "; $row = sql_fetch($sql); if (!$row[gr_id]) - alert("접근 권한이 없으므로 글쓰기가 불가합니다.\\n\\n궁금하신 사항은 관리자에게 문의 바랍니다."); + alert("접근 권한이 없으므로 글쓰기가 불가합니다..PHP_EOL.PHP_EOL.궁금하신 사항은 관리자에게 문의 바랍니다."); } } -$g4[title] = "$group[gr_subject] > $board[bo_subject] > " . $title_msg; +$g4['title'] = "$group[gr_subject] > $board[bo_subject] > " . $title_msg; if (($w == "u" || $w == "r") && !$write[wr_id]) - alert("글이 존재하지 않습니다.\\n\\n삭제되었거나 이동된 경우입니다.", $g4[path]); + alert("글이 존재하지 않습니다..PHP_EOL.PHP_EOL.삭제되었거나 이동된 경우입니다.", $g4['path']); $is_notice = false; if ($is_admin && $w != "r") @@ -356,7 +356,7 @@ else $write_max = (int)$board[bo_write_max]; } -include_once("$g4[path]/head.sub.php"); +include_once($g4['path'].'/head.sub.php'); include_once("./board_head.php"); // 자동등록방지 @@ -397,14 +397,14 @@ if ($file_length < 0) include_once ("$board_skin_path/write.skin.php"); if (!$member[mb_id]) - echo "\n"; + echo "\n"; // 필터 -//echo "\n"; -//echo "\n"; +//echo "\n"; +//echo "\n"; include_once("./board_tail.php"); -include_once("$g4[path]/tail.sub.php"); +include_once($g4['path'].'/tail.sub.php'); @include_once ("$board_skin_path/write.tail.skin.php"); ?> diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php index 206a3cf0a..34e0ba412 100644 --- a/bbs/write_comment_update.php +++ b/bbs/write_comment_update.php @@ -1,5 +1,5 @@ 50) { @@ -9,7 +9,7 @@ if (substr_count($wr_content, "&#") > 50) { @include_once("$board_skin_path/write_comment_update.head.skin.php"); -$g4[title] = $wr_subject . "코멘트입력"; +$g4['title'] = $wr_subject . "코멘트입력"; $w = $_POST["w"]; $wr_name = strip_tags($_POST["wr_name"]); @@ -51,7 +51,7 @@ if ($row[prev_md5] == $curr_md5 && $w != 'cu' && !$is_admin) $wr = get_write($write_table, $wr_id); if (!$wr[wr_id]) - alert("글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동하였을 수 있습니다."); + alert("글이 존재하지 않습니다..PHP_EOL.PHP_EOL.글이 삭제되었거나 이동하였을 수 있습니다."); // 자동등록방지 검사 //include_once ("./norobot_check.inc.php"); @@ -90,12 +90,12 @@ if ($w == "c") // 코멘트 입력 { /* if ($member[mb_point] + $board[bo_comment_point] < 0 && !$is_admin) - alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 코멘트쓰기(".number_format($board[bo_comment_point]).")가 불가합니다.\\n\\n포인트를 적립하신 후 다시 코멘트를 써 주십시오."); + alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 코멘트쓰기(".number_format($board[bo_comment_point]).")가 불가합니다..PHP_EOL.PHP_EOL.포인트를 적립하신 후 다시 코멘트를 써 주십시오."); */ // 코멘트쓰기 포인트설정시 회원의 포인트가 음수인 경우 코멘트를 쓰지 못하던 버그를 수정 (곱슬최씨님) $tmp_point = ($member[mb_point] > 0) ? $member[mb_point] : 0; if ($tmp_point + $board[bo_comment_point] < 0 && !$is_admin) - alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 코멘트쓰기(".number_format($board[bo_comment_point]).")가 불가합니다.\\n\\n포인트를 적립하신 후 다시 코멘트를 써 주십시오."); + alert("보유하신 포인트(".number_format($member[mb_point]).")가 없거나 모자라서 코멘트쓰기(".number_format($board[bo_comment_point]).")가 불가합니다..PHP_EOL.PHP_EOL.포인트를 적립하신 후 다시 코멘트를 써 주십시오."); // 코멘트 답변 if ($comment_id) @@ -104,12 +104,12 @@ if ($w == "c") // 코멘트 입력 where wr_id = '$comment_id' "; $reply_array = sql_fetch($sql); if (!$reply_array[wr_id]) - alert("답변할 코멘트가 없습니다.\\n\\n답변하는 동안 코멘트가 삭제되었을 수 있습니다."); + alert("답변할 코멘트가 없습니다..PHP_EOL.PHP_EOL.답변하는 동안 코멘트가 삭제되었을 수 있습니다."); $tmp_comment = $reply_array[wr_comment]; if (strlen($reply_array[wr_comment_reply]) == 5) - alert("더 이상 답변하실 수 없습니다.\\n\\n답변은 5단계 까지만 가능합니다."); + alert("더 이상 답변하실 수 없습니다..PHP_EOL.PHP_EOL.답변은 5단계 까지만 가능합니다."); $reply_len = strlen($reply_array[wr_comment_reply]) + 1; if ($board[bo_reply_order]) { @@ -140,7 +140,7 @@ if ($w == "c") // 코멘트 입력 if (!$row[reply]) $reply_char = $begin_reply_char; else if ($row[reply] == $end_reply_char) // A~Z은 26 입니다. - alert("더 이상 답변하실 수 없습니다.\\n\\n답변은 26개 까지만 가능합니다."); + alert("더 이상 답변하실 수 없습니다..PHP_EOL.PHP_EOL.답변은 26개 까지만 가능합니다."); else $reply_char = chr(ord($row[reply]) + $reply_number); @@ -219,9 +219,9 @@ if ($w == "c") // 코멘트 입력 $subject = "'{$board[bo_subject]}' 게시판에 {$str}글이 올라왔습니다."; // 4.00.15 - 메일로 보내는 코멘트의 바로가기 링크 수정 - $link_url = "$g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$wr_id&$qstr#c_{$comment_id}"; + $link_url = "$g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$wr_id&$qstr#c_{$comment_id}"; - include_once("$g4[path]/lib/mailer.lib.php"); + include_once("$g4['path']/lib/mailer.lib.php"); ob_start(); include_once ("./write_update_mail.php"); @@ -339,5 +339,5 @@ else if ($w == "cu") // 코멘트 수정 @include_once("$board_skin_path/write_comment_update.skin.php"); @include_once("$board_skin_path/write_comment_update.tail.skin.php"); -goto_url("./board.php?bo_table=$bo_table&wr_id=$wr[wr_parent]&page=$page" . $qstr . "&cwin=$cwin#c_{$comment_id}"); +goto_url("./board.php?bo_table=$bo_table&wr_id=$wr[wr_parent]&page=$page" . $qstr . "&cwin=$cwin#c_{$comment_id}"); ?> diff --git a/bbs/write_update.php b/bbs/write_update.php index 17e2be875..119e7bb80 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -1,6 +1,6 @@ 50) { @@ -10,7 +10,7 @@ if (substr_count($wr_content, "&#") > 50) { @include_once("$board_skin_path/write_update.head.skin.php"); -include_once("$g4[path]/lib/trackback.lib.php"); +include_once("$g4['path']/lib/trackback.lib.php"); /* $filters = explode(",", $config[cf_filter]); @@ -30,7 +30,7 @@ for ($i=0; $i 보안 > 사용자정의수준 > 스크립팅 > Action 스크립팅 > 사용 안 함" 일 경우의 오류 처리 // 이 옵션을 사용 안 함으로 설정할 경우 어떤 스크립트도 실행 되지 않습니다. @@ -161,7 +161,7 @@ for ($i=0; $i\n"; - echo ""; + echo ""; } } @@ -631,7 +631,7 @@ else $https_url = "."; if ($file_upload_msg) - alert($file_upload_msg, "{$https_url}/board.php?bo_table=$bo_table&wr_id=$wr_id&page=$page" . $qstr); + alert($file_upload_msg, "{$https_url}/board.php?bo_table=$bo_table&wr_id=$wr_id&page=$page" . $qstr); else - goto_url("{$https_url}/board.php?bo_table=$bo_table&wr_id=$wr_id&page=$page" . $qstr); + goto_url("{$https_url}/board.php?bo_table=$bo_table&wr_id=$wr_id&page=$page" . $qstr); ?> diff --git a/bbs/zip.php b/bbs/zip.php index 538ea20b6..8acbabd3e 100644 --- a/bbs/zip.php +++ b/bbs/zip.php @@ -1,5 +1,5 @@