회신번호 필수
diff --git a/adm/sms_admin/config_update.php b/adm/sms_admin/config_update.php
index 3d9b57e03..236d56e74 100644
--- a/adm/sms_admin/config_update.php
+++ b/adm/sms_admin/config_update.php
@@ -15,6 +15,7 @@ if(!check_vaild_callback($cf_phone))
alert('회신번호가 올바르지 않습니다.');
$userinfo = get_icode_userinfo($cf_icode_id, $cf_icode_pw);
+$cf_icode_server_port = isset($cf_icode_server_port) ? preg_replace('/[^0-9]/', '', $cf_icode_server_port) : '7295';
if ($userinfo['code'] == '202')
alert('아이코드 아이디와 패스워드가 맞지 않습니다.');
@@ -33,10 +34,12 @@ sql_query($sql);
// 아이코드 설정
$sql = " update {$g5['config_table']}
set cf_sms_use = '$cf_sms_use',
+ cf_sms_type = '$cf_sms_type',
cf_icode_id = '$cf_icode_id',
cf_icode_pw = '$cf_icode_pw',
cf_icode_server_ip = '$cf_icode_server_ip',
- cf_icode_server_port = '$cf_icode_server_port' ";
+ cf_icode_server_port = '$cf_icode_server_port',
+ cf_icode_token_key = '$cf_icode_token_key'";
sql_query($sql);
goto_url("./config.php");
diff --git a/adm/sms_admin/css/sms5.css b/adm/sms_admin/css/sms5.css
index b5c09d1c4..03187e7ea 100644
--- a/adm/sms_admin/css/sms5.css
+++ b/adm/sms_admin/css/sms5.css
@@ -22,6 +22,7 @@
.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 textarea.box_txt.is_overview{overflow:visible;min-height:130px}
.sms5_box .box_square {width:100px;height:90px}
#write_wrap {z-index:9}
diff --git a/adm/sms_admin/history_send.php b/adm/sms_admin/history_send.php
index 109dfcc41..9b4f29600 100644
--- a/adm/sms_admin/history_send.php
+++ b/adm/sms_admin/history_send.php
@@ -224,8 +224,8 @@ if($config['cf_sms_type'] == 'LMS') {
?>
&st=&sv=&wr_no=&wr_renum=';
@@ -104,7 +104,7 @@ function all_send()
-
+
diff --git a/adm/sms_admin/sms5.sql b/adm/sms_admin/sms5.sql
index 652872219..96bb7b1a4 100644
--- a/adm/sms_admin/sms5.sql
+++ b/adm/sms_admin/sms5.sql
@@ -149,7 +149,7 @@ CREATE TABLE `{$g5['sms5_write_table']}` (
`wr_no` int(11) NOT NULL default '1',
`wr_renum` int(11) NOT NULL default '0',
`wr_reply` varchar(255) NOT NULL default '',
- `wr_message` varchar(255) NOT NULL default '',
+ `wr_message` text NOT NULL,
`wr_booking` datetime NOT NULL default '0000-00-00 00:00:00',
`wr_total` int(11) NOT NULL default '0',
`wr_re_total` int(11) NOT NULL default '0',
diff --git a/adm/sms_admin/sms_write.php b/adm/sms_admin/sms_write.php
index 4654a3a6d..77754a97c 100644
--- a/adm/sms_admin/sms_write.php
+++ b/adm/sms_admin/sms_write.php
@@ -266,8 +266,8 @@ function sms5_chk_send(f)
w = document.body.clientWidth/2 - 200;
h = document.body.clientHeight/2 - 100;
- act = window.open('sms_ing.php', 'act', 'width=300, height=200, left=' + w + ', top=' + h);
- act.focus();
+ //act = window.open('sms_ing.php', 'act', 'width=300, height=200, left=' + w + ', top=' + h);
+ //act.focus();
f.send_list.value = list;
return true;
@@ -407,6 +407,7 @@ function byte_check(wr_message, sms_bytes)
var conts = document.getElementById(wr_message);
var bytes = document.getElementById(sms_bytes);
var max_bytes = document.getElementById("sms_max_bytes");
+ var lms_max_length =
var i = 0;
var cnt = 0;
@@ -427,14 +428,14 @@ function byte_check(wr_message, sms_bytes)
if(cnt > 90)
- max_bytes.innerHTML = 1500;
+ max_bytes.innerHTML = lms_max_length;
else
max_bytes.innerHTML = 90;
- if (cnt > 1500)
+ if (cnt > lms_max_length)
{
- exceed = cnt - 1500;
- alert('메시지 내용은 1500바이트를 넘을수 없습니다.\n\n작성하신 메세지 내용은 '+ exceed +'byte가 초과되었습니다.\n\n초과된 부분은 자동으로 삭제됩니다.');
+ exceed = cnt - lms_max_length;
+ alert('메시지 내용은 '+ lms_max_length +'바이트를 넘을수 없습니다.\n\n작성하신 메세지 내용은 '+ exceed +'byte가 초과되었습니다.\n\n초과된 부분은 자동으로 삭제됩니다.');
var tcnt = 0;
var xcnt = 0;
var tmp = conts.value;
@@ -447,7 +448,7 @@ function byte_check(wr_message, sms_bytes)
tcnt += 1;
}
- if (tcnt > 1500) {
+ if (tcnt > lms_max_length) {
tmp = tmp.substring(0,i);
break;
} else {
diff --git a/adm/sms_admin/sms_write_send.php b/adm/sms_admin/sms_write_send.php
index c7ec11030..e88bdae46 100644
--- a/adm/sms_admin/sms_write_send.php
+++ b/adm/sms_admin/sms_write_send.php
@@ -6,8 +6,24 @@ auth_check($auth[$sub_menu], "w");
check_admin_token();
+$result = sql_query("describe `{$g5['sms5_write_table']}`");
+while ($row = sql_fetch_array($result)){
+ if( $row['Field'] === 'wr_message' && $row['Type'] === 'varchar(255)' ){
+ sql_query("ALTER TABLE `{$g5['sms5_write_table']}` MODIFY wr_message TEXT NOT NULL;", false);
+ break;
+ }
+}
+
$g5['title'] = "문자전송중";
+if ($config['cf_sms_use'] != 'icode') {
+ alert('기본환경설정에서 icode sms 사용이 비활성화 되어 있습니다.');
+}
+
+if ( ! (($config['cf_icode_id'] && $config['cf_icode_pw']) || $config['cf_icode_token_key']) ) {
+ alert('아이코드 설정값이 존재하지 않습니다.');
+}
+
$wr_reply = preg_replace('#[^0-9\-]#', '', trim($wr_reply));
$wr_message = clean_xss_tags(trim($wr_message));
@@ -94,12 +110,12 @@ while ($row = array_shift($send_list))
$hp = get_hp($item[$i][1], 0);
$name = $item[$i][0];
- if(!$hp) continue;
+ if(!$hp) continue 2;
if ($wr_overlap && array_overlap($hps, $hp)) {
$overlap++;
array_push( $duplicate_data['hp'], $row['bk_hp'] );
- continue;
+ continue 2;
}
array_push($list, array('bk_hp' => $hp, 'bk_name' => $name));
@@ -111,12 +127,12 @@ 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(!$row['bk_hp']) continue 2;
if ($wr_overlap && array_overlap($hps, $row['bk_hp'])) {
$overlap++;
array_push( $duplicate_data['hp'], $row['bk_hp'] );
- continue;
+ continue 2;
}
array_push($list, $row);
array_push($hps, $row['bk_hp']);
@@ -141,14 +157,11 @@ if ($wr_by && $wr_bm && $wr_bd && $wr_bh && $wr_bi) {
$booking = '';
}
-if ($config['cf_sms_use'] != 'icode') {
- alert('기본환경설정에서 icode sms 사용이 비활성화 되어 있습니다.');
-}
-
include_once(G5_ADMIN_PATH.'/admin.head.php');
$reply = str_replace('-', '', trim($wr_reply));
-$wr_message = conv_unescape_nl($wr_message);
+$db_wr_message = conv_unescape_nl($wr_message);
+$wr_message = conv_unescape_nl(stripslashes($wr_message));
$SMS = new SMS5;
@@ -186,7 +199,7 @@ if($config['cf_sms_type'] == 'LMS') {
if($result) {
$result = $SMS->Send();
-
+
if ($result) //SMS 서버에 접속했습니다.
{
foreach ($SMS->Result as $result)
@@ -242,7 +255,7 @@ if($config['cf_sms_type'] == 'LMS') {
}
}
- sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$wr_message', wr_success='$wr_success', wr_failure='$wr_failure', wr_memo='$str_serialize', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
+ sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$db_wr_message', wr_success='$wr_success', wr_failure='$wr_failure', wr_memo='$str_serialize', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
}
} else {
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
@@ -260,7 +273,7 @@ if($config['cf_sms_type'] == 'LMS') {
else
$wr_no = 1;
- sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$wr_message', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
+ sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$db_wr_message', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
$wr_success = 0;
$wr_failure = 0;
@@ -324,11 +337,16 @@ if($config['cf_sms_type'] == 'LMS') {
function win_close_alert($msg) {
- $html = "";
+ $html = "";
echo $html;
exit;
@@ -336,8 +354,8 @@ function win_close_alert($msg) {
?>
0) {
}
// 음성 캡챠 파일 삭제
-$captcha_mp3 = glob(G5_PATH.'/data/cache/kcaptcha-*.mp3');
+$captcha_mp3 = glob(G5_DATA_PATH.'/cache/kcaptcha-*.mp3');
if($captcha_mp3 && is_array($captcha_mp3)) {
foreach ($captcha_mp3 as $file) {
if (filemtime($file) + 86400 < G5_SERVER_TIME) {
diff --git a/bbs/download.php b/bbs/download.php
index e4f7fa3fe..2b2aa1f2b 100644
--- a/bbs/download.php
+++ b/bbs/download.php
@@ -108,17 +108,17 @@ run_event('download_file_header', $file, $file_exist_check);
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
header("content-type: doesn/matter");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-transfer-encoding: binary");
} else if (preg_match("/Firefox/i", $_SERVER['HTTP_USER_AGENT'])){
header("content-type: file/unknown");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"".basename($file['bf_source'])."\"");
header("content-description: php generated data");
} else {
header("content-type: file/unknown");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-description: php generated data");
}
diff --git a/bbs/move_update.php b/bbs/move_update.php
index b3c28f09c..044586264 100644
--- a/bbs/move_update.php
+++ b/bbs/move_update.php
@@ -192,6 +192,8 @@ while ($row = sql_fetch_array($result))
sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write + '$count_write' where bo_table = '$move_bo_table' ");
sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + '$count_comment' where bo_table = '$move_bo_table' ");
+
+ run_event('bbs_move_copy', $row2, $move_bo_table, $insert_id, $next_wr_num, $sw);
delete_cache_latest($move_bo_table);
}
diff --git a/bbs/password.php b/bbs/password.php
index 5f6c4672e..54209e9d3 100644
--- a/bbs/password.php
+++ b/bbs/password.php
@@ -3,6 +3,10 @@ include_once('./_common.php');
$g5['title'] = '비밀번호 입력';
+if( isset($comment_id) ){
+ $comment_id = (int) $comment_id;
+}
+
switch ($w) {
case 'u' :
$action = G5_HTTP_BBS_URL.'/write.php';
diff --git a/bbs/qadownload.php b/bbs/qadownload.php
index 3c1a838c0..b6f163ed7 100644
--- a/bbs/qadownload.php
+++ b/bbs/qadownload.php
@@ -22,21 +22,26 @@ if($is_guest) {
$filepath = G5_DATA_PATH.'/qa/'.$file['qa_file'.$no];
$filepath = addslashes($filepath);
-if (!is_file($filepath) || !file_exists($filepath))
+$file_exist_check = (!is_file($filepath) || !file_exists($filepath)) ? false : true;
+
+if ( false === run_replace('qa_download_file_exist_check', $file_exist_check, $file) ){
alert('파일이 존재하지 않습니다.');
+}
$g5['title'] = '다운로드 > '.conv_subject($file['qa_subject'], 255);
+run_event('qa_download_file_header', $file, $file_exist_check);
+
$original = urlencode($file['qa_source'.$no]);
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
header("content-type: doesn/matter");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-transfer-encoding: binary");
} else {
header("content-type: file/unknown");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-description: php generated data");
}
diff --git a/bbs/write_update.php b/bbs/write_update.php
index 3f50cc96a..723cb7857 100644
--- a/bbs/write_update.php
+++ b/bbs/write_update.php
@@ -466,9 +466,9 @@ for ($i=0; $i ');
+define('G5_NO_PROFILE_IMG', ' ');
// 썸네일 처리 방식, 비율유지 하지 않고 썸네일을 생성하려면 주석을 풀고 값은 false 입력합니다. ( true 또는 주석으로 된 경우에는 비율 유지합니다. )
//define('G5_USE_THUMB_RATIO', false);
diff --git a/extend/sms5.extend.php b/extend/sms5.extend.php
index dbef097cf..cae7e38a3 100644
--- a/extend/sms5.extend.php
+++ b/extend/sms5.extend.php
@@ -13,6 +13,12 @@ define('G5_SMS5_ADMIN_DIR', 'sms_admin');
define('G5_SMS5_ADMIN_PATH', G5_ADMIN_PATH.'/'.G5_SMS5_ADMIN_DIR);
define('G5_SMS5_ADMIN_URL', G5_ADMIN_URL.'/'.G5_SMS5_ADMIN_DIR);
+define('ICODE_JSON_SOCKET_HOST', '211.172.232.124');
+define('ICODE_JSON_SOCKET_PORT', '9201');
+
+define('G5_ICODE_LMS_MAX_LENGTH', 1500); // 구버전 LMS 최대길이
+define('G5_ICODE_JSON_MAX_LENGTH', 2000); // JSON 버전 LMS 최대길이
+
// SMS 테이블명
$g5['sms5_prefix'] = 'sms5_';
$g5['sms5_config_table'] = $g5['sms5_prefix'] . 'config';
diff --git a/install/ajax.install.check.php b/install/ajax.install.check.php
index fd5616f73..a6fc82f2c 100644
--- a/install/ajax.install.check.php
+++ b/install/ajax.install.check.php
@@ -15,6 +15,10 @@ if (file_exists($dbconfig_file)) {
die(install_json_msg('프로그램이 이미 설치되어 있습니다.'));
}
+if (preg_match("/[^0-9a-z_]+/i", $_POST['table_prefix']) ) {
+ die(install_json_msg('TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.'));
+}
+
$mysql_host = safe_install_string_check($_POST['mysql_host'], 'json');
$mysql_user = safe_install_string_check($_POST['mysql_user'], 'json');
$mysql_pass = safe_install_string_check($_POST['mysql_pass'], 'json');
diff --git a/install/install_config.php b/install/install_config.php
index 6dd988989..937dc7008 100644
--- a/install/install_config.php
+++ b/install/install_config.php
@@ -61,13 +61,13 @@ $ajax_token = md5($tmp_str.$_SERVER['REMOTE_ADDR'].$_SERVER['DOCUMENT_ROOT']);
TABLE명 접두사
- 가능한 변경하지 마십시오.
+ TABLE명 접두사는 영문자, 숫자, _ 만 입력 가능합니다.
@@ -45,6 +47,7 @@ var char_max = parseInt(); // 최대- 삭제
@@ -45,6 +47,7 @@ var char_max = parseInt(); // 최대- 삭제
- 관리자
- RSS
@@ -57,7 +56,6 @@ add_stylesheet('', 0
-