From a9ba11f35fdf2583bc6bcbc182f01e03cc0bf560 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 26 Mar 2014 09:55:43 +0900 Subject: [PATCH 01/11] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EC=83=81?= =?UTF-8?q?=EB=8B=A8=20=EB=A9=94=EB=89=B4=20=EA=B2=80=EC=83=89=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=20=EA=B4=80=EB=A0=A8=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/head.php | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/mobile/head.php b/mobile/head.php index df88585c3..3a580e3d6 100644 --- a/mobile/head.php +++ b/mobile/head.php @@ -115,14 +115,28 @@ include_once(G5_LIB_PATH.'/popular.lib.php'); From a09ad95cc0f860f85e3b75f4bcb589ad4b0aa374 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 26 Mar 2014 11:03:50 +0900 Subject: [PATCH 02/11] =?UTF-8?q?=EC=9C=A0=EC=B0=BD=ED=99=94=EB=8B=98=20?= =?UTF-8?q?=EC=A0=95=EA=B7=9C=EC=8B=9D=20=EC=A0=9C=EC=95=88=EC=BD=94?= =?UTF-8?q?=EB=93=9C=EB=A1=9C=20=EC=9D=BC=EB=B6=80=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 422d43ddc..e2a52a832 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -48,7 +48,8 @@ function get_microtime() // 한페이지에 보여줄 행, 현재페이지, 총페이지수, URL function get_paging($write_pages, $cur_page, $total_page, $url, $add="") { - $url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url); + //$url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url); + $url = preg_replace('#&page=[0-9]*#', '', $url) . '&page='; $str = ''; if ($cur_page > 1) { @@ -95,7 +96,8 @@ function page_insertbefore($paging_html, $insert_html) function page_insertafter($paging_html, $insert_html) { if ($paging_html) { - return preg_replace("/(<\/span><\/div>)$/", $insert_html.'$1', $paging_html); + //return preg_replace("/(<\/span><\/div>)$/", $insert_html.'$1', $paging_html); + return preg_replace("#()$#", $insert_html.'$1', $paging_html); } } @@ -106,7 +108,7 @@ function print_r2($var) print_r($var); $str = ob_get_contents(); ob_end_clean(); - $str = preg_replace("/ /", " ", $str); + $str = str_replace(" ", " ", $str); echo nl2br("$str"); } @@ -233,6 +235,16 @@ function url_auto_link($str) global $g5; global $config; + // 140326 유창화님 제안코드로 수정 + // http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=461 + // http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=463 + $str = str_replace(array("<", ">", "&", """, " "), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t"), $str); + $str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1\\2", $str); + $str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "\\1", $str); + $str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "\\0", $str); + $str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t"), array(" ", "<", ">"), $str); + + /* // 속도 향상 031011 $str = preg_replace("/</", "\t_lt_\t", $str); $str = preg_replace("/>/", "\t_gt_\t", $str); @@ -251,6 +263,7 @@ function url_auto_link($str) $str = preg_replace("/\t_nbsp_\t/", " " , $str); $str = preg_replace("/\t_lt_\t/", "<", $str); $str = preg_replace("/\t_gt_\t/", ">", $str); + */ return $str; } From e61c40206753ea2ba1002efe3b8c3e1c9221864f Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 26 Mar 2014 15:43:55 +0900 Subject: [PATCH 03/11] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=B2=B4=ED=81=AC=20=EB=B0=8F=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/auth_list.php | 2 +- adm/board_copy.php | 1 - adm/board_form.php | 6 ------ adm/board_form_update.php | 4 ++-- adm/board_list.php | 2 +- adm/boardgroup_list.php | 2 +- adm/boardgroupmember_list.php | 2 +- adm/contentlist.php | 2 +- adm/faqmasterlist.php | 2 +- adm/member_delete.php | 10 +++++----- adm/member_list.php | 2 +- adm/member_list_delete.php | 20 ++++++++++---------- adm/point_list.php | 2 +- adm/poll_list.php | 2 +- adm/popular_list.php | 2 +- adm/popular_rank.php | 2 +- adm/visit_list.php | 2 +- adm/visit_search.php | 2 +- 18 files changed, 30 insertions(+), 37 deletions(-) diff --git a/adm/auth_list.php b/adm/auth_list.php index 682a20966..c0b3269ef 100644 --- a/adm/auth_list.php +++ b/adm/auth_list.php @@ -35,7 +35,7 @@ $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select * diff --git a/adm/board_copy.php b/adm/board_copy.php index 85b01fde8..1d78d2c30 100644 --- a/adm/board_copy.php +++ b/adm/board_copy.php @@ -5,7 +5,6 @@ include_once("./_common.php"); auth_check($auth[$sub_menu], 'w'); $g5['title'] = '게시판 복사'; -$administrator = 1; include_once(G5_PATH.'/head.sub.php'); ?> diff --git a/adm/board_form.php b/adm/board_form.php index ecbea30f1..ae69b945c 100644 --- a/adm/board_form.php +++ b/adm/board_form.php @@ -654,12 +654,6 @@ $frm_submit .= ''; - diff --git a/adm/board_form_update.php b/adm/board_form_update.php index 46b49f708..b56234342 100644 --- a/adm/board_form_update.php +++ b/adm/board_form_update.php @@ -195,14 +195,14 @@ if ($w == '') { $bo_notice = ""; $lf = ""; if ($board['bo_notice']) { - $tmp_array = explode("\n", $board['bo_notice']); + $tmp_array = explode(",", $board['bo_notice']); for ($i=0; $i= $member[mb_level]) +else if ($mb['mb_level'] >= $member['mb_level']) alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다."); check_token(); // 회원자료 삭제 -member_delete($mb[mb_id]); +member_delete($mb['mb_id']); if ($url) goto_url("{$url}?$qstr&w=u&mb_id=$mb_id"); diff --git a/adm/member_list.php b/adm/member_list.php index 34b2cf704..1c9ce7981 100644 --- a/adm/member_list.php +++ b/adm/member_list.php @@ -43,7 +43,7 @@ $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 // 탈퇴회원수 diff --git a/adm/member_list_delete.php b/adm/member_list_delete.php index d5eb706df..0deced561 100644 --- a/adm/member_list_delete.php +++ b/adm/member_list_delete.php @@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "d"); check_token(); $msg = ""; -for ($i=0; $i= $member[mb_level]) { - $msg .= "$mb[mb_id] : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n"; + $msg .= "{$mb['mb_id']} : 회원자료가 존재하지 않습니다.\\n"; + } else if ($member['mb_id'] == $mb['mb_id']) { + $msg .= "{$mb['mb_id']} : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n"; + } else if (is_admin($mb['mb_id']) == "super") { + $msg .= "{$mb['mb_id']} : 최고 관리자는 삭제할 수 없습니다.\\n"; + } else if ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) { + $msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n"; } else { - // 회원자료 삭제 - member_delete($mb[mb_id]); + // 회원자료 삭제 + member_delete($mb['mb_id']); } } diff --git a/adm/point_list.php b/adm/point_list.php index d0fab01b4..8d23ccd5c 100644 --- a/adm/point_list.php +++ b/adm/point_list.php @@ -38,7 +38,7 @@ $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select * diff --git a/adm/poll_list.php b/adm/poll_list.php index 990fccc57..fc76ba0c8 100644 --- a/adm/poll_list.php +++ b/adm/poll_list.php @@ -34,7 +34,7 @@ $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select * diff --git a/adm/popular_list.php b/adm/popular_list.php index f0d358d32..50bd5a870 100644 --- a/adm/popular_list.php +++ b/adm/popular_list.php @@ -47,7 +47,7 @@ $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select * diff --git a/adm/popular_rank.php b/adm/popular_rank.php index a6b396c47..4c47720c2 100644 --- a/adm/popular_rank.php +++ b/adm/popular_rank.php @@ -20,7 +20,7 @@ $total_count = mysql_num_rows($result); $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} "; diff --git a/adm/visit_list.php b/adm/visit_list.php index 60d73f6c9..3b9b9c070 100644 --- a/adm/visit_list.php +++ b/adm/visit_list.php @@ -22,7 +22,7 @@ $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select * diff --git a/adm/visit_search.php b/adm/visit_search.php index 0419c72a6..636304de2 100644 --- a/adm/visit_search.php +++ b/adm/visit_search.php @@ -57,7 +57,7 @@ $listall = '처음'; //페이지 처음 $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 - if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) + if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select * From 1c9f0f6018bf73b3505179d9d12d62bb6b6f493a Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 26 Mar 2014 17:14:30 +0900 Subject: [PATCH 04/11] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=B2=B4=ED=81=AC=20=EB=B0=8F=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/current_connect.php | 2 +- bbs/email_stop.php | 10 +++++----- bbs/formmail_send.php | 2 +- bbs/link.php | 12 ++++++------ bbs/login_check.php | 2 +- bbs/memo_delete.php | 18 +++++++++--------- bbs/memo_form.php | 2 +- bbs/new.php | 2 +- bbs/new_delete.php | 13 +++++++++---- bbs/password_check.php | 4 ++-- bbs/poll_etc_update.php | 18 +++++++++--------- bbs/qalist.php | 2 +- bbs/register_email.php | 3 +-- bbs/register_form.php | 4 ++-- bbs/rss.php | 5 +++++ bbs/scrap.php | 2 +- bbs/search.php | 4 ++-- bbs/view.php | 7 ++++++- bbs/write.php | 4 ++-- 19 files changed, 65 insertions(+), 51 deletions(-) diff --git a/bbs/current_connect.php b/bbs/current_connect.php index f9331a070..686522564 100644 --- a/bbs/current_connect.php +++ b/bbs/current_connect.php @@ -18,7 +18,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) { $list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']); } else { if ($is_admin) - $list[$i]['name'] = $row[lo_ip]; + $list[$i]['name'] = $row['lo_ip']; else $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']); } diff --git a/bbs/email_stop.php b/bbs/email_stop.php index 8e0a9bfff..3635bb361 100644 --- a/bbs/email_stop.php +++ b/bbs/email_stop.php @@ -1,15 +1,15 @@ ", $content); + $content = str_replace("\n", "
", $content); } // html 이면 diff --git a/bbs/link.php b/bbs/link.php index 1ba9f8fee..e74536ca9 100644 --- a/bbs/link.php +++ b/bbs/link.php @@ -1,23 +1,23 @@ ' ."\n".' >' - ."\n".' >'.preg_replace("/\n/", "\n> ", get_text($row['me_memo'], 0)) + ."\n".' >'.str_replace("\n", "\n> ", get_text($row['me_memo'], 0)) ."\n".' >' .' >'; diff --git a/bbs/new.php b/bbs/new.php index d91c0a8e2..66a10188b 100644 --- a/bbs/new.php +++ b/bbs/new.php @@ -52,7 +52,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) { // 원글 $comment = ""; $comment_link = ""; - $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '$row[wr_id]' "); + $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' "); $list[$i] = $row2; $name = get_sideview($row2['mb_id'], cut_str($row2['wr_name'], $config['cf_cut_name']), $row2['wr_email'], $row2['wr_homepage']); diff --git a/bbs/new_delete.php b/bbs/new_delete.php index 6358d4885..e3df24ce8 100644 --- a/bbs/new_delete.php +++ b/bbs/new_delete.php @@ -44,7 +44,7 @@ for($i=0;$i +
@@ -43,7 +43,6 @@ function fregister_email_submit(f) { - f.action = ""; return true; } diff --git a/bbs/register_form.php b/bbs/register_form.php index b5bfc33f2..c4919bf73 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -51,10 +51,10 @@ if ($w == "") { if ($is_admin) alert('관리자의 회원정보는 관리자 화면에서 수정해 주십시오.', G5_URL); - if (!$member[mb_id]) + if (!$is_member) alert('로그인 후 이용하여 주십시오.', G5_URL); - if ($member[mb_id] != $mb_id) + if ($member['mb_id'] != $mb_id) alert('로그인된 회원과 넘어온 정보가 서로 다릅니다.'); /* diff --git a/bbs/rss.php b/bbs/rss.php index d53c92f1e..6bf5b1b55 100644 --- a/bbs/rss.php +++ b/bbs/rss.php @@ -7,9 +7,14 @@ function specialchars_replace($str, $len=0) { $str = substr($str, 0, $len); } + $str = str_replace(array("&", "<", ">"), array("&", "<", ">"), $str); + + /* $str = preg_replace("/&/", "&", $str); $str = preg_replace("//", ">", $str); + */ + return $str; } diff --git a/bbs/scrap.php b/bbs/scrap.php index 916e1b204..dbf53f2f2 100644 --- a/bbs/scrap.php +++ b/bbs/scrap.php @@ -18,7 +18,7 @@ $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 -if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) +if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $list = array(); diff --git a/bbs/search.php b/bbs/search.php index 97662e56a..bf156e801 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -140,7 +140,7 @@ if ($stx) { $rows = $srows; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 - if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) + if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 for ($i=0; $i ", get_text($write['wr_content'], 0)) + ."\n > ".str_replace("\n", "\n> ", get_text($write['wr_content'], 0)) ."\n > " ."\n > "; From eeef799bf7e35e0cdd0eb41618a3c066a2984bca Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 26 Mar 2014 17:18:40 +0900 Subject: [PATCH 05/11] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=B2=B4=ED=81=AC=20=EB=B0=8F=20=EC=A0=95=EB=A6=AC?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/poll_etc_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bbs/poll_etc_update.php b/bbs/poll_etc_update.php index ee189eb12..9828bdc35 100644 --- a/bbs/poll_etc_update.php +++ b/bbs/poll_etc_update.php @@ -42,7 +42,7 @@ if ($w == '') } else if ($w == 'd') { - if ($member[mb_id] || $is_admin == 'super') + if ($member['mb_id'] || $is_admin == 'super') { $sql = " delete from {$g5['poll_etc_table']} where pc_id = '{$pc_id}' "; if (!$is_admin) From 36b0ad66cf1259f089df8dcabdc7f7abf4ad4c08 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 27 Mar 2014 09:22:37 +0900 Subject: [PATCH 06/11] =?UTF-8?q?E=5FRECOVERABLE=5FERROR=20=EC=83=81?= =?UTF-8?q?=EC=88=98=20=EC=A0=9C=EA=B1=B0=20-=20=EB=8D=94=EC=B9=B4?= =?UTF-8?q?=EC=9D=B4=EB=8B=98=20=EC=A0=9C=EB=B3=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 2 +- mobile/group.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index 823f4f00c..23f3fd517 100644 --- a/common.php +++ b/common.php @@ -2,7 +2,7 @@ /******************************************************************************* ** 공통 변수, 상수, 코드 *******************************************************************************/ -error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); +error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING ); // 보안설정이나 프레임이 달라도 쿠키가 통하도록 설정 header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"'); diff --git a/mobile/group.php b/mobile/group.php index 1c76c69fb..90ad43426 100644 --- a/mobile/group.php +++ b/mobile/group.php @@ -11,9 +11,9 @@ include_once(G5_MOBILE_PATH.'/_head.php'); 'pc' "; if(!$is_admin) $sql .= " and bo_use_cert = '' "; From 2065819ab9ad3df6f77a3548d2a2fb924ed0277a Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 27 Mar 2014 14:05:59 +0900 Subject: [PATCH 07/11] =?UTF-8?q?SMS5=20=EC=BD=94=EB=93=9C=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EB=B0=8F=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/sms_admin/ajax.sms_write_person.php | 4 ++-- adm/sms_admin/form_list.php | 2 +- adm/sms_admin/form_update.php | 2 +- adm/sms_admin/history_list.php | 2 +- adm/sms_admin/history_member.php | 2 +- adm/sms_admin/history_num.php | 2 +- adm/sms_admin/history_send.php | 12 ++++++------ adm/sms_admin/history_view.php | 2 +- adm/sms_admin/install.php | 12 ++++++------ adm/sms_admin/member_update_run.php | 16 ++++++++-------- adm/sms_admin/num_book.php | 2 +- adm/sms_admin/num_book_update.php | 2 +- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/adm/sms_admin/ajax.sms_write_person.php b/adm/sms_admin/ajax.sms_write_person.php index 38c8c0b55..5838e9df3 100644 --- a/adm/sms_admin/ajax.sms_write_person.php +++ b/adm/sms_admin/ajax.sms_write_person.php @@ -8,9 +8,9 @@ auth_check($auth[$sub_menu], "r"); $g5['title'] = "휴대폰번호 관리"; -if (!$page) $page = 1; +if ($page < 1) $page = 1; -if (is_numeric($bg_no)) +if (is_numeric($bg_no)) $sql_group = " and bg_no='$bg_no' "; else $sql_group = ""; diff --git a/adm/sms_admin/form_list.php b/adm/sms_admin/form_list.php index 4e6cae1f5..c62704d98 100644 --- a/adm/sms_admin/form_list.php +++ b/adm/sms_admin/form_list.php @@ -11,7 +11,7 @@ $token = get_token(); $g5['title'] = "이모티콘 관리"; -if (!$page) $page = 1; +if ($page < 1) $page = 1; if (is_numeric($fg_no)) $sql_group = " and fg_no='$fg_no' "; diff --git a/adm/sms_admin/form_update.php b/adm/sms_admin/form_update.php index 5c4046602..9059b91bf 100644 --- a/adm/sms_admin/form_update.php +++ b/adm/sms_admin/form_update.php @@ -28,7 +28,7 @@ if ($w == 'u') // 업데이트 if ($fg_no != $res['fg_no']) { if ($res['fg_no']) - sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count - 1 where fg_no='{$res[fg_no]}'"); + sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count - 1 where fg_no='{$res['fg_no']}'"); sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count + 1 where fg_no='$fg_no'"); } diff --git a/adm/sms_admin/history_list.php b/adm/sms_admin/history_list.php index 82b6d8326..bb2b10292 100644 --- a/adm/sms_admin/history_list.php +++ b/adm/sms_admin/history_list.php @@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r"); $g5['title'] = "문자전송 내역"; -if (!$page) $page = 1; +if ($page < 1) $page = 1; if ($st && trim($sv)) $sql_search = " and wr_message like '%$sv%' "; diff --git a/adm/sms_admin/history_member.php b/adm/sms_admin/history_member.php index a3dcec0d2..71cbe5425 100644 --- a/adm/sms_admin/history_member.php +++ b/adm/sms_admin/history_member.php @@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r"); $g5['title'] = "문자전송 내역 (회원)"; -if (!$page) $page = 1; +if ($page < 1) $page = 1; if ($st && trim($sv)) $sql_search = " and $st like '%$sv%' "; diff --git a/adm/sms_admin/history_num.php b/adm/sms_admin/history_num.php index 519f88b99..ce1ca1260 100644 --- a/adm/sms_admin/history_num.php +++ b/adm/sms_admin/history_num.php @@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r"); $g5['title'] = "문자전송 내역 (번호별)"; -if (!$page) $page = 1; +if ($page < 1) $page = 1; if ($st && trim($sv)) $sql_search = " and $st like '%$sv%' "; diff --git a/adm/sms_admin/history_send.php b/adm/sms_admin/history_send.php index fe961494d..5494c2e00 100644 --- a/adm/sms_admin/history_send.php +++ b/adm/sms_admin/history_send.php @@ -15,7 +15,7 @@ $new_wr_renum = $res['wr_renum'] + 1; if ($w == 'f') $sql_flag = " and hs_flag=0 "; -else +else $sql_flag = ""; if ($wr_renum) @@ -37,9 +37,9 @@ if (!$res['cnt']) { } $sql = sql_query("select * from {$g5['sms5_history_table']} where wr_no='$wr_no' $sql_renum $sql_flag"); -while ($res = sql_fetch_array($sql)) +while ($res = sql_fetch_array($sql)) { - $res'[bk_hp'] = get_hp($res['bk_hp'], 0); + $res['bk_hp'] = get_hp($res['bk_hp'], 0); if ($g5['sms5_demo']) $res['bk_hp'] = '0100000000'; @@ -61,7 +61,7 @@ $reply = str_replace('-', '', trim($write['wr_reply'])); $result = $SMS->Add($list, $reply, '', '', $write['wr_message'], '', $wr_total); -if ($result) +if ($result) { $result = $SMS->Send(); @@ -73,7 +73,7 @@ if ($result) $wr_failure = 0; $count = 0; - foreach ($SMS->Result as $result) + foreach ($SMS->Result as $result) { list($phone, $code) = explode(":", $result); @@ -103,7 +103,7 @@ if ($result) } $wr_failure++; $hs_flag = 0; - } + } else { $hs_code = $code; diff --git a/adm/sms_admin/history_view.php b/adm/sms_admin/history_view.php index 6e29571da..199478d16 100644 --- a/adm/sms_admin/history_view.php +++ b/adm/sms_admin/history_view.php @@ -12,7 +12,7 @@ $g5['title'] = "문자전송 상세내역"; if (!is_numeric($wr_no)) alert('전송 고유 번호가 없습니다.'); -if (!$spage) $spage = 1; +if ($spage < 1) $spage = 1; if ($sst && trim($ssv)) $sql_search = " and $sst like '%$ssv%' "; diff --git a/adm/sms_admin/install.php b/adm/sms_admin/install.php index 0d31874e4..9ea6f2255 100644 --- a/adm/sms_admin/install.php +++ b/adm/sms_admin/install.php @@ -16,8 +16,8 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); //SMS 설정 정보 테이블이 있는지 검사한다. if( isset($g5['sms5_config_table']) && sql_query(" DESCRIBE {$g5['sms5_config_table']} ", false)) { if(!$setup){ - echo '"; -flush(); usleep(50000); +flush(); usleep(50000); $read_point = -1; $write_point = 5; @@ -70,11 +70,11 @@ $sql = " insert into {$g5['sms5_book_group_table']} set bg_name='미분류'"; mysql_query($sql) or die(mysql_error() . "

" . $sql); echo ""; -flush(); usleep(50000); +flush(); usleep(50000); //------------------------------------------------------------------------------------------------- echo ""; -flush(); usleep(50000); +flush(); usleep(50000); ?> diff --git a/adm/sms_admin/member_update_run.php b/adm/sms_admin/member_update_run.php index 1dba4cbf7..8d24ff329 100644 --- a/adm/sms_admin/member_update_run.php +++ b/adm/sms_admin/member_update_run.php @@ -21,15 +21,15 @@ $receipt = 0; // 회원 데이터 마이그레이션 $qry = sql_query("select mb_id, mb_name, mb_hp, mb_sms, mb_leave_date from ".$g5['member_table']." order by mb_datetime"); -while ($res = sql_fetch_array($qry)) +while ($res = sql_fetch_array($qry)) { - if ($res['mb_leave_date'] != '') + if ($res['mb_leave_date'] != '') $leave++; else if ($res['mb_hp'] == '') $hp_empty++; - else if (is_hp($res['mb_hp'])) + else if (is_hp($res['mb_hp'])) $hp_yes++ ; - else + else $hp_no++; $hp = get_hp($res['mb_hp']); @@ -45,7 +45,7 @@ while ($res = sql_fetch_array($qry)) $mb_count = $res3['cnt']; // 회원이 삭제되었다면 휴대폰번호 DB 에서도 삭제한다. - if ($res['mb_leave_date']) + if ($res['mb_leave_date']) { sql_query("delete from {$g5['sms5_book_table']} where mb_id='{$res2['mb_id']}'"); @@ -63,15 +63,15 @@ while ($res = sql_fetch_array($qry)) if ($bk_receipt != $res2['bk_receipt']) { if ($bk_receipt == 1) $sql_sms = "bg_receipt = bg_receipt + $mb_count, bg_reject = bg_reject - $mb_count"; - else + else $sql_sms = "bg_receipt = bg_receipt - $mb_count, bg_reject = bg_reject + $mb_count"; sql_query("update {$g5['sms5_book_group_table']} set $sql_sms where bg_no='{$res2['bg_no']}'"); } - + if ($bk_receipt) $receipt++; - sql_query("update {$g5['sms5_book_table']} set $field where mb_id='$res[mb_id]'"); + sql_query("update {$g5['sms5_book_table']} set $field where mb_id='{$res['mb_id']}'"); } } else if ($res['mb_leave_date'] == '') // 기존에 등록되어 있지 않을 경우 추가 (삭제된 회원이 아닐 경우) diff --git a/adm/sms_admin/num_book.php b/adm/sms_admin/num_book.php index 8c6e2ee4e..d6aa80d79 100644 --- a/adm/sms_admin/num_book.php +++ b/adm/sms_admin/num_book.php @@ -11,7 +11,7 @@ $token = get_token(); $g5['title'] = "휴대폰번호 관리"; -if (!$page) $page = 1; +if ($page < 1) $page = 1; if (is_numeric($bg_no)) $sql_group = " and bg_no='$bg_no' "; diff --git a/adm/sms_admin/num_book_update.php b/adm/sms_admin/num_book_update.php index edb9dd373..40eec9f4f 100644 --- a/adm/sms_admin/num_book_update.php +++ b/adm/sms_admin/num_book_update.php @@ -59,7 +59,7 @@ if ($w=='u') // 업데이트 } $get_bg_no = $bg_no; - $go_url = './num_book_write.php?bk_no='.$bk_no.'&w='.$w.'&page='.$page; + $go_url = './num_book_write.php?bk_no='.$bk_no.'&w='.$w.'&page='.$page; if( $is_hp_exist ){ //중복된 회원 휴대폰번호가 있다면 //alert( "중복된 회원 휴대폰번호가 있어서 회원정보에는 반영되지 않았습니다.", $go_url ); goto_url($go_url); From 2d769a83cedd5c7e4dd399bf6360ebab3ddf29e7 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 27 Mar 2014 14:43:23 +0900 Subject: [PATCH 08/11] =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/session_delete.php | 46 ------------------------------------------ 1 file changed, 46 deletions(-) delete mode 100644 adm/session_delete.php diff --git a/adm/session_delete.php b/adm/session_delete.php deleted file mode 100644 index 35c8b8419..000000000 --- a/adm/session_delete.php +++ /dev/null @@ -1,46 +0,0 @@ -
"; -echo ""; -include_once("./admin.tail.php"); -flush(); - -$session_path = "$g5[path]/data/session"; // 세션이저장된 디렉토리 -if (!$dir=@opendir($session_path)) { - echo "세션 디렉토리를 열지못했습니다."; -} - -$cnt=0; -while($file=readdir($dir)) { - - if (!strstr($file,'sess_')) { - continue; - } - - if (strpos($file,'sess_')!=0) { - continue; - } - - if (!$atime=@fileatime("$session_path/$file")) { - continue; - } - if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전 - $cnt++; - $return = unlink("$session_path/$file"); - echo "\n"; - - flush(); - - if ($cnt%10==0) - echo "\n"; - } -} -echo "\n"; -?> \ No newline at end of file From f1c33e30a2bb6f9ac6f9d21fd4693f4a9d5f77bd Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 27 Mar 2014 16:18:17 +0900 Subject: [PATCH 09/11] =?UTF-8?q?$list=20array=20=EC=A4=91=EB=B3=B5=20?= =?UTF-8?q?=EC=84=A0=EC=96=B8=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?-=20=EB=BD=81=EC=8A=A4=EB=8B=98=20=EC=A0=9C=EB=B3=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/scrap.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/bbs/scrap.php b/bbs/scrap.php index dbf53f2f2..af0cf8fd0 100644 --- a/bbs/scrap.php +++ b/bbs/scrap.php @@ -7,8 +7,6 @@ if (!$is_member) $g5['title'] = $member['mb_nick'].'님의 스크랩'; include_once(G5_PATH.'/head.sub.php'); -$list = array(); - $sql_common = " from {$g5['scrap_table']} where mb_id = '{$member['mb_id']}' "; $sql_order = " order by ms_id desc "; From ae7dba63b2ccf0832ca2c7179adb34923a805ea5 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 27 Mar 2014 17:26:00 +0900 Subject: [PATCH 10/11] =?UTF-8?q?php=205.3=20=EC=9D=B4=EC=A0=84=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=B0=9C=EC=83=9D=ED=95=98=EB=8A=94=20=20parse=20e?= =?UTF-8?q?rror=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/view.php | 11 ++++++----- mobile/skin/board/basic/view.skin.php | 2 +- mobile/skin/board/gallery/view.skin.php | 2 +- skin/board/basic/view.skin.php | 2 +- skin/board/gallery/view.skin.php | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bbs/view.php b/bbs/view.php index 565fdfda5..e570a7763 100644 --- a/bbs/view.php +++ b/bbs/view.php @@ -123,11 +123,12 @@ if (strstr($sfl, 'content')) $view['content'] = search_font($stx, $view['content']); //$view['rich_content'] = preg_replace("/{이미지\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view['content']); -$view['rich_content'] = preg_replace_callback("/{이미지\:([0-9]+)[:]?([^}]*)}/i", - function ($matches) { - global $view; - return view_image($view, $matches[1], $matches[2]); - }, $view['content']); +function conv_rich_content($matches) +{ + global $view; + return view_image($view, $matches[1], $matches[2]); +} +$view['rich_content'] = preg_replace_callback("/{이미지\:([0-9]+)[:]?([^}]*)}/i", "conv_rich_content", $view['content']); $is_signature = false; $signature = ''; diff --git a/mobile/skin/board/basic/view.skin.php b/mobile/skin/board/basic/view.skin.php index fd6192049..3d3d3a9f6 100644 --- a/mobile/skin/board/basic/view.skin.php +++ b/mobile/skin/board/basic/view.skin.php @@ -141,7 +141,7 @@ add_stylesheet('', 0 ?>

- +

diff --git a/mobile/skin/board/gallery/view.skin.php b/mobile/skin/board/gallery/view.skin.php index 6e9d50133..ecb7f4c17 100644 --- a/mobile/skin/board/gallery/view.skin.php +++ b/mobile/skin/board/gallery/view.skin.php @@ -141,7 +141,7 @@ add_stylesheet('', 0 ?>
- +

diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php index 641c54194..910dafe48 100644 --- a/skin/board/basic/view.skin.php +++ b/skin/board/basic/view.skin.php @@ -149,7 +149,7 @@ add_stylesheet('', 0
- +

diff --git a/skin/board/gallery/view.skin.php b/skin/board/gallery/view.skin.php index 641c54194..910dafe48 100644 --- a/skin/board/gallery/view.skin.php +++ b/skin/board/gallery/view.skin.php @@ -149,7 +149,7 @@ add_stylesheet('', 0
- +

From 55799985e9346f21786ae1d92b8466c0157de41f Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 28 Mar 2014 11:13:54 +0900 Subject: [PATCH 11/11] =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20?= =?UTF-8?q?=EB=AC=B8=EC=9E=90=EC=85=8B=20=EB=B3=80=ED=99=98=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/icode.sms.lib.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/icode.sms.lib.php b/lib/icode.sms.lib.php index e41ab5d8e..0ce3e6643 100644 --- a/lib/icode.sms.lib.php +++ b/lib/icode.sms.lib.php @@ -69,14 +69,7 @@ class SMS { //if ( eregi("[^0-9]",$callBack) ) return "회신 전화번호가 잘못되었습니다"; if ( preg_match("/[^0-9]/i",$callBack) ) return "회신 전화번호가 잘못되었습니다"; - // 아이코드에서는 문자에 utf-8 인코딩 형식을 아직 지원하지 않는다. - if (strtolower($g5['charset'])=='utf-8') { - if (function_exists("iconv")) { - $msg = iconv("utf-8", "euc-kr", $msg); - } - } - - $msg=cut_char($msg,80); // 80자 제한 + $msg=cut_char($msg,80); // 80자 제한 // 보낼 내용을 배열에 집어넣기 $dest = spacing($dest,11); $callBack = spacing($callBack,11);