diff --git a/bbs/write_update.php b/bbs/write_update.php index 119e7bb80..777d4f72b 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -1,16 +1,16 @@ 50) { - alert("내용에 올바르지 않은 코드가 다수 포함되어 있습니다."); +if (substr_count($wr_content, '&#') > 50) { + alert('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.'); exit; } -@include_once("$board_skin_path/write_update.head.skin.php"); +@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,89 +30,89 @@ for ($i=0; $i= ($g4[server_time] - $config[cf_delay_sec]) && !$is_admin) - alert("너무 빠른 시간내에 게시물을 연속해서 올릴 수 없습니다."); + alert('너무 빠른 시간내에 게시물을 연속해서 올릴 수 없습니다.'); set_session("ss_datetime", $g4[server_time]); @@ -120,7 +120,7 @@ if ($w == "" || $w == "r") $row = sql_fetch(" select MD5(CONCAT(wr_ip, wr_subject, wr_content)) as prev_md5 from $write_table order by wr_id desc limit 1 "); $curr_md5 = md5($_SERVER[REMOTE_ADDR].$wr_subject.$wr_content); if ($row[prev_md5] == $curr_md5 && !$is_admin) - alert("동일한 내용을 연속해서 등록할 수 없습니다."); + alert('동일한 내용을 연속해서 등록할 수 없습니다.'); } // 자동등록방지 검사 @@ -131,17 +131,17 @@ if (!$is_member) { $key = get_session("captcha_keystring"); if (!($key && $key == $_POST[wr_key])) { session_unregister("captcha_keystring"); - alert("정상적인 접근이 아닌것 같습니다."); + alert('정상적인 접근이 아닌것 같습니다.'); } } } if (!isset($_POST[wr_subject]) || !trim($_POST[wr_subject])) - alert("제목을 입력하여 주십시오."); + alert('제목을 입력하여 주십시오.'); // 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.) -@mkdir("$g4['path']/data/file/$bo_table", 0707); -@chmod("$g4['path']/data/file/$bo_table", 0707); +@mkdir($g4['path'].'/data/file/'.$bo_table, 0707); +@chmod($g4['path'].'/data/file/'.$bo_table, 0707); // "인터넷옵션 > 보안 > 사용자정의수준 > 스크립팅 > Action 스크립팅 > 사용 안 함" 일 경우의 오류 처리 // 이 옵션을 사용 안 함으로 설정할 경우 어떤 스크립트도 실행 되지 않습니다. @@ -151,7 +151,7 @@ $chars_array = array_merge(range(0,9), range('a','z'), range('A','Z')); //print_r2($chars_array); exit; // 가변 파일 업로드 -$file_upload_msg = ""; +$file_upload_msg = ''; $upload = array(); for ($i=0; $i $board[bo_upload_size]) { - $file_upload_msg .= "\'{$filename}\' 파일의 용량(".number_format($filesize)." 바이트)이 게시판에 설정(".number_format($board[bo_upload_size])." 바이트)된 값보다 크므로 업로드 하지 않습니다.\\n"; + $file_upload_msg .= '"'.$filename.'" 파일의 용량('.number_format($filesize).' 바이트)이 게시판에 설정('.number_format($board[bo_upload_size]).' 바이트)된 값보다 크므로 업로드 하지 않습니다.'.PHP_EOL; continue; } @@ -219,7 +219,7 @@ for ($i=0; $i=0; $i--) { - $row2 = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' "); + $row2 = sql_fetch(" select bf_file from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' "); // 정보가 있다면 빠집니다. if ($row2[bf_file]) break; // 그렇지 않다면 정보를 삭제합니다. - sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' "); + sql_query(" delete from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' "); } //------------------------------------------------------------------------------ @@ -546,33 +546,33 @@ if ($secret) set_session("ss_secret_{$bo_table}_{$wr_num}", TRUE); // 메일발송 사용 (수정글은 발송하지 않음) -if (!($w == "u" || $w == "cu") && $config[cf_email_use] && $board[bo_use_email]) +if (!($w == 'u' || $w == 'cu') && $config[cf_email_use] && $board[bo_use_email]) { // 관리자의 정보를 얻고 - $super_admin = get_admin("super"); - $group_admin = get_admin("group"); - $board_admin = get_admin("board"); + $super_admin = get_admin('super'); + $group_admin = get_admin('group'); + $board_admin = get_admin('board'); $wr_subject = get_text(stripslashes($wr_subject)); $tmp_html = 0; - if (strstr($html, "html1")) + if (strstr($html, 'html1')) $tmp_html = 1; - else if (strstr($html, "html2")) + else if (strstr($html, 'html2')) $tmp_html = 2; $wr_content = conv_content(stripslashes($wr_content), $tmp_html); - $warr = array( ""=>"입력", "u"=>"수정", "r"=>"답변", "c"=>"코멘트", "cu"=>"코멘트 수정" ); + $warr = array( ''=>'입력', 'u'=>'수정', 'r'=>'답변', 'c'=>'코멘트', 'cu'=>'코멘트 수정' ); $str = $warr[$w]; - $subject = "'{$board[bo_subject]}' 게시판에 {$str}글이 올라왔습니다."; - $link_url = "$g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$wr_id&$qstr"; + $subject = '"'.$board[bo_subject].'" 게시판에 '.$str.'글이 올라왔습니다.'; + $link_url = $g4[url].'/'.$g4[bbs].'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&'.$qstr; - include_once("$g4['path']/lib/mailer.lib.php"); + include_once($g4['path'].'/lib/mailer.lib.php'); ob_start(); - include_once ("./write_update_mail.php"); + include_once ('./write_update_mail.php'); $content = ob_get_contents(); ob_end_clean(); @@ -585,15 +585,15 @@ if (!($w == "u" || $w == "cu") && $config[cf_email_use] && $board[bo_use_email]) if ($config[cf_email_wr_super_admin]) $array_email[] = $super_admin[mb_email]; // 옵션에 메일받기가 체크되어 있고, 게시자의 메일이 있다면 - if (strstr($wr[wr_option], "mail") && $wr[wr_email]) { + if (strstr($wr[wr_option], 'mail') && $wr[wr_email]) { // 원글 메일발송에 체크가 되어 있다면 if ($config[cf_email_wr_write]) $array_email[] = $wr[wr_email]; // 코멘트 쓴 모든이에게 메일 발송이 되어 있다면 (자신에게는 발송하지 않는다) 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]', '' ) - and wr_parent = '$wr_id' "; + $sql = " select distinct wr_email from {$write_table} + 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)) $array_email[] = $row[wr_email]; @@ -609,29 +609,29 @@ if (!($w == "u" || $w == "cu") && $config[cf_email_use] && $board[bo_use_email]) } // 사용자 코드 실행 -@include_once ("$board_skin_path/write_update.skin.php"); +@include_once ($board_skin_path.'/write_update.skin.php'); // 트랙백 주소가 있다면 -if (($w != "u" && $wr_trackback) || ($w=="u" && $wr_trackback && $re_trackback)) +if (($w != 'u' && $wr_trackback) || ($w=='u' && $wr_trackback && $re_trackback)) { - $trackback_url = "$g4[url]/$g4[bbs]/tb.php/$bo_table/$wr_id"; + $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 "\n"; - echo ""; + echo ''.PHP_EOL; + echo ''; } } -@include_once("$board_skin_path/write_update.tail.skin.php"); +@include_once($board_skin_path.'/write_update.tail.skin.php'); if ($g4[https_url]) - $https_url = "$g4[url]/$g4[bbs]"; + $https_url = $g4[url].'/'.$g4[bbs]; else - $https_url = "."; + $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 8acbabd3e..6bd6d9618 100644 --- a/bbs/zip.php +++ b/bbs/zip.php @@ -6,7 +6,7 @@ include_once('./_common.php'); //$zipfile = file("./zip.db"); $zipfile = array(); -$fp = fopen("./zip.db", "r"); +$fp = fopen('./zip.db', 'r'); while(!feof($fp)) { $zipfile[] = fgets($fp, 4096); } @@ -37,7 +37,7 @@ if ($addr1) } } - if (!$search_count) alert("찾으시는 주소가 없습니다."); + if (!$search_count) alert('찾으시는 주소가 없습니다.'); } /* 기존의 DB에서 불러오는 방식 @@ -62,11 +62,11 @@ if ($addr1) } */ -$g4['title'] = "우편번호 검색"; +$g4['title'] = '우편번호 검색'; include_once($g4['path'].'/head.sub.php'); -$member_skin_path = "$g4['path']/skin/member/$config[cf_member_skin]"; -include_once("$member_skin_path/zip.skin.php"); +$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin]; +include_once($member_skin_path.'/zip.skin.php'); include_once($g4['path'].'/tail.sub.php'); ?>