From a50f7ce802dd47776ab07b25449f7140b0bea711 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 15 Apr 2014 15:12:55 +0900 Subject: [PATCH 1/4] =?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=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/sms_admin/_common.php | 2 +- adm/sms_admin/ajax.sms_write_person.php | 12 +++++----- adm/sms_admin/config.php | 4 ++-- adm/sms_admin/form_list.php | 10 ++++----- adm/sms_admin/form_write.php | 2 +- adm/sms_admin/history_list.php | 4 ++-- adm/sms_admin/history_member.php | 6 ++--- adm/sms_admin/history_num.php | 29 ++++++++++++------------- adm/sms_admin/history_view.php | 6 ++--- adm/sms_admin/num_book.php | 14 ++++++------ adm/sms_admin/num_book_file.php | 6 ++--- adm/sms_admin/sms_write.php | 8 +++---- adm/sms_admin/sms_write_form.php | 12 +++++----- 13 files changed, 57 insertions(+), 58 deletions(-) diff --git a/adm/sms_admin/_common.php b/adm/sms_admin/_common.php index 289691141..c2c148c40 100644 --- a/adm/sms_admin/_common.php +++ b/adm/sms_admin/_common.php @@ -4,7 +4,7 @@ include_once ('../../common.php'); include_once(G5_ADMIN_PATH.'/admin.lib.php'); if (!strstr($_SERVER['PHP_SELF'], 'install.php')) { - if(!mysql_num_rows(mysql_query("show tables like '{$g5['sms5_config_table']}'"))) + if(!mysql_num_rows(mysql_query(" show tables like '{$g5['sms5_config_table']}' "))) goto_url('install.php'); // SMS 설정값 배열변수 diff --git a/adm/sms_admin/ajax.sms_write_person.php b/adm/sms_admin/ajax.sms_write_person.php index 718fbe41b..e11a329f4 100644 --- a/adm/sms_admin/ajax.sms_write_person.php +++ b/adm/sms_admin/ajax.sms_write_person.php @@ -137,18 +137,18 @@ while ($res = sql_fetch_array($qry)) array_push($group, $res); diff --git a/adm/sms_admin/config.php b/adm/sms_admin/config.php index 1a9f1132b..5283094a3 100644 --- a/adm/sms_admin/config.php +++ b/adm/sms_admin/config.php @@ -109,7 +109,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용 - > 허용 + > 허용 @@ -118,7 +118,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용 레벨 이상 diff --git a/adm/sms_admin/form_list.php b/adm/sms_admin/form_list.php index c62704d98..008405441 100644 --- a/adm/sms_admin/form_list.php +++ b/adm/sms_admin/form_list.php @@ -29,7 +29,7 @@ if ($st == 'all') { } $total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where 1 $sql_group $sql_search"); -$total_count = $total_res[cnt]; +$total_count = $total_res['cnt']; $total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1); $page_start = $page_size * ( $page - 1 ); @@ -41,7 +41,7 @@ $qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name" while ($res = sql_fetch_array($qry)) array_push($group, $res); $res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where fg_no=0"); -$no_count = $res[cnt]; +$no_count = $res['cnt']; include_once(G5_ADMIN_PATH.'/admin.head.php'); ?> @@ -122,9 +122,9 @@ function multi_update(sel) diff --git a/adm/sms_admin/form_write.php b/adm/sms_admin/form_write.php index 35c2382bb..603bd2c03 100644 --- a/adm/sms_admin/form_write.php +++ b/adm/sms_admin/form_write.php @@ -41,7 +41,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); $qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name"); while($res = sql_fetch_array($qry)) { ?> - + diff --git a/adm/sms_admin/history_list.php b/adm/sms_admin/history_list.php index bb2b10292..e4856f10f 100644 --- a/adm/sms_admin/history_list.php +++ b/adm/sms_admin/history_list.php @@ -17,7 +17,7 @@ else $sql_search = ""; $total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_write_table']} where wr_renum=0 $sql_search"); -$total_count = $total_res[cnt]; +$total_count = $total_res['cnt']; $total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1); $page_start = $page_size * ( $page - 1 ); @@ -31,7 +31,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); diff --git a/adm/sms_admin/history_member.php b/adm/sms_admin/history_member.php index 71cbe5425..21fe0c84e 100644 --- a/adm/sms_admin/history_member.php +++ b/adm/sms_admin/history_member.php @@ -30,9 +30,9 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
diff --git a/adm/sms_admin/history_num.php b/adm/sms_admin/history_num.php index ce1ca1260..04f6c7ed2 100644 --- a/adm/sms_admin/history_num.php +++ b/adm/sms_admin/history_num.php @@ -1,6 +1,6 @@ " class="local_sch01 local_sch" > - +
@@ -59,7 +59,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); - + 데이터가 없습니다. @@ -77,23 +77,22 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); $bg_name = '없음'; if ($res['mb_id']) - $mb_id = "{$res['mb_id']}"; + $mb_id = ''.$res['mb_id'].''; else $mb_id = '비회원'; ?> - - - - - + + + + + 예약":'';?> - 수정 - + 수정 diff --git a/adm/sms_admin/history_view.php b/adm/sms_admin/history_view.php index edf8dbfe2..58a5ed562 100644 --- a/adm/sms_admin/history_view.php +++ b/adm/sms_admin/history_view.php @@ -52,7 +52,7 @@ function re_send() act = window.open('sms_ing.php', 'act', 'width=300, height=200'); act.focus(); - location.href = './history_send.php?w=f&page=&st=&sv=&wr_no=&wr_renum='; + location.href = './history_send.php?w=f&page=&st=&sv=&wr_no=&wr_renum='; } function all_send() @@ -71,8 +71,8 @@ function all_send() diff --git a/adm/sms_admin/num_book.php b/adm/sms_admin/num_book.php index 7ab18c7f5..0a7422410 100644 --- a/adm/sms_admin/num_book.php +++ b/adm/sms_admin/num_book.php @@ -52,7 +52,7 @@ if ($no_hp_checked == 'checked') $sql_no_hp = "and bk_hp <> ''"; $total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_book_table']} where 1 $sql_group $sql_search $sql_korean $sql_no_hp"); -$total_count = $total_res[cnt]; +$total_count = $total_res['cnt']; $total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1); $page_start = $page_size * ( $page - 1 ); @@ -111,9 +111,9 @@ function no_hp_click(val) @@ -123,10 +123,10 @@ function no_hp_click(val)
onclick="no_hp_click(this.checked)"> diff --git a/adm/sms_admin/num_book_file.php b/adm/sms_admin/num_book_file.php index feeca56c4..e2784dc4c 100644 --- a/adm/sms_admin/num_book_file.php +++ b/adm/sms_admin/num_book_file.php @@ -97,7 +97,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); function upload(w) { var f = document.upload_form; - + if (typeof w == 'undefined') { document.getElementById('upload_button').style.display = 'none'; document.getElementById('uploading').style.display = 'inline'; @@ -138,8 +138,8 @@ function download() if (hyphen.checked) hyphen = 1; else hyphen = 0; par += '?bg_no=' + bg_no.value; - par += '&no_hp=' + no_hp; - par += '&hyphen=' + hyphen; + par += '&no_hp=' + no_hp; + par += '&hyphen=' + hyphen; (function($){ if(!document.getElementById("fileupload_fr")){ diff --git a/adm/sms_admin/sms_write.php b/adm/sms_admin/sms_write.php index 745e3f84d..4123546d9 100644 --- a/adm/sms_admin/sms_write.php +++ b/adm/sms_admin/sms_write.php @@ -148,19 +148,19 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용

@@ -452,7 +452,7 @@ hp_list.options[hp_list.length] = new Option(item, value); diff --git a/adm/sms_admin/sms_write_form.php b/adm/sms_admin/sms_write_form.php index 781b3fbb8..298d9f1ff 100644 --- a/adm/sms_admin/sms_write_form.php +++ b/adm/sms_admin/sms_write_form.php @@ -12,10 +12,10 @@ $no_count = $res['cnt'];
@@ -29,9 +29,9 @@ $no_count = $res['cnt']; From 344a61d5a5a604541a3a61a3e8a6e8e9ee69b2e5 Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 16 Apr 2014 13:24:59 +0900 Subject: [PATCH 2/4] =?UTF-8?q?sms5=20=EB=AC=B8=EC=9E=90=EC=97=B4=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EB=B0=8F=20=EA=B8=B0=ED=83=80=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/sms_admin/ajax.hp_chk.php | 3 ++ adm/sms_admin/ajax.sms_write_form.php | 1 + adm/sms_admin/ajax.sms_write_group.php | 1 + adm/sms_admin/ajax.sms_write_level.php | 1 + adm/sms_admin/ajax.sms_write_person.php | 1 + adm/sms_admin/config.php | 4 +-- adm/sms_admin/config_update.php | 2 +- adm/sms_admin/history_list.php | 4 +-- adm/sms_admin/history_send.php | 2 +- adm/sms_admin/history_view.php | 2 +- adm/sms_admin/install.php | 1 + adm/sms_admin/num_book_file_upload.php | 2 +- adm/sms_admin/num_book_update.php | 6 ++-- adm/sms_admin/num_group_update.php | 4 +-- adm/sms_admin/sms_write_form.php | 2 +- adm/sms_admin/sms_write_send.php | 2 ++ plugin/sms5/sms5.lib.php | 40 +++++++++++++++++++++++++ plugin/sms5/write_update.php | 1 + 18 files changed, 64 insertions(+), 15 deletions(-) diff --git a/adm/sms_admin/ajax.hp_chk.php b/adm/sms_admin/ajax.hp_chk.php index 560257309..b0b29ac3d 100644 --- a/adm/sms_admin/ajax.hp_chk.php +++ b/adm/sms_admin/ajax.hp_chk.php @@ -1,4 +1,5 @@ - > 허용 + > @@ -118,7 +118,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용 레벨 이상 diff --git a/adm/sms_admin/config_update.php b/adm/sms_admin/config_update.php index 22fc6ea05..e89787730 100644 --- a/adm/sms_admin/config_update.php +++ b/adm/sms_admin/config_update.php @@ -20,7 +20,7 @@ $userinfo = array( if ($userinfo['code'] == '202') alert('아이코드 아이디와 패스워드가 맞지 않습니다.'); -if ($cf_member == 'on') +if ($cf_member == '1') $cf_member = 1; else $cf_member = 0; diff --git a/adm/sms_admin/history_list.php b/adm/sms_admin/history_list.php index e4856f10f..193937878 100644 --- a/adm/sms_admin/history_list.php +++ b/adm/sms_admin/history_list.php @@ -30,9 +30,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
class="local_sch01 local_sch" method="get"> - + diff --git a/adm/sms_admin/history_send.php b/adm/sms_admin/history_send.php index 5494c2e00..488e25db5 100644 --- a/adm/sms_admin/history_send.php +++ b/adm/sms_admin/history_send.php @@ -116,7 +116,7 @@ if ($result) $row['bk_hp'] = get_hp($row['bk_hp'], 1); $log = array_shift($SMS->Log); - sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='$hs_memo', hs_log='$log'"); + sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'"); } $SMS->Init(); // 보관하고 있던 결과값을 지웁니다. diff --git a/adm/sms_admin/history_view.php b/adm/sms_admin/history_view.php index 58a5ed562..d65672290 100644 --- a/adm/sms_admin/history_view.php +++ b/adm/sms_admin/history_view.php @@ -239,7 +239,7 @@ function all_send() - + '{$res['mb_id']}' and mb_hp = '{$bk_hp}' "; @@ -54,7 +54,7 @@ if ($w=='u') // 업데이트 if ($mb_hp_exist['mb_id']) { //중복된 회원 휴대폰번호가 있다면 $is_hp_exist = true; } else { - sql_query("update {$g5['member_table']} set mb_name='$bk_name', mb_hp='$bk_hp', mb_sms='$bk_receipt' where mb_id='{$res['mb_id']}'", false); + sql_query("update {$g5['member_table']} set mb_name='".addslashes($bk_name)."', mb_hp='$bk_hp', mb_sms='$bk_receipt' where mb_id='{$res['mb_id']}'", false); } } $get_bg_no = $bg_no; @@ -126,7 +126,7 @@ else // 등록 else $sql_sms = "bg_reject = bg_reject + 1"; - sql_query("insert into {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='$bk_name', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='$bk_memo'"); + sql_query("insert into {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='".addslashes($bk_name)."', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='".addslashes($bk_memo)."'"); sql_query("update {$g5['sms5_book_group_table']} set bg_count = bg_count + 1, bg_nomember = bg_nomember + 1, $sql_sms where bg_no = '$bg_no'"); $get_bg_no = $bg_no; diff --git a/adm/sms_admin/num_group_update.php b/adm/sms_admin/num_group_update.php index 3f7cc9990..ea9af2423 100644 --- a/adm/sms_admin/num_group_update.php +++ b/adm/sms_admin/num_group_update.php @@ -27,7 +27,7 @@ if ($w == 'u') // 업데이트 if ($res) alert('같은 그룹명이 존재합니다.'); - sql_query("update {$g5['sms5_book_group_table']} set bg_name='$bg_name' where bg_no='$bg_no'"); + sql_query("update {$g5['sms5_book_group_table']} set bg_name='".addslashes($bg_name)."' where bg_no='$bg_no'"); } } else if ($w == 'de') // 그룹삭제 @@ -70,7 +70,7 @@ else // 등록 if ($res) alert('같은 그룹명이 존재합니다.'); - sql_query("insert into {$g5['sms5_book_group_table']} set bg_name='$bg_name'"); + sql_query("insert into {$g5['sms5_book_group_table']} set bg_name='".addslashes($bg_name)."'"); } goto_url('./num_group.php'); diff --git a/adm/sms_admin/sms_write_form.php b/adm/sms_admin/sms_write_form.php index 298d9f1ff..23435005a 100644 --- a/adm/sms_admin/sms_write_form.php +++ b/adm/sms_admin/sms_write_form.php @@ -13,7 +13,7 @@ $no_count = $res['cnt'];