From 1fe4684537198967c19302bcb11180fc54ef1805 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 16 Oct 2015 10:12:06 +0900 Subject: [PATCH] =?UTF-8?q?MySQLi=20=EC=A7=80=EC=9B=90=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20SMS5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.menu900.php | 1 - adm/contentlist.php | 2 +- adm/faqformupdate.php | 2 +- adm/faqmasterformupdate.php | 2 +- adm/faqmasterlist.php | 2 +- adm/mail_list.php | 2 +- adm/newwinformupdate.php | 2 +- adm/newwinlist.php | 2 +- adm/poll_form_update.php | 2 +- adm/popular_rank.php | 2 +- adm/sms_admin/_common.php | 2 +- adm/sms_admin/config.php | 41 +- adm/sms_admin/config_update.php | 11 +- adm/sms_admin/history_member.php | 90 ----- adm/sms_admin/install.php | 4 +- adm/sms_admin/sms5.sql | 29 +- adm/sms_admin/sms_write.php | 6 +- adm/sms_admin/sms_write_send.php | 12 + bbs/list.php | 2 +- bbs/move_update.php | 2 +- bbs/qawrite_update.php | 2 +- bbs/scrap_popin_update.php | 2 +- bbs/search.php | 2 +- bbs/sns_send.php | 2 +- bbs/write_comment_update.php | 2 +- bbs/write_update.php | 2 +- common.php | 2 +- config.php | 5 +- extend/sms5.extend.php | 13 - g4_import_run.php | 40 +- install/install_db.php | 30 +- js/common.js | 13 - lib/common.lib.php | 188 +++++++-- lib/thumbnail.lib.php | 2 +- plugin/sms5/skin/basic/img/ajax-loader.gif | Bin 1924 -> 0 bytes plugin/sms5/skin/basic/img/box_ico.gif | Bin 60 -> 0 bytes plugin/sms5/skin/basic/img/scemo_ico.gif | Bin 67 -> 0 bytes plugin/sms5/skin/basic/mobile.css | 48 --- plugin/sms5/skin/basic/style.css | 50 --- plugin/sms5/skin/basic/write.skin.php | 378 ------------------ plugin/sms5/skin/basic/write_mobile.skin.php | 394 ------------------- plugin/sms5/sms5.lib.php | 13 - plugin/sms5/write.php | 75 ---- plugin/sms5/write_update.php | 170 -------- 44 files changed, 236 insertions(+), 1415 deletions(-) delete mode 100644 adm/sms_admin/history_member.php delete mode 100644 plugin/sms5/skin/basic/img/ajax-loader.gif delete mode 100644 plugin/sms5/skin/basic/img/box_ico.gif delete mode 100644 plugin/sms5/skin/basic/img/scemo_ico.gif delete mode 100644 plugin/sms5/skin/basic/mobile.css delete mode 100644 plugin/sms5/skin/basic/style.css delete mode 100644 plugin/sms5/skin/basic/write.skin.php delete mode 100644 plugin/sms5/skin/basic/write_mobile.skin.php delete mode 100644 plugin/sms5/write.php delete mode 100644 plugin/sms5/write_update.php diff --git a/adm/admin.menu900.php b/adm/admin.menu900.php index c9a8d6b54..f8d4fb063 100644 --- a/adm/admin.menu900.php +++ b/adm/admin.menu900.php @@ -6,7 +6,6 @@ $menu["menu900"] = array ( array('900300', '문자 보내기', ''.G5_SMS5_ADMIN_URL.'/sms_write.php', 'sms_write'), array('900400', '전송내역-건별', ''.G5_SMS5_ADMIN_URL.'/history_list.php', 'sms_history' , 1), array('900410', '전송내역-번호별', ''.G5_SMS5_ADMIN_URL.'/history_num.php', 'sms_history_num' , 1), - array('900450', '전송내역-회원', ''.G5_SMS5_ADMIN_URL.'/history_member.php', 'sms_history_mb' , 1), array('900500', '이모티콘 그룹', ''.G5_SMS5_ADMIN_URL.'/form_group.php' , 'emoticon_group'), array('900600', '이모티콘 관리', ''.G5_SMS5_ADMIN_URL.'/form_list.php', 'emoticon_list'), array('900700', '휴대폰번호 그룹', ''.G5_SMS5_ADMIN_URL.'/num_group.php' , 'hp_group', 1), diff --git a/adm/contentlist.php b/adm/contentlist.php index 7f8ce87ca..bdd929bb9 100644 --- a/adm/contentlist.php +++ b/adm/contentlist.php @@ -69,7 +69,7 @@ $result = sql_query($sql); - diff --git a/adm/faqformupdate.php b/adm/faqformupdate.php index 722a6c3a4..723850c95 100644 --- a/adm/faqformupdate.php +++ b/adm/faqformupdate.php @@ -21,7 +21,7 @@ if ($w == "") $sql_common "; sql_query($sql); - $fa_id = mysql_insert_id(); + $fa_id = sql_insert_id(); } else if ($w == "u") { diff --git a/adm/faqmasterformupdate.php b/adm/faqmasterformupdate.php index f6987d795..d86e0eed4 100644 --- a/adm/faqmasterformupdate.php +++ b/adm/faqmasterformupdate.php @@ -31,7 +31,7 @@ if ($w == "") $sql = " insert {$g5['faq_master_table']} $sql_common "; sql_query($sql); - $fm_id = mysql_insert_id(); + $fm_id = sql_insert_id(); } else if ($w == "u") { diff --git a/adm/faqmasterlist.php b/adm/faqmasterlist.php index c21ea47e2..c60c5accb 100644 --- a/adm/faqmasterlist.php +++ b/adm/faqmasterlist.php @@ -93,7 +93,7 @@ $result = sql_query($sql); - 미리보기'; $num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i); diff --git a/adm/newwinformupdate.php b/adm/newwinformupdate.php index 17ccac254..94746c6f8 100644 --- a/adm/newwinformupdate.php +++ b/adm/newwinformupdate.php @@ -27,7 +27,7 @@ if($w == "") $sql = " insert {$g5['new_win_table']} set $sql_common "; sql_query($sql); - $nw_id = mysql_insert_id(); + $nw_id = sql_insert_id(); } else if ($w == "u") { diff --git a/adm/newwinlist.php b/adm/newwinlist.php index 4f51abe70..065e7534d 100644 --- a/adm/newwinlist.php +++ b/adm/newwinlist.php @@ -70,7 +70,7 @@ $result = sql_query($sql); - 예) 010-123-4567"); ?> + 예) 010-123-4567"); ?> - - - - - > - - - - - - - - 레벨 이상 - - - - - - - - - - - - - - - - - - - - - - diff --git a/adm/sms_admin/config_update.php b/adm/sms_admin/config_update.php index b7c930176..ec18b2ec8 100644 --- a/adm/sms_admin/config_update.php +++ b/adm/sms_admin/config_update.php @@ -8,16 +8,15 @@ check_demo(); $g5['title'] = "SMS 기본설정"; +// 회신번호 체크 +if(!check_vaild_callback($cf_phone)) + alert('회신번호가 올바르지 않습니다.'); + $userinfo = get_icode_userinfo($cf_icode_id, $cf_icode_pw); if ($userinfo['code'] == '202') alert('아이코드 아이디와 패스워드가 맞지 않습니다.'); -if ($cf_member == '1') - $cf_member = 1; -else - $cf_member = 0; - $res = sql_fetch("select * from ".$g5['sms5_config_table']." limit 1"); if (!$res) @@ -25,7 +24,7 @@ if (!$res) else $sql = "update "; -$sql .= $g5['sms5_config_table']." set cf_phone='$cf_phone', cf_member='$cf_member', cf_level='$cf_level', cf_point='$cf_point', cf_day_count='$cf_day_count', cf_skin = '$cf_skin' "; +$sql .= $g5['sms5_config_table']." set cf_phone='$cf_phone' "; sql_query($sql); diff --git a/adm/sms_admin/history_member.php b/adm/sms_admin/history_member.php deleted file mode 100644 index 1de0755ff..000000000 --- a/adm/sms_admin/history_member.php +++ /dev/null @@ -1,90 +0,0 @@ - - -
- - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
목록
번호회원보내는번호받는번호전송일시예약Log
- 데이터가 없습니다. -
예약":'';?>
-
- - - - \ No newline at end of file diff --git a/adm/sms_admin/install.php b/adm/sms_admin/install.php index 27e72da67..c7a13441d 100644 --- a/adm/sms_admin/install.php +++ b/adm/sms_admin/install.php @@ -53,7 +53,7 @@ eval("\$file = \"$file\";"); $f = explode(";", $file); for ($i=0; $i" . $sql); +sql_query($sql) or die(mysqli_error() . "

" . $sql); echo ""; flush(); usleep(50000); diff --git a/adm/sms_admin/sms5.sql b/adm/sms_admin/sms5.sql index a741c7832..652872219 100644 --- a/adm/sms_admin/sms5.sql +++ b/adm/sms_admin/sms5.sql @@ -65,12 +65,7 @@ DROP TABLE IF EXISTS `{$g5['sms5_config_table']}`; CREATE TABLE `{$g5['sms5_config_table']}` ( `cf_phone` varchar(255) NOT NULL default '', - `cf_datetime` datetime NOT NULL default '0000-00-00 00:00:00', - `cf_member` tinyint(4) NOT NULL default '1', - `cf_level` tinyint(4) NOT NULL default '2', - `cf_point` int(11) NOT NULL default '0', - `cf_day_count` int(11) NOT NULL default '0', - `cf_skin` varchar(100) NOT NULL DEFAULT '' + `cf_datetime` datetime NOT NULL default '0000-00-00 00:00:00' ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -164,25 +159,3 @@ CREATE TABLE `{$g5['sms5_write_table']}` ( `wr_memo` text NOT NULL, KEY `wr_no` (`wr_no`,`wr_renum`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - - -## -## Table structure for table `{$g5['sms5_member_history_table']}` -## - -DROP TABLE IF EXISTS `{$g5['sms5_member_history_table']}`; - - -CREATE TABLE `{$g5['sms5_member_history_table']}` ( - `mh_no` int(11) NOT NULL auto_increment, - `mb_id` varchar(30) NOT NULL, - `mh_reply` varchar(30) NOT NULL, - `mh_hp` varchar(30) NOT NULL, - `mh_datetime` datetime NOT NULL, - `mh_booking` datetime NOT NULL, - `mh_log` varchar(255) NOT NULL, - `mh_ip` varchar(15) NOT NULL, - PRIMARY KEY (`mh_no`), - KEY `mb_id` (`mb_id`,`mh_datetime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - diff --git a/adm/sms_admin/sms_write.php b/adm/sms_admin/sms_write.php index c9092bfbd..1016f1d5e 100644 --- a/adm/sms_admin/sms_write.php +++ b/adm/sms_admin/sms_write.php @@ -114,7 +114,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용

- +
@@ -532,7 +532,7 @@ if ($wr_no) // 회원목록 $sql = " select * from {$g5['sms5_history_table']} where wr_no = '$wr_no' and bk_no > 0 "; $qry = sql_query($sql); - $tot = mysql_num_rows($qry); + $tot = sql_num_rows($qry); if ($tot > 0) { @@ -550,7 +550,7 @@ if ($wr_no) // 비회원 목록 $sql = " select * from {$g5['sms5_history_table']} where wr_no = '$wr_no' and bk_no = 0 "; $qry = sql_query($sql); - $tot = mysql_num_rows($qry); + $tot = sql_num_rows($qry); if ($tot > 0) { diff --git a/adm/sms_admin/sms_write_send.php b/adm/sms_admin/sms_write_send.php index f256c3e41..333b58c7c 100644 --- a/adm/sms_admin/sms_write_send.php +++ b/adm/sms_admin/sms_write_send.php @@ -12,6 +12,9 @@ $wr_message = clean_xss_tags(trim($wr_message)); if (!$wr_reply) win_close_alert('회신 번호를 숫자, - 로 입력해주세요.'); +if(!check_vaild_callback($wr_reply)) + win_close_alert('회신 번호를 올바르게 입력해 주십시오.'); + if (!$wr_message) win_close_alert('메세지를 입력해주세요.'); @@ -42,6 +45,9 @@ while ($row = array_shift($send_list)) while ($row = sql_fetch_array($qry)) { $row['bk_hp'] = get_hp($row['bk_hp'], 0); + + if(!$row['bk_hp']) continue; + if ($wr_overlap && array_overlap($hps, $row['bk_hp'])) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); @@ -63,6 +69,8 @@ while ($row = array_shift($send_list)) $hp = get_hp($row['mb_hp'], 0); $mb_id = $row['mb_id']; + if(!$hp) continue; + if ($wr_overlap && array_overlap($hps, $hp)) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); @@ -84,6 +92,8 @@ while ($row = array_shift($send_list)) $hp = get_hp($item[$i][1], 0); $name = $item[$i][0]; + if(!$hp) continue; + if ($wr_overlap && array_overlap($hps, $hp)) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); @@ -99,6 +109,8 @@ while ($row = array_shift($send_list)) $row = sql_fetch("select * from {$g5['sms5_book_table']} where bk_no='$item[$i]'"); $row['bk_hp'] = get_hp($row['bk_hp'], 0); + if(!$row['bk_hp']) continue; + if ($wr_overlap && array_overlap($hps, $row['bk_hp'])) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); diff --git a/bbs/list.php b/bbs/list.php index b756bb03c..3fab5acfa 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -53,7 +53,7 @@ if ($sca || $stx) { /* $sql = " select distinct wr_parent from {$write_table} where {$sql_search} "; $result = sql_query($sql); - $total_count = mysql_num_rows($result); + $total_count = sql_num_rows($result); */ } else { $sql_search = ""; diff --git a/bbs/move_update.php b/bbs/move_update.php index bfaf54bcf..e3919905f 100644 --- a/bbs/move_update.php +++ b/bbs/move_update.php @@ -99,7 +99,7 @@ while ($row = sql_fetch_array($result)) wr_10 = '".addslashes($row2['wr_10'])."' "; sql_query($sql); - $insert_id = mysql_insert_id(); + $insert_id = sql_insert_id(); // 코멘트가 아니라면 if (!$row2['wr_is_comment']) diff --git a/bbs/qawrite_update.php b/bbs/qawrite_update.php index 5b5c6c422..a58255b09 100644 --- a/bbs/qawrite_update.php +++ b/bbs/qawrite_update.php @@ -244,7 +244,7 @@ if($w == '' || $w == 'a' || $w == 'r') { sql_query($sql); if($w == '' || $w == 'r') { - $qa_id = mysql_insert_id(); + $qa_id = sql_insert_id(); if($w == 'r' && $write['qa_related']) { $qa_related = $write['qa_related']; diff --git a/bbs/scrap_popin_update.php b/bbs/scrap_popin_update.php index 0a5ff7394..fdc90f9d2 100644 --- a/bbs/scrap_popin_update.php +++ b/bbs/scrap_popin_update.php @@ -70,7 +70,7 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level'])) wr_ip = '{$_SERVER['REMOTE_ADDR']}' "; sql_query($sql); - $comment_id = mysql_insert_id(); + $comment_id = sql_insert_id(); // 원글에 코멘트수 증가 sql_query(" update $write_table set wr_comment = wr_comment + 1 where wr_id = '$wr_id' "); diff --git a/bbs/search.php b/bbs/search.php index 0f3fe803b..b9831eb67 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -120,7 +120,7 @@ if ($stx) { $sql = " select wr_id from {$tmp_write_table} where {$sql_search} "; $result = sql_query($sql, false); - $row['cnt'] = @mysql_num_rows($result); + $row['cnt'] = @sql_num_rows($result); $total_count += $row['cnt']; if ($row['cnt']) { diff --git a/bbs/sns_send.php b/bbs/sns_send.php index 2a6622d6c..972d16257 100644 --- a/bbs/sns_send.php +++ b/bbs/sns_send.php @@ -12,7 +12,7 @@ switch($_REQUEST['sns']) { header("Location:http://www.facebook.com/sharer/sharer.php?s=100&u=".$short_url."&p=".$title); break; case 'twitter' : - header("Location:http://twitter.com/home?status=".$title_url); + header("Location:https://twitter.com/intent/tweet?text=".$title_url); break; case 'gplus' : header("Location:https://plus.google.com/share?url=".$short_url); diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php index c2fdb67e7..4e93d1556 100644 --- a/bbs/write_comment_update.php +++ b/bbs/write_comment_update.php @@ -167,7 +167,7 @@ if ($w == 'c') // 댓글 입력 wr_10 = '$wr_10' "; sql_query($sql); - $comment_id = mysql_insert_id(); + $comment_id = sql_insert_id(); // 원글에 댓글수 증가 & 마지막 시간 반영 sql_query(" update $write_table set wr_comment = wr_comment + 1, wr_last = '".G5_TIME_YMDHIS."' where wr_id = '$wr_id' "); diff --git a/bbs/write_update.php b/bbs/write_update.php index e70f57e6c..5310d2e16 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -244,7 +244,7 @@ if ($w == '' || $w == 'r') { wr_10 = '$wr_10' "; sql_query($sql); - $wr_id = mysql_insert_id(); + $wr_id = sql_insert_id(); // 부모 아이디에 UPDATE sql_query(" update $write_table set wr_parent = '$wr_id' where wr_id = '$wr_id' "); diff --git a/common.php b/common.php index 89fa4f8da..079473bf3 100644 --- a/common.php +++ b/common.php @@ -135,7 +135,7 @@ if (file_exists($dbconfig_file)) { // mysql connect resource $g5 배열에 저장 - 명랑폐인님 제안 $g5['connect_db'] = $connect_db; - sql_query(" set names utf8 "); + sql_set_charset('utf8', $connect_db); if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) sql_query("SET SESSION sql_mode = ''"); if (defined(G5_TIMEZONE)) sql_query(" set time_zone = '".G5_TIMEZONE."'"); } else { diff --git a/config.php b/config.php index d667e91f6..3a081d126 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.1.2'); +define('G5_GNUBOARD_VER', '5.1.3'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); @@ -195,6 +195,9 @@ define('G5_THUMB_PNG_COMPRESS', 5); // 모바일 기기에서 DHTML 에디터 사용여부를 설정합니다. define('G5_IS_MOBILE_DHTML_USE', false); +// MySQLi 사용여부를 설정합니다. +define('G5_MYSQLI_USE', true); + // ip 숨김방법 설정 /* 123.456.789.012 ip의 숨김 방법을 변경하는 방법은 \\1 은 123, \\2는 456, \\3은 789, \\4는 012에 각각 대응되므로 diff --git a/extend/sms5.extend.php b/extend/sms5.extend.php index 6405f1373..eee1022ef 100644 --- a/extend/sms5.extend.php +++ b/extend/sms5.extend.php @@ -22,23 +22,10 @@ $g5['sms5_book_table'] = $g5['sms5_prefix'] . 'book'; $g5['sms5_book_group_table'] = $g5['sms5_prefix'] . 'book_group'; $g5['sms5_form_table'] = $g5['sms5_prefix'] . 'form'; $g5['sms5_form_group_table'] = $g5['sms5_prefix'] . 'form_group'; -$g5['sms5_member_history_table'] = $g5['sms5_prefix'] . 'member_history'; if (!empty($config['cf_sms_use'])) { $sms5 = sql_fetch("select * from {$g5['sms5_config_table']} ", false); - if( $sms5['cf_member'] && trim($member['mb_hp']) ) { - $g5['sms5_use_sideview'] = true; //회원 사이드뷰 레이어에 추가 - } else { - $g5['sms5_use_sideview'] = false; - } - - //============================================================================== - // 스킨경로 - //------------------------------------------------------------------------------ - - $sms5_skin_path = G5_SMS5_PATH.'/skin/'.$sms5['cf_skin']; //sms5 스킨 path - $sms5_skin_url = G5_SMS5_URL .'/skin/'.$sms5['cf_skin']; //sms5 스킨 url // Demo 설정 if (file_exists(G5_PATH.'/DEMO')) diff --git a/g4_import_run.php b/g4_import_run.php index 1d3ea67f4..aa8f8a214 100644 --- a/g4_import_run.php +++ b/g4_import_run.php @@ -169,13 +169,7 @@ document.onkeydown = noRefresh ; $is_euckr = true; // member table 복사 - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5['member_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5['member_table']); $sql = " select * from {$g4['member_table']} "; $result = sql_query($sql); @@ -325,13 +319,7 @@ document.onkeydown = noRefresh ; echo '
  • visit sum table 복사
  • '.PHP_EOL; // group table 복사 - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5['group_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5['group_table']); $sql = " select * from {$g4['group_table']} "; $result = sql_query($sql); @@ -365,13 +353,7 @@ document.onkeydown = noRefresh ; unset($fiels); // board 복사 - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5['board_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5['board_table']); $sql = " select * from {$g4['board_table']} "; $result = sql_query($sql); @@ -413,13 +395,7 @@ document.onkeydown = noRefresh ; // 게시글 복사 if(sql_query($sql, FALSE)) { $write_table = $g4['write_prefix'].$bo_table; - $columns2 = array(); - $fields2 = mysql_list_fields(G5_MYSQL_DB, $create_table); - $count2 = mysql_num_fields($fields2); - for ($j = 0; $j < $count2; $j++) { - $fld = mysql_field_name($fields2, $j); - $columns2[] = $fld; - } + $columns2 = sql_field_names($create_table); $sql3 = " select * from $write_table "; $result3 = sql_query($sql3); @@ -461,13 +437,7 @@ document.onkeydown = noRefresh ; $tables = array('board_file', 'board_new', 'board_good', 'mail', 'memo', 'group_member', 'auth', 'popular', 'poll', 'poll_etc', 'scrap'); foreach($tables as $table) { - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5[$table.'_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5[$table.'_table']); $src_table = $g4[$table.'_table']; $dst_table = $g5[$table.'_table']; diff --git a/install/install_db.php b/install/install_db.php index d32745f86..b04985075 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -8,6 +8,8 @@ header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1 header('Pragma: no-cache'); // HTTP/1.0 include_once ('../config.php'); +include_once ('../lib/common.lib.php'); + $title = G5_VERSION." 설치 완료 3/3"; include_once ('./install.inc.php'); @@ -23,7 +25,7 @@ $admin_pass = $_POST['admin_pass']; $admin_name = $_POST['admin_name']; $admin_email = $_POST['admin_email']; -$dblink = @mysql_connect($mysql_host, $mysql_user, $mysql_pass); +$dblink = sql_connect($mysql_host, $mysql_user, $mysql_pass, $mysql_db); if (!$dblink) { ?> @@ -37,7 +39,7 @@ if (!$dblink) { exit; } -$select_db = @mysql_select_db($mysql_db, $dblink); +$select_db = sql_select_db($mysql_db, $dblink); if (!$select_db) { ?> @@ -52,12 +54,14 @@ if (!$select_db) { } $mysql_set_mode = 'false'; -@mysql_query('set names utf8'); -$row = mysql_fetch_assoc(mysql_query(" SELECT @@sql_mode as mode ")); +sql_set_charset('utf8', $dblink); +$result = sql_query(" SELECT @@sql_mode as mode ", true, $dblink); +$row = sql_fetch_array($result); if($row['mode']) { - @mysql_query("SET SESSION sql_mode = ''"); + sql_query("SET SESSION sql_mode = ''", true, $dblink); $mysql_set_mode = 'true'; } +unset($result); unset($row); ?> @@ -75,7 +79,7 @@ $file = preg_replace('/`g5_([^`]+`)/', '`'.$table_prefix.'$1', $file); $f = explode(';', $file); for ($i=0; $i @@ -154,14 +158,14 @@ $sql = " insert into `{$table_prefix}config` cf_stipulation = '해당 홈페이지에 맞는 회원가입약관을 입력합니다.', cf_privacy = '해당 홈페이지에 맞는 개인정보처리방침을 입력합니다.' "; -mysql_query($sql) or die(mysql_error() . "

    " . $sql); +sql_query($sql, true, $dblink); // 1:1문의 설정 $sql = " insert into `{$table_prefix}qa_config` ( qa_title, qa_category, qa_skin, qa_mobile_skin, qa_use_email, qa_req_email, qa_use_hp, qa_req_hp, qa_use_editor, qa_subject_len, qa_mobile_subject_len, qa_page_rows, qa_mobile_page_rows, qa_image_width, qa_upload_size, qa_insert_content ) values ( '1:1문의', '회원|포인트', 'basic', 'basic', '1', '0', '1', '0', '1', '60', '30', '15', '15', '600', '1048576', '' ) "; -mysql_query($sql); +sql_query($sql, true, $dblink); // 관리자 회원가입 $sql = " insert into `{$table_prefix}member` @@ -177,15 +181,15 @@ $sql = " insert into `{$table_prefix}member` mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}' "; -@mysql_query($sql); +sql_query($sql, true, $dblink); // 내용관리 생성 -@mysql_query(" insert into `{$table_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '

    회사소개에 대한 내용을 입력하십시오.

    ' ") or die(mysql_error() . "

    " . $sql); -@mysql_query(" insert into `{$table_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '

    개인정보 처리방침에 대한 내용을 입력하십시오.

    ' ") or die(mysql_error() . "

    " . $sql); -@mysql_query(" insert into `{$table_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '

    서비스 이용약관에 대한 내용을 입력하십시오.

    ' ") or die(mysql_error() . "

    " . $sql); +sql_query(" insert into `{$table_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '

    회사소개에 대한 내용을 입력하십시오.

    ' ", true, $dblink); +sql_query(" insert into `{$table_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '

    개인정보 처리방침에 대한 내용을 입력하십시오.

    ' ", true, $dblink); +sql_query(" insert into `{$table_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '

    서비스 이용약관에 대한 내용을 입력하십시오.

    ' ", true, $dblink); // FAQ Master -@mysql_query(" insert into `{$table_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ") or die(mysql_error() . "

    " . $sql); +sql_query(" insert into `{$table_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ", true, $dblink); ?>

  • DB설정 완료
  • diff --git a/js/common.js b/js/common.js index 5344868bd..d20942579 100644 --- a/js/common.js +++ b/js/common.js @@ -503,14 +503,6 @@ var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_j } } -/** - * sms5 창 - **/ -var win_sms5 = function(href) { - var new_win = window.open(href, 'win_sms5', 'width=474, height=560, scrollbars=1'); - new_win.focus(); -} - /** * 새로운 비밀번호 분실 창 : 101123 **/ @@ -590,11 +582,6 @@ $(function(){ return false; }); - $(".win_sms5").click(function() { - win_sms5(this.href); - return false; - }); - /* $(".win_poll").click(function() { win_poll(this.href); diff --git a/lib/common.lib.php b/lib/common.lib.php index a07c5d45d..dfb55be26 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1260,10 +1260,6 @@ function get_sideview($mb_id, $name='', $email='', $homepage='') } if($mb_id) $str2 .= "전체게시물\n"; - if($g5['sms5_use_sideview']){ - $mb = get_member($mb_id, " mb_open, mb_sms , mb_hp "); - if( $mb['mb_open'] && $mb['mb_sms'] && $mb['mb_hp'] ) $str2 .= "문자보내기\n"; - } if($is_admin == "super" && $mb_id) { $str2 .= "회원정보변경\n"; $str2 .= "포인트내역\n"; @@ -1416,11 +1412,22 @@ function html_symbol($str) *************************************************************************/ // DB 연결 -function sql_connect($host, $user, $pass) +function sql_connect($host, $user, $pass, $db=G5_MYSQL_DB) { global $g5; - return @mysql_connect($host, $user, $pass); + if(function_exists('mysqli_connect') && G5_MYSQLI_USE) { + $link = mysqli_connect($host, $user, $pass, $db); + + // 연결 오류 발생 시 스크립트 종료 + if (mysqli_connect_errno()) { + die('Connect Error: '.mysqli_connect_error()); + } + } else { + $link = mysql_connect($host, $user, $pass); + } + + return $link; } @@ -1429,16 +1436,36 @@ function sql_select_db($db, $connect) { global $g5; - return @mysql_select_db($db, $connect); + if(function_exists('mysqli_select_db') && G5_MYSQLI_USE) + return @mysqli_select_db($connect, $db); + else + return @mysql_select_db($db, $connect); } -// mysql_query 와 mysql_error 를 한꺼번에 처리 -// mysql connect resource 지정 - 명랑폐인님 제안 -function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR) +function sql_set_charset($charset, $link=null) { global $g5; + if(!$link) + $link = $g5['connect_db']; + + if(function_exists('mysqli_set_charset') && G5_MYSQLI_USE) + mysqli_set_charset($link, $charset); + else + sql_query(" set names {$charset} "); +} + + +// mysqli_query 와 mysqli_error 를 한꺼번에 처리 +// mysql connect resource 지정 - 명랑폐인님 제안 +function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + // Blind SQL Injection 취약점 해결 $sql = trim($sql); // union의 사용을 허락하지 않습니다. @@ -1447,20 +1474,34 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR) // `information_schema` DB로의 접근을 허락하지 않습니다. $sql = preg_replace("#^select.*from.*where.*`?information_schema`?.*#i", "select 1", $sql); - if ($error) - $result = @mysql_query($sql, $g5['connect_db']) or die("

    $sql

    " . mysql_errno() . " : " . mysql_error() . "

    error file : {$_SERVER['SCRIPT_NAME']}"); - else - $result = @mysql_query($sql, $g5['connect_db']); + if(function_exists('mysqli_query') && G5_MYSQLI_USE) { + if ($error) { + $result = @mysqli_query($link, $sql) or die("

    $sql

    " . mysqli_errno($link) . " : " . mysqli_error($link) . "

    error file : {$_SERVER['SCRIPT_NAME']}"); + } else { + $result = @mysqli_query($link, $sql); + } + } else { + if ($error) { + $result = @mysql_query($sql, $link) or die("

    $sql

    " . mysql_errno() . " : " . mysql_error() . "

    error file : {$_SERVER['SCRIPT_NAME']}"); + } else { + $result = @mysql_query($sql, $link); + } + } return $result; } // 쿼리를 실행한 후 결과값에서 한행을 얻는다. -function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR) +function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null) { - $result = sql_query($sql, $error); - //$row = @sql_fetch_array($result) or die("

    $sql

    " . mysql_errno() . " : " . mysql_error() . "

    error file : $_SERVER['SCRIPT_NAME']"); + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + $result = sql_query($sql, $error, $link); + //$row = @sql_fetch_array($result) or die("

    $sql

    " . mysqli_errno() . " : " . mysqli_error() . "

    error file : $_SERVER['SCRIPT_NAME']"); $row = sql_fetch_array($result); return $row; } @@ -1469,7 +1510,11 @@ function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR) // 결과값에서 한행 연관배열(이름으로)로 얻는다. function sql_fetch_array($result) { - $row = @mysql_fetch_assoc($result); + if(function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE) + $row = @mysqli_fetch_assoc($result); + else + $row = @mysql_fetch_assoc($result); + return $row; } @@ -1479,7 +1524,10 @@ function sql_fetch_array($result) // 단, 결과 값은 스크립트(script) 실행부가 종료되면서 메모리에서 자동적으로 지워진다. function sql_free_result($result) { - return mysql_free_result($result); + if(function_exists('mysqli_free_result') && G5_MYSQLI_USE) + return mysqli_free_result($result); + else + return mysql_free_result($result); } @@ -1493,6 +1541,74 @@ function sql_password($value) } +function sql_insert_id($link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + if(function_exists('mysqli_insert_id') && G5_MYSQLI_USE) + return mysqli_insert_id($link); + else + return mysql_insert_id($link); +} + + +function sql_num_rows($result) +{ + if(function_exists('mysqli_num_rows') && G5_MYSQLI_USE) + return mysqli_num_rows($result); + else + return mysql_num_rows($result); +} + + +function sql_field_names($table, $link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + $columns = array(); + + $sql = " select * from `$table` limit 1 "; + $result = sql_query($sql, $link); + + if(function_exists('mysqli_fetch_field') && G5_MYSQLI_USE) { + while($field = mysqli_fetch_field($result)) { + $columns[] = $field->name; + } + } else { + $i = 0; + $cnt = mysql_num_fields($result); + while($i < $cnt) { + $field = mysql_fetch_field($result, $i); + $columns[] = $field->name; + $i++; + } + } + + return $columns; +} + + +function sql_error_info($link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + if(function_exists('mysqli_error') && G5_MYSQLI_USE) { + return mysqli_errno($link) . ' : ' . mysqli_error($link); + } else { + return mysql_errno($link) . ' : ' . mysql_error($link); + } +} + + // PHPMyAdmin 참고 function get_table_define($table, $crlf="\n") { @@ -1893,12 +2009,15 @@ function convert_charset($from_charset, $to_charset, $str) } -// mysql_real_escape_string 의 alias 기능을 한다. -function sql_real_escape_string($field) +// mysqli_real_escape_string 의 alias 기능을 한다. +function sql_real_escape_string($str, $link=null) { global $g5; - return mysql_real_escape_string($field, $g5['connect_db']); + if(!$link) + $link = $g5['connect_db']; + + return mysqli_real_escape_string($link, $str); } function escape_trim($field) @@ -3017,4 +3136,29 @@ function get_skin_url($dir, $skin) return str_replace(G5_PATH, G5_URL, $skin_path); } + +// 발신번호 유효성 체크 +function check_vaild_callback($callback){ + $_callback = preg_replace('/[^0-9]/','', $callback); + + /** + * 1588 로시작하면 총8자리인데 7자리라 차단 + * 02 로시작하면 총9자리 또는 10자리인데 11자리라차단 + * 1366은 그자체가 원번호이기에 다른게 붙으면 차단 + * 030으로 시작하면 총10자리 또는 11자리인데 9자리라차단 + */ + + if( substr($_callback,0,4) == '1588') if( strlen($_callback) != 8) return false; + if( substr($_callback,0,2) == '02') if( strlen($_callback) != 9 && strlen($_callback) != 10 ) return false; + if( substr($_callback,0,3) == '030') if( strlen($_callback) != 10 && strlen($_callback) != 11 ) return false; + + if( !preg_match("/^(02|0[3-6]\d|01(0|1|3|5|6|7|8|9)|070|080|007)\-?\d{3,4}\-?\d{4,5}$/",$_callback) && + !preg_match("/^(15|16|18)\d{2}\-?\d{4,5}$/",$_callback) ){ + return false; + } else if( preg_match("/^(02|0[3-6]\d|01(0|1|3|5|6|7|8|9)|070|080)\-?0{3,4}\-?\d{4}$/",$_callback )) { + return false; + } else { + return true; + } +} ?> \ No newline at end of file diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index a40cb99e4..0033c2aed 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -474,7 +474,7 @@ and the roundoff errors in the Gaussian blur process, are welcome. $radius = abs(round($radius)); // Only integers make sense. if ($radius == 0) { - return $img; imagedestroy($img); break; } + return $img; imagedestroy($img); } $w = imagesx($img); $h = imagesy($img); $imgCanvas = imagecreatetruecolor($w, $h); $imgBlur = imagecreatetruecolor($w, $h); diff --git a/plugin/sms5/skin/basic/img/ajax-loader.gif b/plugin/sms5/skin/basic/img/ajax-loader.gif deleted file mode 100644 index 96fefbc5130a6514a03709b2b8f40a88cf82fae2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1924 zcmciDX;70#00!U)Urwn9NDf8|Nk{?(l!}Qm1QSd^sNw-w96TTt3HoXQ;KEY5&xQ_@`6p)R|7Ze|KlUecpGz-Ms;R zyF6JG&`!`>5GcFv1qcN4J{Gsm76V0CaaFx8^nHnS`e;crfkNLKn`)Z<^T57ad%!m& znBjBCcl%a%%QdDs?C*Arv(c=i=qQKtu}LuwEDq~JJeL)!)orci6g~AYxE|RX;ebAo47rl|h=>fFdqNlMi+s5|5((!#k{zHt zS4${~6YmJ+LP`!vWo6}8<<}Gyn@jVh*X?p$m3wP|x=n>Zs#J3mrIod#8ydYktK+_5 zs4DyV^@f4FgYsU%9mnpoN%&iYhYk}DGH~~D#_=O(M~5nA4bz6n{>8q9mvhgTy*I7~ z9Q!LUrU41@LFa}cvtO@kanB`aV)-0EL8CXuXuN&&E3N+SN8Uvl=TJUl1vbeJ7$&sU<&M?!@% z6R@)CdP1=*nr)Y}wS-;|s5hl$1h!z>TD`TXrsnNkbt+L!x6%w88YcBQk4Bv_j^lKM ziHjYiN&7p*r?`8@o{@^VyR!q+`X%M!z{30+(#H}tjqX+!#}Ldwy>{1Q{pHux+4aoU zxjcK6Rk;hAlV=gYbF}?hcWFmR;}PG3pZ0=`SM|EHf&P0YnNQ`;MtpyG`1qQx-R@pc z79>3*H!q)GP-qQ36T*Nc077IU&smTFM_u%$$+^gyc-MLWRY_CEs9G+R z%M~JVq*P>6QrgwC(&3OznUnDhwTgKk-$h$<)#@`tjaDK^j|h^kuM*rXwuV`xN(5cn)S zOa`=v_z|=+IQFvR9r9ht&@lF@qh2&{zlv~M*2BA1-09zC+tNBs8&?l5j;de%FxmX0 z%c{bW|3XOJEtn5~9QIizhV7q=&ZiY1vl%7mbeb?lELr&x_k$s12sj~#1ZG!ZOYsU* z0Q3_?HATa^*#d-e2o2PxP$kAJMwwz@AX*Ru4Ui!kOa~ZveL8r`cjW1rl*cVoyob6+ zyb<-Nq__VSZdKn07fnpVzi;p#d?545r3fk+A%-a_l^#L3YqbE}gX5r~g!^FI$hs5Q zrrMhcTKgJJeS#WyU8zEu6Y-ZT25iCX2jY85h@@>+BblK-6Pp5%LT4aLEFAo05Ys$S(J2IA~KZ^z>7G@QVNZYl8|LSC;?yS86TEkTBr=dT*}JH%@d?)w5@IJ z@5^lkv%3%P!*yms4qS1N5X-Q`;R>vtI^Z#AZvw^D>4W{#%ZkO(NL@+Y5LW7x}u!bhj)Gf3x+_0a&Nb`z37R$Ctf6$)nzUh%Dz%Yf8 zFFe1E4-WY<^eAh8Zb4yDaY?AT0|62oPqq{@4yM`&Lm<~qp<@|k-qn${=TKEtC5^We z4Xv|;9#+^vt00|{-uF+%mM*7ZTx$hWML$itg`Xf!V#i3+cq4Ikuwbt5ss2g-;>&S^ O2}sxo@>+QV&EpTcIvUad diff --git a/plugin/sms5/skin/basic/img/box_ico.gif b/plugin/sms5/skin/basic/img/box_ico.gif deleted file mode 100644 index 9d57d3668813c2a07fd22931284e2baf5136b3c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 60 zcmZ?wbhEHbWM|-IXkcXc{buI>|Nj+#vM@3*Ff!;c00Bsbfl0WBKYhZ9e@wHBZbiSn NWL*~87{th64FDS>5}*J8 diff --git a/plugin/sms5/skin/basic/img/scemo_ico.gif b/plugin/sms5/skin/basic/img/scemo_ico.gif deleted file mode 100644 index 625048e490f176a8b00d8f11260f3cf2f89a6614..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67 zcmZ?wbhEHbWM|-In8?InVPT=6q4EF!e+C8y#h)yU3=B*RIzTo9NS=X7WQu$`OV diff --git a/plugin/sms5/skin/basic/mobile.css b/plugin/sms5/skin/basic/mobile.css deleted file mode 100644 index 24956c39b..000000000 --- a/plugin/sms5/skin/basic/mobile.css +++ /dev/null @@ -1,48 +0,0 @@ -#sms5_send {position:relative} - -.sms5_box {position:relative;padding:10px;border-radius:5px;background:#fbec99} -.sms5_box .box_ico {position:absolute;top:20px;left:-7px;width:7px;height:13px;background:url('img/box_ico.gif') no-repeat} -.sms5_box .box_txt {border:0;background:transparent;word-break:break-all;resize:none;overflow:hidden} -.sms5_box .box_square {width:100px;height:90px} - -#send_write {padding:0 20px !important} -#send_write h2 {padding:0 0 10px} -#send_write .sms5_box {margin:0 0 5px;text-align:center} -#send_write .box_txt {width:90%;height:80px} -#wr_message_lbl {position:absolute;top:45px;left:48%;color:#999;font-size:0.95em;letter-spacing:-0.1em} - -.write_inner {position:relative;padding:10px 0;border-bottom:1px solid #efefef;zoom:1} -.write_inner:after {display:block;visibility:hidden;clear:both;content:''} -.write_inner h2 {margin:0;padding:0 0 20px !important} -.write_floater {position:absolute;top:10px;right:0;text-align:right} -.write_floater_btn {margin:0;padding:0;border:0;background:transparent;color:#999;font-size:0.95em;letter-spacing:-0.1em} - -#write_rcv {margin:0 0 10px} -#write_rcv strong {display:inline-block;margin:0 10px 0 0} -#write_reply label {display:inline-block;margin:0 10px 0 0;font-weight:bold} -#write_reply #mh_reply {padding:0 5px;width:90px;height:20px;border:1px solid #e9e9e9;text-align:center;line-height:1.8em} - -#write_rsv .rsv_line {display:block;height:10px} - -.write_scemo strong {display:block;margin:0 0 10px} -.write_scemo .scemo_btn {margin:0 0 1px;padding:10px 0;width:100%;border:0;background:#686868;color:#fff;text-align:center} -.write_scemo .scemo_list {display:none;letter-spacing:-4px} -.write_scemo .list_closer {margin:5px 0;text-align:right} -.write_scemo .list_closer_btn {margin:0;padding:10px 0;width:100%;border:0;background:#383838;color:#fff;letter-spacing:0} -.write_scemo .scemo_add {margin:0;padding:0;width:25%;height:40px;border:1px solid #e9e9e9;background:transparent;letter-spacing:0} -#write_sc .scemo_list {margin:0 0 20px} - -#sms_byte {position:absolute;top:-27px;right:0;color:#999} - -#send_emo {position:relative;padding:20px;border-top:1px solid #e9e9e9;background:#f7f7f7} -#send_emo h2 {margin:0 0 20px} -#send_emo .tmp_loading {display:block;padding:180px 0 0;text-align:center} -#send_emo #emo_sel {position:absolute;top:20px;right:20px;margin:0} -#send_emo .emo_list {margin:0;padding:0;list-style:none} -#send_emo li {float:left;margin:0 2% 10px 0;width:49%} -#send_emo li:nth-of-type(even) {margin:0 0 10px} -#send_emo .sms5_box {background:#fbec99} -#send_emo .box_ico {display:none} -#send_emo .box_txt {cursor:pointer} -#send_emo .emo_tit {display:block;height:20px;line-height:2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} -#send_emo .btn_submit {padding:0 5px;height:24px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.95em;vertical-align:middle;cursor:pointer} \ No newline at end of file diff --git a/plugin/sms5/skin/basic/style.css b/plugin/sms5/skin/basic/style.css deleted file mode 100644 index 36bb9c94f..000000000 --- a/plugin/sms5/skin/basic/style.css +++ /dev/null @@ -1,50 +0,0 @@ -#sms5_send {position:relative} - -.sms5_box {position:relative;padding:10px;border-radius:5px;background:#fbec99} -.sms5_box .box_ico {position:absolute;top:20px;left:-7px;width:7px;height:13px;background:url('img/box_ico.gif') no-repeat} -.sms5_box .box_txt {border:0;background:transparent;word-break:break-all;resize:none;overflow:hidden} -.sms5_box .box_square {width:100px;height:90px} - -#send_write {padding:0 20px !important} -#send_write h2 {padding:0 0 10px} -#send_write .sms5_box {margin:0 0 5px;text-align:center} -#send_write .box_txt {width:390px;height:80px} -#wr_message_lbl {position:absolute;top:45px;left:200px;color:#999;font-size:0.95em;letter-spacing:-0.1em} - -.write_inner {position:relative;padding:10px 0;border-bottom:1px solid #efefef;zoom:1} -.write_inner:after {display:block;visibility:hidden;clear:both;content:''} -.write_inner h2 {margin:0;padding:0 0 10px !important} -.write_floater {position:absolute;top:15px;right:0;text-align:right} -.write_floater_btn {margin:0;padding:0;border:0;background:transparent;color:#999;font-size:0.95em;letter-spacing:-0.1em} - -#write_rcv {float:left;height:22px;line-height:1.8em} -#write_rcv strong {display:inline-block;margin:0 10px 0 0} -#write_reply {float:right} -#write_reply label {display:inline-block;margin:0 10px 0 0;font-weight:bold} -#write_reply #mh_reply {padding:0 5px;width:90px;height:20px;border:1px solid #e9e9e9;text-align:center;line-height:1.8em} - -.write_scemo {width:48%} -.write_scemo strong {display:block;margin:0 0 10px} -.write_scemo .scemo_list {letter-spacing:-4px} -.write_scemo .scemo_add {margin:0;padding:0;height:25px;border:1px solid #e9e9e9;background:transparent;letter-spacing:0} -#write_sc {float:left} -#write_sc .scemo_add {width:25px} -#write_emo {float:right} -#write_emo .scemo_list {text-align:right} -#write_emo .scemo_add {width:66px} -#write_emo .emo_long {} - -#sms_byte {position:absolute;top:-27px;right:0;color:#999} - -#send_emo {position:relative;padding:20px;border-top:1px solid #e9e9e9;background:#f7f7f7} -#send_emo h2 {margin:0 0 20px} -#send_emo .tmp_loading {display:block;padding:180px 0 0;text-align:center} -#send_emo #emo_sel {position:absolute;top:20px;right:20px;margin:0} -#send_emo .emo_list {margin:0;padding:0;list-style:none} -#send_emo li {float:left;margin:0 10px 10px 0 !important;margin:0 5px 10px 0;width:113px !important;width:110px} -#send_emo li:nth-of-type(3n) {margin:0 0 10px !important} -#send_emo .sms5_box {background:#fbec99} -#send_emo .box_ico {display:none} -#send_emo .box_txt {cursor:pointer} -#send_emo .emo_tit {display:block;height:20px;line-height:2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} -#send_emo .btn_submit {padding:0 5px;height:24px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.95em;vertical-align:middle;cursor:pointer} \ No newline at end of file diff --git a/plugin/sms5/skin/basic/write.skin.php b/plugin/sms5/skin/basic/write.skin.php deleted file mode 100644 index 632bdf272..000000000 --- a/plugin/sms5/skin/basic/write.skin.php +++ /dev/null @@ -1,378 +0,0 @@ -', 0); -?> - -

    -

    SMS 보내기

    - -
    -
    - - - -

    보낼내용

    -
    - - - -
    0 / 80 byte
    -
    - -
    - -
    - 수신회원 -
    - -
    - - readonly> -
    -
    - -
    -

    예약전송

    - -
    - - -
    - - 년 - 월 - 일 - 시 - 분 -
    - -
    -
    - 특수기호 -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - 이모티콘 -
    - - - - - - - - - - - - - - - -
    -
    -
    - -
    - - -
    -
    - -
    - - -
    -

    이모티콘 목록

    -
    - - -
    - -
      -
    - - - - -
    - - -
    - - - - \ No newline at end of file diff --git a/plugin/sms5/skin/basic/write_mobile.skin.php b/plugin/sms5/skin/basic/write_mobile.skin.php deleted file mode 100644 index f8bdca77d..000000000 --- a/plugin/sms5/skin/basic/write_mobile.skin.php +++ /dev/null @@ -1,394 +0,0 @@ -', 0); -?> - -
    -

    SMS 보내기

    - -
    -
    - - - -

    보낼내용

    -
    - - - -
    0 / 80 byte
    -
    - -
    - -
    - 수신회원 -
    - -
    - - readonly> -
    -
    - -
    -

    예약전송

    - -
    - - -
    - - 년 - 월 - - 일 - 시 - 분 -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    -
    - -
    - - -
    -

    이모티콘 목록

    -
    - - -
    - -
      -
    - - - - -
    - - -
    - - - - \ No newline at end of file diff --git a/plugin/sms5/sms5.lib.php b/plugin/sms5/sms5.lib.php index 8979454dc..175c74f36 100644 --- a/plugin/sms5/sms5.lib.php +++ b/plugin/sms5/sms5.lib.php @@ -7,19 +7,6 @@ if (!defined('_GNUBOARD_')) exit; ** *************************************************************************/ -// 스킨디렉토리를 SELECT 형식으로 얻음 -function get_sms5_skin_select($skin_gubun, $id, $name, $selected='', $event='') -{ - $skins = get_skin_dir($skin_gubun, G5_SMS5_PATH); - $str = ""; - return $str; -} - // 한페이지에 보여줄 행, 현재페이지, 총페이지수, URL function sms5_sub_paging($write_pages, $cur_page, $total_page, $url, $add="", $starget="") { diff --git a/plugin/sms5/write.php b/plugin/sms5/write.php deleted file mode 100644 index 4a9cf412e..000000000 --- a/plugin/sms5/write.php +++ /dev/null @@ -1,75 +0,0 @@ - 0 && $is_admin != 'super') { - if ($total >= $sms5['cf_day_count']) { - $err = "하루에 보낼수 있는 문자갯수(".number_format($sms5['cf_day_count'])." 건)를 초과하였습니다."; - alert_close($err); - } -} - -// 포인트 검사 -if (!$err and $sms5['cf_point'] > 0 && $is_admin != 'super') { - if ($sms5['cf_point'] > $member['mb_point']) { - $err = "보유하신 포인트(".number_format($member['mb_point'])." 포인트)가 없거나 모자라서\\n\\n문자전송(".number_format($sms5['cf_point'])." 포인트)이 불가합니다.\\n\\n포인트를 적립하신 후 다시 시도 해 주십시오."; - alert_close($err); - } -} - -// 특정회원에게 문자 전송 -if ($mb_id) { - $mb = get_member($mb_id); - if (!$mb['mb_hp']) alert_close("회원 휴대폰번호가 없습니다."); - if (!$mb['mb_open']) alert_close("정보를 공개하지 않았습니다."); - if (!$mb['mb_sms']) alert_close("SMS 수신여부가 비활성화 되어 있습니다."); - //$hp = $mb['mb_hp']; -} - -$g5['title'] = "문자전송"; - -$token = get_token(); - -$emoticon_group = array(); -$qry = sql_query("select * from {$g5['sms5_form_group_table']} where fg_member = 1 order by fg_name"); -while ($res = sql_fetch_array($qry)) array_push($emoticon_group, $res); - -$action_url = "./write_update.php"; - -if( G5_IS_MOBILE ){ - $write_skin_page = "/write_mobile.skin.php"; -} else { - $write_skin_page = "/write.skin.php"; -} -include_once ($sms5_skin_path.$write_skin_page); -echo PHP_EOL.''.PHP_EOL; -?> \ No newline at end of file diff --git a/plugin/sms5/write_update.php b/plugin/sms5/write_update.php deleted file mode 100644 index ded3e2d8e..000000000 --- a/plugin/sms5/write_update.php +++ /dev/null @@ -1,170 +0,0 @@ - 0 && $is_admin != 'super') { - $row = sql_fetch(" select count(*) as cnt from {$g5['sms5_member_history_table']} where mb_id='{$member['mb_id']}' and date_format(mh_datetime, '%Y-%m-%d') = '".G5_TIME_YMD."' "); - if ($row['cnt'] + $total > $sms5['cf_day_count']) { - alert("하루에 보낼수 있는 문자갯수(".number_format($sms5['cf_day_count']).")를 초과하였습니다."); - } -} - -// 포인트 검사 -if ($sms5['cf_point'] > 0 && $is_admin != 'super') { - $minus_point = $sms5['cf_point'] * $total; - if ($minus_point > $member['mb_point']) - alert("보유하신 포인트(".number_format($member['mb_point']).")가 없거나 모자라서 문자전송(".number_format($minus_point).")이 불가합니다.\\n\\n포인트를 적립하신 후 다시 시도 해 주십시오."); -} else - $minus_point = 0; - -// 예약전송 -if ($mh_by && $mh_bm && $mh_bd && $mh_bh && $mh_bi) { - $mh_booking = "$mh_by-$mh_bm-$mh_bd $mh_bh:$mh_bi:00"; - $booking = $mh_by.$mh_bm.$mh_bd.$mh_bh.$mh_bi; -} else { - $mh_booking = ''; - $booking = ''; -} - -$SMS = new SMS5; -$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); - -$mh_message = conv_unescape_nl($mh_message); - -$result = $SMS->Add($mh_hp, $mh_reply, '', '', $mh_message, $booking, $total); - -$is_success = null; - -if ($result) -{ - $result = $SMS->Send(); - - if ($result) //SMS 서버에 접속했습니다. - { - foreach ($SMS->Result as $result) - { - list($hp, $code) = explode(":", $result); - - if (substr($code,0,5) == "Error") - { - $is_success = false; - - switch (substr($code,6,2)) { - case '02': // "02:형식오류" - $mh_log = "형식이 잘못되어 전송이 실패하였습니다."; - break; - case '23': // "23:인증실패,데이터오류,전송날짜오류" - $mh_log = "데이터를 다시 확인해 주시기바랍니다."; - break; - case '97': // "97:잔여코인부족" - $mh_log = "잔여코인이 부족합니다."; - break; - case '98': // "98:사용기간만료" - $mh_log = "사용기간이 만료되었습니다."; - break; - case '99': // "99:인증실패" - $mh_log = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요."; - break; - default: // "미 확인 오류" - $mh_log = "알 수 없는 오류로 전송이 실패하었습니다."; - break; - } - } - else - { - $is_success = true; - $mh_log = "문자전송:".get_hp($hp, 1); - } - - $hp = get_hp($hp, 1); - $log = array_shift($SMS->Log); - sql_query("insert into {$g5['sms5_member_history_table']} set mb_id='{$member['mb_id']}', mh_reply='$mh_reply', mh_hp='$hp', mh_datetime='".G5_TIME_YMDHIS."', mh_booking='$mh_booking', mh_log='$mh_log', mh_ip='".$_SERVER['REMOTE_ADDR']."'"); - - if ($is_admin == 'super') - $sms5['cf_point'] = 0; - - if ($is_success) - insert_point($member['mb_id'], (-1) * $sms5['cf_point'], "$mh_log"); - - } - $SMS->Init(); // 보관하고 있던 결과값을 지웁니다. - } - else alert("에러: SMS 서버와 통신이 불안정합니다."); -} -else alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다."); - -alert_close("$total 건의 문자메세지 전송을 완료하였습니다."); -?> \ No newline at end of file