add editorconfig, fix syntax error only
This commit is contained in:
parent
24b10b62fc
commit
49561f32e5
5 changed files with 94 additions and 68 deletions
23
.editorconfig
Normal file
23
.editorconfig
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[**.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[**.css]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
|
||||
[**.php]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[**.html]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"php.version": "5.3"
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
|||
$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 {$g5['board_table']} set bo_count_comment = bo_count_comment - 1 where bo_table = '$bo_table' ");
|
||||
|
|
|
|||
|
|
@ -260,10 +260,10 @@ if ($w == '' || $w == 'r') {
|
|||
wr_last = '".G5_TIME_YMDHIS."',
|
||||
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
|
||||
ch_id = '$character['ch_id']',
|
||||
ch_side = '$character['ch_side']',
|
||||
ch_class = '$character['ch_class']',
|
||||
ti_id = '$character['ch_title']',
|
||||
ch_id = '{$character['ch_id']}',
|
||||
ch_side = '{$character['ch_side']}',
|
||||
ch_class = '{$character['ch_class']}',
|
||||
ti_id = '{$character['ch_title']}',
|
||||
wr_width = '$wr_width',
|
||||
wr_height = '$wr_height',
|
||||
wr_url = '$wr_url',
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ if ($w == "c") // 코멘트 입력
|
|||
and SUBSTRING(wr_comment_reply, $reply_len, 1) <> '' ";
|
||||
}
|
||||
if ($reply_array['wr_comment_reply'])
|
||||
$sql .= " and wr_comment_reply like '$reply_array['wr_comment_reply']%' ";
|
||||
$sql .= " and wr_comment_reply like '{$reply_array['wr_comment_reply']}%' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if (!$row['reply'])
|
||||
|
|
@ -158,9 +158,9 @@ if ($w == "c") // 코멘트 입력
|
|||
}
|
||||
|
||||
$sql = " insert into $write_table
|
||||
set ca_name = '$wr['ca_name']',
|
||||
set ca_name = '{$wr['ca_name']}',
|
||||
wr_option = '$wr_secret',
|
||||
wr_num = '$wr['wr_num']',
|
||||
wr_num = '{$wr['wr_num']}',
|
||||
wr_reply = '',
|
||||
wr_parent = '$wr_id',
|
||||
wr_is_comment = '1',
|
||||
|
|
@ -173,7 +173,7 @@ if ($w == "c") // 코멘트 입력
|
|||
wr_name = '$wr_name',
|
||||
wr_email = '$wr_email',
|
||||
wr_homepage = '$wr_homepage',
|
||||
wr_datetime = '$g5['time_ymdhis']',
|
||||
wr_datetime = '{$g5['time_ymdhis']}',
|
||||
wr_last = '',
|
||||
wr_ip = '$_SERVER[REMOTE_ADDR]',
|
||||
wr_1 = '$wr_1',
|
||||
|
|
@ -191,14 +191,14 @@ if ($w == "c") // 코멘트 입력
|
|||
$comment_id = mysql_insert_id();
|
||||
|
||||
// 원글에 코멘트수 증가 & 마지막 시간 반영
|
||||
sql_query(" update $write_table set wr_comment = wr_comment + 1, wr_last = '$g5['time_ymdhis']' where wr_id = '$wr_id' ");
|
||||
sql_query(" update $write_table set wr_comment = wr_comment + 1, wr_last = '{$g5['time_ymdhis']}' where wr_id = '$wr_id' ");
|
||||
|
||||
// 새글 INSERT
|
||||
//sql_query(" insert into $g5['board_new_table'] ( bo_table, wr_id, wr_parent, bn_datetime ) values ( '$bo_table', '$comment_id', '$wr_id', '$g5['time_ymdhis']' ) ");
|
||||
sql_query(" insert into $g5['board_new_table'] ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '$bo_table', '$comment_id', '$wr_id', '$g5['time_ymdhis']', '$member['mb_id']' ) ");
|
||||
sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '$bo_table', '$comment_id', '$wr_id', '{$g5['time_ymdhis']}', '{$member['mb_id']}' ) ");
|
||||
|
||||
// 코멘트 1 증가
|
||||
sql_query(" update $g5['board_table'] set bo_count_comment = bo_count_comment + 1 where bo_table = '$bo_table' ");
|
||||
sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + 1 where bo_table = '$bo_table' ");
|
||||
|
||||
// 포인트 부여
|
||||
insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id}-{$comment_id} 코멘트쓰기", $bo_table, $comment_id, '코멘트');
|
||||
|
|
@ -212,7 +212,7 @@ if ($w == "c") // 코멘트 입력
|
|||
$board_admin = get_admin("board");
|
||||
|
||||
$wr_subject = get_text(stripslashes($wr['wr_subject']));
|
||||
$wr_content = nl2br(get_text(stripslashes("----- 원글 -----\n\n$wr['wr_subject']\n\n\n----- 코멘트 -----\n\n$wr_content")));
|
||||
$wr_content = nl2br(get_text(stripslashes("----- 원글 -----\n\n{$wr['wr_subject']}\n\n\n----- 코멘트 -----\n\n$wr_content")));
|
||||
|
||||
$warr = array( ""=>"입력", "u"=>"수정", "r"=>"답변", "c"=>"코멘트", "cu"=>"코멘트 수정" );
|
||||
$str = $warr[$w];
|
||||
|
|
@ -244,7 +244,7 @@ if ($w == "c") // 코멘트 입력
|
|||
// 코멘트 쓴 모든이에게 메일 발송이 되어 있다면 (자신에게는 발송하지 않는다)
|
||||
if ($config['cf_email_wr_comment_all']) {
|
||||
$sql = " select distinct wr_email from $write_table
|
||||
where wr_email not in ( '$wr['wr_email']', '$member['mb_email']', '' )
|
||||
where wr_email not in ( '{$wr['wr_email']}', '{$member['mb_email']}', '' )
|
||||
and wr_parent = '$wr_id' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result))
|
||||
|
|
@ -338,5 +338,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}");
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue