Skip to content

Commit

Permalink
잘못된 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Jun 13, 2019
1 parent a6d851e commit 1723880
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion adm/board_list_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.');
}

$p_bo_subject = is_array($_POST['bo_subject']) ? strip_tags($_POST['bo_subject'][$k]) : '';

$sql = " update {$g5['board_table']}
set gr_id = '".sql_real_escape_string(strip_tags($_POST['gr_id'][$k]))."',
bo_subject = '".sql_real_escape_string(strip_tags($_POST['bo_subject'][$k]))."',
bo_subject = '".$p_bo_subject."',
bo_device = '".sql_real_escape_string(strip_tags($_POST['bo_device'][$k]))."',
bo_skin = '".sql_real_escape_string(strip_tags($_POST['bo_skin'][$k]))."',
bo_mobile_skin = '".sql_real_escape_string(strip_tags($_POST['bo_mobile_skin'][$k]))."',
Expand Down
5 changes: 3 additions & 2 deletions adm/boardgroup_list_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
{
$k = $_POST['chk'][$i];
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $_POST['group_id'][$k]);
$gr_subject = sql_real_escape_string(strip_tags($_POST['gr_subject'][$k]));
$gr_subject = is_array($_POST['gr_subject']) ? strip_tags($_POST['gr_subject'][$k]) : '';
$gr_admin = is_array($_POST['gr_admin']) ? strip_tags($_POST['gr_admin'][$k]) : '';

if($_POST['act_button'] == '선택수정') {
$sql = " update {$g5['group_table']}
Expand All @@ -30,7 +31,7 @@
gr_order = '".sql_real_escape_string($_POST['gr_order'][$k])."'
where gr_id = '{$gr_id}' ";
if ($is_admin != 'super')
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
$sql .= " and gr_admin = '{$gr_admin}' ";
sql_query($sql);
} else if($_POST['act_button'] == '선택삭제') {
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
Expand Down
4 changes: 2 additions & 2 deletions head.sub.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
$g5_head_title .= " | ".$config['cf_title'];
}

$g5['title'] = strip_tags(get_text($g5['title']));
$g5_head_title = strip_tags(get_text($g5_head_title));
$g5['title'] = strip_tags($g5['title']);
$g5_head_title = strip_tags($g5_head_title);

// 현재 접속자
// 게시판 제목에 ' 포함되면 오류 발생
Expand Down
2 changes: 1 addition & 1 deletion lib/common.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3425,7 +3425,7 @@ function get_head_title($title){
global $g5;

if( isset($g5['board_title']) && $g5['board_title'] ){
$title = strip_tags(get_text($g5['board_title']));
$title = strip_tags($g5['board_title']);
}

return $title;
Expand Down
4 changes: 2 additions & 2 deletions theme/basic/head.sub.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
$g5_head_title .= " | ".$config['cf_title'];
}

$g5['title'] = strip_tags(get_text($g5['title']));
$g5_head_title = strip_tags(get_text($g5_head_title));
$g5['title'] = strip_tags($g5['title']);
$g5_head_title = strip_tags($g5_head_title);

// 현재 접속자
// 게시판 제목에 ' 포함되면 오류 발생
Expand Down

0 comments on commit 1723880

Please sign in to comment.