XSS 취약점 수정 및 LMS 모듈 추가
This commit is contained in:
@ -12,16 +12,25 @@ if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
|
||||
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
|
||||
|
||||
$_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_head'], 0, 255));
|
||||
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
|
||||
|
||||
if ($file = $_POST['bo_include_head']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('상단 파일 경로가 php, html 파일이 아닙니다.');
|
||||
}
|
||||
$_POST['bo_include_head'] = $file;
|
||||
}
|
||||
|
||||
if ($file = $_POST['bo_include_tail']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('하단 파일 경로가 php, html 파일이 아닙니다.');
|
||||
}
|
||||
$_POST['bo_include_tail'] = $file;
|
||||
}
|
||||
|
||||
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
@ -180,6 +180,12 @@ if(!isset($config['cf_kakao_js_apikey'])) {
|
||||
ADD `cf_kakao_js_apikey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_googl_shorturl_apikey` ", true);
|
||||
}
|
||||
|
||||
// SMS 전송유형 필드 추가
|
||||
if(!isset($config['cf_sms_type'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_sms_type` varchar(10) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true);
|
||||
}
|
||||
|
||||
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
@ -1034,6 +1040,16 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_sms_type">SMS 전송유형</label></th>
|
||||
<td>
|
||||
<?php echo help("전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 1500바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다."); ?>
|
||||
<select id="cf_sms_type" name="cf_sms_type">
|
||||
<option value="" <?php echo get_selected($config['cf_sms_type'], ''); ?>>SMS</option>
|
||||
<option value="LMS" <?php echo get_selected($config['cf_sms_type'], 'LMS'); ?>>LMS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디</label></th>
|
||||
<td>
|
||||
@ -1069,7 +1085,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row">아이코드 SMS 신청<br>회원가입</th>
|
||||
<td>
|
||||
<?php echo help("아래 링크에서 회원가입 하시면 문자 건당 16원에 제공 받을 수 있습니다."); ?>
|
||||
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn_frmline">아이코드 회원가입</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -1081,12 +1096,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn_frmline" onclick="window.open(this.href,'icode_payment', 'scrollbars=1,resizable=1'); return false;">충전하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">건수별 금액</th>
|
||||
<td colspan="3">
|
||||
<?php echo number_format($userinfo['gpay']); ?> 원.
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -124,6 +124,7 @@ $sql = " update {$g5['config_table']}
|
||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||
cf_cert_req = '{$_POST['cf_cert_req']}',
|
||||
cf_sms_use = '{$_POST['cf_sms_use']}',
|
||||
cf_sms_type = '{$_POST['cf_sms_type']}',
|
||||
cf_icode_id = '{$_POST['cf_icode_id']}',
|
||||
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
||||
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
||||
|
||||
@ -758,4 +758,9 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
#grp_color li span{width:10px;height:10px; display:inline-block;background:rgb(75, 178, 197);margin-right:5px;}
|
||||
#grp_color li.color2 span{background:rgb(234, 162, 40);}
|
||||
#chart_wr h5{text-align:center;border:1px solid #eee;padding:30px 0}
|
||||
#chart_wr{margin:20px }
|
||||
#chart_wr{margin:20px }
|
||||
|
||||
/*전송실패 문자 재전송 내역*/
|
||||
.sms_table{padding:0 20px 40px;}
|
||||
.sms_table table th{border:1px solid #ddd;padding:9px 0}
|
||||
.sms_table table td{border:1px solid #ddd;text-align:center;width:16%;padding:9px 0}
|
||||
@ -91,7 +91,7 @@ $colspan = 12;
|
||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
if ($row['mb_leave_date'])
|
||||
|
||||
@ -31,6 +31,8 @@ else if ($w == 'u')
|
||||
$required_mb_password = '';
|
||||
$html_title = '수정';
|
||||
|
||||
$mb['mb_name'] = get_text($mb['mb_name']);
|
||||
$mb['mb_nick'] = get_text($mb['mb_nick']);
|
||||
$mb['mb_email'] = get_text($mb['mb_email']);
|
||||
$mb['mb_homepage'] = get_text($mb['mb_homepage']);
|
||||
$mb['mb_birth'] = get_text($mb['mb_birth']);
|
||||
@ -38,6 +40,7 @@ else if ($w == 'u')
|
||||
$mb['mb_hp'] = get_text($mb['mb_hp']);
|
||||
$mb['mb_addr1'] = get_text($mb['mb_addr1']);
|
||||
$mb['mb_addr2'] = get_text($mb['mb_addr2']);
|
||||
$mb['mb_addr3'] = get_text($mb['mb_addr3']);
|
||||
$mb['mb_signature'] = get_text($mb['mb_signature']);
|
||||
$mb['mb_recommend'] = get_text($mb['mb_recommend']);
|
||||
$mb['mb_profile'] = get_text($mb['mb_profile']);
|
||||
|
||||
@ -166,7 +166,7 @@ $colspan = 16;
|
||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', G5_SERVER_TIME);
|
||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', G5_SERVER_TIME);
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
$leave_msg = '';
|
||||
@ -211,7 +211,7 @@ $colspan = 16;
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td headers="mb_list_chk" class="td_chk" rowspan="2">
|
||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['mb_name']); ?> <?php echo $row['mb_nick']; ?>님</label>
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['mb_name']); ?> <?php echo get_text($row['mb_nick']); ?>님</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td headers="mb_list_id" rowspan="2" class="td_name sv_use"><?php echo $mb_id ?></td>
|
||||
|
||||
@ -73,7 +73,7 @@ $colspan = 7;
|
||||
}
|
||||
|
||||
$search = array('"', "'");
|
||||
$replace = array('"', ''');
|
||||
$replace = array('"', ''');
|
||||
$me_name = str_replace($search, $replace, $row['me_name']);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?> menu_list menu_group_<?php echo substr($row['me_code'], 0, 2); ?>">
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
define('G5_IS_ADMIN', true);
|
||||
include_once ('../../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
||||
|
||||
if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||
if(!mysql_num_rows(mysql_query(" show tables like '{$g5['sms5_config_table']}' ")))
|
||||
|
||||
@ -86,10 +86,6 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
<input type="button" value="충전하기" class="btn_frmline" onclick="window.open('http://icodekorea.com/company/credit_card_input.php?icode_id=<?php echo $config['cf_icode_id']?>&icode_passwd=<?php echo $config['cf_icode_pw']?>','icode_payment','width=650,height=500')">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">건별 금액</th>
|
||||
<td><?php echo number_format($userinfo['gpay'])?> 원</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_phone">회신번호<strong class="sound_only"> 필수</strong></label></th>
|
||||
|
||||
@ -39,7 +39,8 @@ 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))
|
||||
{
|
||||
$res['bk_hp'] = get_hp($res['bk_hp'], 0);
|
||||
$res['bk_hp'] = get_hp($res['hs_hp'], 0);
|
||||
$res['bk_name'] = $res['hs_name'];
|
||||
|
||||
if ($g5['sms5_demo'])
|
||||
$res['bk_hp'] = '0100000000';
|
||||
@ -48,6 +49,7 @@ while ($res = sql_fetch_array($sql))
|
||||
}
|
||||
|
||||
$wr_total = count($list);
|
||||
$reply = str_replace('-', '', trim($write['wr_reply']));
|
||||
|
||||
if ($config['cf_sms_use'] != 'icode') {
|
||||
alert('기본환경설정에서 icode sms 사용이 비활성화 되어 있습니다.');
|
||||
@ -55,79 +57,170 @@ if ($config['cf_sms_use'] != 'icode') {
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$SMS = new SMS5;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
|
||||
$reply = str_replace('-', '', trim($write['wr_reply']));
|
||||
if($config['cf_sms_type'] == 'LMS') {
|
||||
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||
|
||||
$result = $SMS->Add($list, $reply, '', '', $write['wr_message'], '', $wr_total);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$result = $SMS->Send();
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', wr_reply='".addslashes($write['wr_reply'])."', wr_message='".addslashes($write['wr_message'])."', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
|
||||
if($port_setting !== false) {
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
|
||||
|
||||
$wr_success = 0;
|
||||
$wr_failure = 0;
|
||||
$count = 0;
|
||||
|
||||
foreach ($SMS->Result as $result)
|
||||
{
|
||||
list($phone, $code) = explode(":", $result);
|
||||
for($i=0; $i<$wr_total; $i++) {
|
||||
$strDest = array();
|
||||
$strDest[] = $list[$i]['bk_hp'];
|
||||
$strCallBack = $reply;
|
||||
$strCaller = $config['cf_title'];
|
||||
$strSubject = '';
|
||||
$strURL = '';
|
||||
$strData = $write['wr_message'];
|
||||
if( !empty($list[$i]['bk_name']) ){
|
||||
$strData = str_replace("{이름}", $list[$i]['bk_name'], $strData);
|
||||
}
|
||||
$strDate = $booking;
|
||||
$nCount = 1;
|
||||
|
||||
if (substr($code,0,5) == "Error")
|
||||
{
|
||||
$hs_code = substr($code,6,2);
|
||||
$result = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
|
||||
|
||||
switch ($hs_code) {
|
||||
case '02': // "02:형식오류"
|
||||
$hs_memo = "형식이 잘못되어 전송이 실패하였습니다.";
|
||||
break;
|
||||
case '23': // "23:인증실패,데이터오류,전송날짜오류"
|
||||
$hs_memo = "데이터를 다시 확인해 주시기바랍니다.";
|
||||
break;
|
||||
case '97': // "97:잔여코인부족"
|
||||
$hs_memo = "잔여코인이 부족합니다.";
|
||||
break;
|
||||
case '98': // "98:사용기간만료"
|
||||
$hs_memo = "사용기간이 만료되었습니다.";
|
||||
break;
|
||||
case '99': // "99:인증실패"
|
||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하었습니다.";
|
||||
break;
|
||||
if($result) {
|
||||
$result = $SMS->Send();
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
foreach ($SMS->Result as $result)
|
||||
{
|
||||
list($phone, $code) = explode(":", $result);
|
||||
|
||||
if (substr($code,0,5) == "Error")
|
||||
{
|
||||
$hs_code = substr($code,6,2);
|
||||
|
||||
switch ($hs_code) {
|
||||
case '02': // "02:형식오류"
|
||||
$hs_memo = "형식이 잘못되어 전송이 실패하였습니다.";
|
||||
break;
|
||||
case '23': // "23:인증실패,데이터오류,전송날짜오류"
|
||||
$hs_memo = "데이터를 다시 확인해 주시기바랍니다.";
|
||||
break;
|
||||
case '97': // "97:잔여코인부족"
|
||||
$hs_memo = "잔여코인이 부족합니다.";
|
||||
break;
|
||||
case '98': // "98:사용기간만료"
|
||||
$hs_memo = "사용기간이 만료되었습니다.";
|
||||
break;
|
||||
case '99': // "99:인증실패"
|
||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하였습니다.";
|
||||
break;
|
||||
}
|
||||
$wr_failure++;
|
||||
$hs_flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hs_code = $code;
|
||||
$hs_memo = get_hp($phone, 1)."로 전송했습니다.";
|
||||
$wr_success++;
|
||||
$hs_flag = 1;
|
||||
}
|
||||
|
||||
$row = $list[$i];
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
$log = @iconv('euc-kr', 'utf-8', $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='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
||||
}
|
||||
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
}
|
||||
$wr_failure++;
|
||||
$hs_flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hs_code = $code;
|
||||
$hs_memo = get_hp($phone, 1)."로 전송했습니다.";
|
||||
$wr_success++;
|
||||
$hs_flag = 1;
|
||||
}
|
||||
|
||||
$row = array_shift($list);
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
$log = @iconv('euc-kr', 'utf-8', $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)."'", false);
|
||||
}
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
|
||||
sql_query("update {$g5['sms5_write_table']} set wr_success='$wr_success', wr_failure='$wr_failure' where wr_no='$wr_no' and wr_renum='$new_wr_renum'");
|
||||
sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', wr_reply='".addslashes($write['wr_reply'])."', wr_message='".addslashes($write['wr_message'])."', wr_success='$wr_success', wr_failure='$wr_failure', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
|
||||
|
||||
sql_query("update {$g5['sms5_write_table']} set wr_re_total=wr_re_total+1 where wr_no='$wr_no' and wr_renum=0");
|
||||
}
|
||||
else alert("에러: SMS 서버와 통신이 불안정합니다.");
|
||||
} else {
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
|
||||
$reply = str_replace('-', '', trim($write['wr_reply']));
|
||||
|
||||
$result = $SMS->Add($list, $reply, '', '', $write['wr_message'], '', $wr_total);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$result = $SMS->Send();
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', wr_reply='".addslashes($write['wr_reply'])."', wr_message='".addslashes($write['wr_message'])."', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
|
||||
|
||||
$wr_success = 0;
|
||||
$wr_failure = 0;
|
||||
$count = 0;
|
||||
|
||||
foreach ($SMS->Result as $result)
|
||||
{
|
||||
list($phone, $code) = explode(":", $result);
|
||||
|
||||
if (substr($code,0,5) == "Error")
|
||||
{
|
||||
$hs_code = substr($code,6,2);
|
||||
|
||||
switch ($hs_code) {
|
||||
case '02': // "02:형식오류"
|
||||
$hs_memo = "형식이 잘못되어 전송이 실패하였습니다.";
|
||||
break;
|
||||
case '23': // "23:인증실패,데이터오류,전송날짜오류"
|
||||
$hs_memo = "데이터를 다시 확인해 주시기바랍니다.";
|
||||
break;
|
||||
case '97': // "97:잔여코인부족"
|
||||
$hs_memo = "잔여코인이 부족합니다.";
|
||||
break;
|
||||
case '98': // "98:사용기간만료"
|
||||
$hs_memo = "사용기간이 만료되었습니다.";
|
||||
break;
|
||||
case '99': // "99:인증실패"
|
||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하었습니다.";
|
||||
break;
|
||||
}
|
||||
$wr_failure++;
|
||||
$hs_flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hs_code = $code;
|
||||
$hs_memo = get_hp($phone, 1)."로 전송했습니다.";
|
||||
$wr_success++;
|
||||
$hs_flag = 1;
|
||||
}
|
||||
|
||||
$row = array_shift($list);
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
$log = @iconv('euc-kr', 'utf-8', $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)."'", false);
|
||||
}
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
|
||||
sql_query("update {$g5['sms5_write_table']} set wr_success='$wr_success', wr_failure='$wr_failure' where wr_no='$wr_no' and wr_renum='$new_wr_renum'");
|
||||
sql_query("update {$g5['sms5_write_table']} set wr_re_total=wr_re_total+1 where wr_no='$wr_no' and wr_renum=0");
|
||||
}
|
||||
else alert("에러: SMS 서버와 통신이 불안정합니다.");
|
||||
}
|
||||
else alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다.");
|
||||
}
|
||||
else alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다.");
|
||||
|
||||
?>
|
||||
<script>
|
||||
|
||||
@ -98,6 +98,7 @@ function all_send()
|
||||
|
||||
<?php if ($write['wr_re_total'] && !$wr_renum) { ?>
|
||||
<h2>전송실패 문자 재전송 내역</h2>
|
||||
<div class="sms_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -138,6 +139,7 @@ function all_send()
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if( $write['wr_memo'] ){
|
||||
|
||||
@ -33,7 +33,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
<label for="wr_message" id="wr_message_lbl">내용</label>
|
||||
<textarea name="wr_message" id="wr_message" class="box_txt box_square" onkeyup="byte_check('wr_message', 'sms_bytes');" accesskey="m"></textarea>
|
||||
|
||||
<div id="sms_byte"><span id="sms_bytes">0</span> / 80 byte</div>
|
||||
<div id="sms_byte"><span id="sms_bytes">0</span> / <span id="sms_max_bytes"><?php echo ($config['cf_sms_type'] == 'LMS' ? 90 : 80); ?></span> byte</div>
|
||||
|
||||
<button type="button" id="write_sc_btn" class="write_scemo_btn">특수<br>기호</button>
|
||||
<div id="write_sc" class="write_scemo">
|
||||
@ -406,6 +406,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 i = 0;
|
||||
var cnt = 0;
|
||||
@ -424,6 +425,40 @@ function byte_check(wr_message, sms_bytes)
|
||||
|
||||
bytes.innerHTML = cnt;
|
||||
|
||||
<?php if($config['cf_sms_type'] == 'LMS') { ?>
|
||||
if(cnt > 90)
|
||||
max_bytes.innerHTML = 1500;
|
||||
else
|
||||
max_bytes.innerHTML = 90;
|
||||
|
||||
if (cnt > 1500)
|
||||
{
|
||||
exceed = cnt - 1500;
|
||||
alert('메시지 내용은 1500바이트를 넘을수 없습니다.\n\n작성하신 메세지 내용은 '+ exceed +'byte가 초과되었습니다.\n\n초과된 부분은 자동으로 삭제됩니다.');
|
||||
var tcnt = 0;
|
||||
var xcnt = 0;
|
||||
var tmp = conts.value;
|
||||
for (i=0; i<tmp.length; i++)
|
||||
{
|
||||
ch = tmp.charAt(i);
|
||||
if (escape(ch).length > 4) {
|
||||
tcnt += 2;
|
||||
} else {
|
||||
tcnt += 1;
|
||||
}
|
||||
|
||||
if (tcnt > 1500) {
|
||||
tmp = tmp.substring(0,i);
|
||||
break;
|
||||
} else {
|
||||
xcnt = tcnt;
|
||||
}
|
||||
}
|
||||
conts.value = tmp;
|
||||
bytes.innerHTML = xcnt;
|
||||
return;
|
||||
}
|
||||
<?php } else { ?>
|
||||
if (cnt > 80)
|
||||
{
|
||||
exceed = cnt - 80;
|
||||
@ -451,6 +486,7 @@ function byte_check(wr_message, sms_bytes)
|
||||
bytes.innerHTML = xcnt;
|
||||
return;
|
||||
}
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
@ -133,86 +133,180 @@ if ($config['cf_sms_use'] != 'icode') {
|
||||
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$SMS = new SMS5;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
|
||||
$reply = str_replace('-', '', trim($wr_reply));
|
||||
$wr_message = conv_unescape_nl($wr_message);
|
||||
|
||||
$result = $SMS->Add($list, $reply, '', '', $wr_message, $booking, $wr_total);
|
||||
$SMS = new SMS5;
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$result = $SMS->Send();
|
||||
if($config['cf_sms_type'] == 'LMS') {
|
||||
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
$row = sql_fetch("select max(wr_no) as wr_no from {$g5['sms5_write_table']}");
|
||||
if ($row)
|
||||
$wr_no = $row['wr_no'] + 1;
|
||||
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."'");
|
||||
if($port_setting !== false) {
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
|
||||
|
||||
$wr_success = 0;
|
||||
$wr_failure = 0;
|
||||
$count = 0;
|
||||
|
||||
foreach ($SMS->Result as $result)
|
||||
{
|
||||
list($phone, $code) = explode(":", $result);
|
||||
$row2 = sql_fetch("select max(wr_no) as wr_no from {$g5['sms5_write_table']}");
|
||||
if ($row2)
|
||||
$wr_no = $row2['wr_no'] + 1;
|
||||
else
|
||||
$wr_no = 1;
|
||||
|
||||
if (substr($code,0,5) == "Error")
|
||||
{
|
||||
$hs_code = substr($code,6,2);
|
||||
for($i=0; $i<$wr_total; $i++) {
|
||||
$strDest = array();
|
||||
$strDest[] = $list[$i]['bk_hp'];
|
||||
$strCallBack = $reply;
|
||||
$strCaller = $config['cf_title'];
|
||||
$strSubject = '';
|
||||
$strURL = '';
|
||||
$strData = $wr_message;
|
||||
if( !empty($list[$i]['bk_name']) ){
|
||||
$strData = str_replace("{이름}", $list[$i]['bk_name'], $strData);
|
||||
}
|
||||
$strDate = $booking;
|
||||
$nCount = 1;
|
||||
|
||||
switch ($hs_code) {
|
||||
case '02': // "02:형식오류"
|
||||
$hs_memo = "형식이 잘못되어 전송이 실패하였습니다.";
|
||||
break;
|
||||
case '23': // "23:인증실패,데이터오류,전송날짜오류"
|
||||
$hs_memo = "데이터를 다시 확인해 주시기바랍니다.";
|
||||
break;
|
||||
case '97': // "97:잔여코인부족"
|
||||
$hs_memo = "잔여코인이 부족합니다.";
|
||||
break;
|
||||
case '98': // "98:사용기간만료"
|
||||
$hs_memo = "사용기간이 만료되었습니다.";
|
||||
break;
|
||||
case '99': // "99:인증실패"
|
||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하였습니다.";
|
||||
break;
|
||||
$result = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
|
||||
|
||||
if($result) {
|
||||
$result = $SMS->Send();
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
foreach ($SMS->Result as $result)
|
||||
{
|
||||
list($phone, $code) = explode(":", $result);
|
||||
|
||||
if (substr($code,0,5) == "Error")
|
||||
{
|
||||
$hs_code = substr($code,6,2);
|
||||
|
||||
switch ($hs_code) {
|
||||
case '02': // "02:형식오류"
|
||||
$hs_memo = "형식이 잘못되어 전송이 실패하였습니다.";
|
||||
break;
|
||||
case '23': // "23:인증실패,데이터오류,전송날짜오류"
|
||||
$hs_memo = "데이터를 다시 확인해 주시기바랍니다.";
|
||||
break;
|
||||
case '97': // "97:잔여코인부족"
|
||||
$hs_memo = "잔여코인이 부족합니다.";
|
||||
break;
|
||||
case '98': // "98:사용기간만료"
|
||||
$hs_memo = "사용기간이 만료되었습니다.";
|
||||
break;
|
||||
case '99': // "99:인증실패"
|
||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하였습니다.";
|
||||
break;
|
||||
}
|
||||
$wr_failure++;
|
||||
$hs_flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hs_code = $code;
|
||||
$hs_memo = get_hp($phone, 1)."로 전송했습니다.";
|
||||
$wr_success++;
|
||||
$hs_flag = 1;
|
||||
}
|
||||
|
||||
$row = $list[$i];
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
$log = @iconv('euc-kr', 'utf-8', $log);
|
||||
|
||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
||||
}
|
||||
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
}
|
||||
$wr_failure++;
|
||||
$hs_flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hs_code = $code;
|
||||
$hs_memo = get_hp($phone, 1)."로 전송했습니다.";
|
||||
$wr_success++;
|
||||
$hs_flag = 1;
|
||||
}
|
||||
|
||||
$row = array_shift($list);
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
$log = @iconv('euc-kr', 'utf-8', $log);
|
||||
|
||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
||||
}
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
|
||||
sql_query("update {$g5['sms5_write_table']} set wr_success='$wr_success', wr_failure='$wr_failure', wr_memo='$str_serialize' where wr_no='$wr_no' and wr_renum=0");
|
||||
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."'");
|
||||
}
|
||||
else win_close_alert("에러: SMS 서버와 통신이 불안정합니다.");
|
||||
} else {
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$result = $SMS->Add($list, $reply, '', '', $wr_message, $booking, $wr_total);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$result = $SMS->Send();
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
$row = sql_fetch("select max(wr_no) as wr_no from {$g5['sms5_write_table']}");
|
||||
if ($row)
|
||||
$wr_no = $row['wr_no'] + 1;
|
||||
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."'");
|
||||
|
||||
$wr_success = 0;
|
||||
$wr_failure = 0;
|
||||
$count = 0;
|
||||
|
||||
foreach ($SMS->Result as $result)
|
||||
{
|
||||
list($phone, $code) = explode(":", $result);
|
||||
|
||||
if (substr($code,0,5) == "Error")
|
||||
{
|
||||
$hs_code = substr($code,6,2);
|
||||
|
||||
switch ($hs_code) {
|
||||
case '02': // "02:형식오류"
|
||||
$hs_memo = "형식이 잘못되어 전송이 실패하였습니다.";
|
||||
break;
|
||||
case '23': // "23:인증실패,데이터오류,전송날짜오류"
|
||||
$hs_memo = "데이터를 다시 확인해 주시기바랍니다.";
|
||||
break;
|
||||
case '97': // "97:잔여코인부족"
|
||||
$hs_memo = "잔여코인이 부족합니다.";
|
||||
break;
|
||||
case '98': // "98:사용기간만료"
|
||||
$hs_memo = "사용기간이 만료되었습니다.";
|
||||
break;
|
||||
case '99': // "99:인증실패"
|
||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하였습니다.";
|
||||
break;
|
||||
}
|
||||
$wr_failure++;
|
||||
$hs_flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hs_code = $code;
|
||||
$hs_memo = get_hp($phone, 1)."로 전송했습니다.";
|
||||
$wr_success++;
|
||||
$hs_flag = 1;
|
||||
}
|
||||
|
||||
$row = array_shift($list);
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
$log = @iconv('euc-kr', 'utf-8', $log);
|
||||
|
||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
||||
}
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
|
||||
sql_query("update {$g5['sms5_write_table']} set wr_success='$wr_success', wr_failure='$wr_failure', wr_memo='$str_serialize' where wr_no='$wr_no' and wr_renum=0");
|
||||
}
|
||||
else win_close_alert("에러: SMS 서버와 통신이 불안정합니다.");
|
||||
}
|
||||
else win_close_alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다.");
|
||||
}
|
||||
else win_close_alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다.");
|
||||
|
||||
function win_close_alert($msg) {
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "300100";
|
||||
$sub_menu = "100280";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if(!$is_admin)
|
||||
alert('접근 권한이 없습니다.', G5_URL);
|
||||
|
||||
// 4.11
|
||||
@include_once($board_skin_path.'/delete_all.head.skin.php');
|
||||
@ -13,13 +16,16 @@ if ($wr_id) // 건별삭제
|
||||
else // 일괄삭제
|
||||
$tmp_array = $_POST['chk_wr_id'];
|
||||
|
||||
$chk_count = count($tmp_array);
|
||||
|
||||
if($chk_count > (G5_IS_MOBILE ? $board['bo_mobile_page_rows'] : $board['bo_page_rows']))
|
||||
alert('올바른 방법으로 이용해 주십시오.');
|
||||
|
||||
// 사용자 코드 실행
|
||||
@include_once($board_skin_path.'/delete_all.skin.php');
|
||||
|
||||
|
||||
// 거꾸로 읽는 이유는 답변글부터 삭제가 되어야 하기 때문임
|
||||
for ($i=count($tmp_array)-1; $i>=0; $i--)
|
||||
for ($i=$chk_count-1; $i>=0; $i--)
|
||||
{
|
||||
$write = sql_fetch(" select * from $write_table where wr_id = '$tmp_array[$i]' ");
|
||||
|
||||
|
||||
@ -76,7 +76,8 @@ if (!get_session($ss_name))
|
||||
|
||||
$g5['title'] = '다운로드 > '.conv_subject($write['wr_subject'], 255);
|
||||
|
||||
$original = urlencode($file['bf_source']);
|
||||
//$original = urlencode($file['bf_source']);
|
||||
$original = iconv('utf-8', 'euc-kr', $file['bf_source']); // SIR 잉끼님 제안코드
|
||||
|
||||
@include_once($board_skin_path.'/download.tail.skin.php');
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="act" value="<?php echo $act ?>">
|
||||
<input type="hidden" name="url" value="<?php echo clean_xss_tags($_SERVER['HTTP_REFERER']); ?>">
|
||||
<input type="hidden" name="url" value="<?php echo get_text(clean_xss_tags($_SERVER['HTTP_REFERER'])); ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
|
||||
@ -17,7 +17,7 @@ if (!$mb['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id)
|
||||
$g5['title'] = $mb['mb_nick'].'님의 자기소개';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$mb_nick = get_sideview($mb['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['mb_homepage'], $mb['mb_open']);
|
||||
$mb_nick = get_sideview($mb['mb_id'], get_text($mb['mb_nick']), $mb['mb_email'], $mb['mb_homepage'], $mb['mb_open']);
|
||||
|
||||
// 회원가입후 몇일째인지? + 1 은 당일을 포함한다는 뜻
|
||||
$sql = " select (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS('{$mb['mb_datetime']}') + 1) as days ";
|
||||
|
||||
@ -57,8 +57,7 @@ if(is_file($skin_file)) {
|
||||
}
|
||||
|
||||
$is_dhtml_editor = false;
|
||||
// 모바일에서는 DHTML 에디터 사용불가
|
||||
if ($config['cf_editor'] && $qaconfig['qa_use_editor'] && !G5_IS_MOBILE) {
|
||||
if ($config['cf_editor'] && $qaconfig['qa_use_editor'] && (!is_mobile() || defined('G5_IS_MOBILE_DHTML_USE') && G5_IS_MOBILE_DHTML_USE)) {
|
||||
$is_dhtml_editor = true;
|
||||
}
|
||||
|
||||
|
||||
@ -300,33 +300,100 @@ if($w == '' || $w == 'a' || $w == 'r') {
|
||||
|
||||
// SMS 알림
|
||||
if($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) {
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
if($config['cf_sms_type'] == 'LMS') {
|
||||
include_once(G5_LIB_PATH.'/icode.lms.lib.php');
|
||||
|
||||
// 답변글은 질문 등록자에게 전송
|
||||
if($w == 'a' && $write['qa_sms_recv'] && trim($write['qa_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 답변이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_send_number']);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $write['qa_hp']);
|
||||
$port_setting = get_icode_port_type($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||
|
||||
if($recv_number) {
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
|
||||
$SMS->Send();
|
||||
// SMS 모듈 클래스 생성
|
||||
if($port_setting !== false) {
|
||||
// 답변글은 질문 등록자에게 전송
|
||||
if($w == 'a' && $write['qa_sms_recv'] && trim($write['qa_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 답변이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_send_number']);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $write['qa_hp']);
|
||||
|
||||
if($recv_number) {
|
||||
$strDest = array();
|
||||
$strDest[] = $recv_number;
|
||||
$strCallBack = $send_number;
|
||||
$strCaller = iconv_euckr(trim($config['cf_title']));
|
||||
$strSubject = '';
|
||||
$strURL = '';
|
||||
$strData = iconv_euckr($sms_content);
|
||||
$strDate = '';
|
||||
$nCount = count($strDest);
|
||||
|
||||
$SMS = new LMS;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
|
||||
$res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
|
||||
|
||||
if($res) {
|
||||
$SMS->Send();
|
||||
}
|
||||
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
}
|
||||
}
|
||||
|
||||
// 문의글 등록시 관리자에게 전송
|
||||
if(($w == '' || $w == 'r') && trim($qaconfig['qa_admin_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 문의글이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qa_hp);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_admin_hp']);
|
||||
|
||||
if($recv_number) {
|
||||
$strDest = array();
|
||||
$strDest[] = $recv_number;
|
||||
$strCallBack = $send_number;
|
||||
$strCaller = iconv_euckr(trim($config['cf_title']));;
|
||||
$strSubject = '';
|
||||
$strURL = '';
|
||||
$strData = iconv_euckr($sms_content);
|
||||
$strDate = '';
|
||||
$nCount = count($strDest);
|
||||
|
||||
$SMS = new LMS;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $port_setting);
|
||||
$res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
|
||||
|
||||
if($res) {
|
||||
$SMS->Send();
|
||||
}
|
||||
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
|
||||
// 문의글 등록시 관리자에게 전송
|
||||
if(($w == '' || $w == 'r') && trim($qaconfig['qa_admin_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 문의글이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qa_hp);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_admin_hp']);
|
||||
// 답변글은 질문 등록자에게 전송
|
||||
if($w == 'a' && $write['qa_sms_recv'] && trim($write['qa_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 답변이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_send_number']);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $write['qa_hp']);
|
||||
|
||||
if($recv_number) {
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
|
||||
$SMS->Send();
|
||||
if($recv_number) {
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
|
||||
$SMS->Send();
|
||||
}
|
||||
}
|
||||
|
||||
// 문의글 등록시 관리자에게 전송
|
||||
if(($w == '' || $w == 'r') && trim($qaconfig['qa_admin_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 문의글이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qa_hp);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_admin_hp']);
|
||||
|
||||
if($recv_number) {
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
|
||||
$SMS->Send();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,9 @@ if ($w == "") {
|
||||
alert('개인정보처리방침안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.', G5_BBS_URL.'/register.php');
|
||||
}
|
||||
|
||||
$agree = preg_replace('#[^0-9]#', '', $_POST['agree']);
|
||||
$agree2 = preg_replace('#[^0-9]#', '', $_POST['agree2']);
|
||||
|
||||
$member['mb_birth'] = '';
|
||||
$member['mb_sex'] = '';
|
||||
$member['mb_name'] = '';
|
||||
|
||||
@ -390,9 +390,17 @@ if ($is_guest) {
|
||||
}
|
||||
|
||||
$is_dhtml_editor = false;
|
||||
// 모바일에서는 DHTML 에디터 사용불가
|
||||
if ($config['cf_editor'] && !G5_IS_MOBILE && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
|
||||
$is_dhtml_editor_use = false;
|
||||
$editor_content_js = '';
|
||||
if(!is_mobile() || defined('G5_IS_MOBILE_DHTML_USE') && G5_IS_MOBILE_DHTML_USE)
|
||||
$is_dhtml_editor_use = true;
|
||||
|
||||
// 모바일에서는 G5_IS_MOBILE_DHTML_USE 설정에 따라 DHTML 에디터 적용
|
||||
if ($config['cf_editor'] && $is_dhtml_editor_use && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
|
||||
$is_dhtml_editor = true;
|
||||
|
||||
if(is_file(G5_EDITOR_PATH.'/'.$config['cf_editor'].'/autosave.editor.js'))
|
||||
$editor_content_js = '<script src="'.G5_EDITOR_URL.'/'.$config['cf_editor'].'/autosave.editor.js"></script>'.PHP_EOL;
|
||||
}
|
||||
$editor_html = editor_html('wr_content', $content, $is_dhtml_editor);
|
||||
$editor_js = '';
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
********************/
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.1.1');
|
||||
define('G5_GNUBOARD_VER', '5.1.2');
|
||||
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
@ -192,6 +192,9 @@ define('G5_THUMB_JPG_QUALITY', 90);
|
||||
// 썸네일 png Compress 설정
|
||||
define('G5_THUMB_PNG_COMPRESS', 5);
|
||||
|
||||
// 모바일 기기에서 DHTML 에디터 사용여부를 설정합니다.
|
||||
define('G5_IS_MOBILE_DHTML_USE', false);
|
||||
|
||||
// ip 숨김방법 설정
|
||||
/* 123.456.789.012 ip의 숨김 방법을 변경하는 방법은
|
||||
\\1 은 123, \\2는 456, \\3은 789, \\4는 012에 각각 대응되므로
|
||||
|
||||
@ -49,9 +49,5 @@ if (!empty($config['cf_sms_use'])) {
|
||||
// 아이코드에 실제로 보내지 않고 가상(Random)으로 전송결과를 저장합니다.
|
||||
$g5['sms5_demo_send'] = true;
|
||||
}
|
||||
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
||||
|
||||
}
|
||||
?>
|
||||
@ -100,7 +100,7 @@ if ($is_member) { // 회원이라면 로그인 중이라는 메세지를 출력
|
||||
else if ($is_admin == 'group') $sr_admin_msg = "그룹관리자 ";
|
||||
else if ($is_admin == 'board') $sr_admin_msg = "게시판관리자 ";
|
||||
|
||||
echo '<div id="hd_login_msg">'.$sr_admin_msg.$member['mb_nick'].'님 로그인 중 ';
|
||||
echo '<div id="hd_login_msg">'.$sr_admin_msg.get_text($member['mb_nick']).'님 로그인 중 ';
|
||||
echo '<a href="'.G5_BBS_URL.'/logout.php">로그아웃</a></div>';
|
||||
}
|
||||
?>
|
||||
@ -285,8 +285,9 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
|
||||
`cf_cert_limit` int(11) NOT NULL DEFAULT '0',
|
||||
`cf_cert_req` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`cf_sms_use` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_sms_type` varchar(10) NOT NULL DEFAULT '',
|
||||
`cf_icode_id` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_pw` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_pw` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_server_ip` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_server_port` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_googl_shorturl_apikey` varchar(255) NOT NULL DEFAULT '',
|
||||
|
||||
@ -7,13 +7,18 @@ var save_wr_content = null;
|
||||
|
||||
function autosave() {
|
||||
$("form#fwrite").each(function() {
|
||||
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
|
||||
this.wr_content.value = CKEDITOR.instances.wr_content.getData();
|
||||
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
|
||||
this.wr_content.value = ed_wr_content.outputBodyHTML();
|
||||
} else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors)!="undefined" && typeof(oEditors.getById['wr_content'])!="undefined" ) {
|
||||
this.wr_content.value = oEditors.getById['wr_content'].getIR();
|
||||
if(g5_editor != "") {
|
||||
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
|
||||
this.wr_content.value = CKEDITOR.instances.wr_content.getData();
|
||||
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
|
||||
this.wr_content.value = ed_wr_content.outputBodyHTML();
|
||||
} else {
|
||||
if(typeof get_editor_wr_content == "function") {
|
||||
this.wr_content.value = get_editor_wr_content();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 변수에 저장해 놓은 값과 다를 경우에만 임시 저장함
|
||||
if (save_wr_subject != this.wr_subject.value || save_wr_content != this.wr_content.value) {
|
||||
$.ajax({
|
||||
@ -78,14 +83,16 @@ $(function(){
|
||||
var subject = $(data).find("item").find("subject").text();
|
||||
var content = $(data).find("item").find("content").text();
|
||||
$("#wr_subject").val(subject);
|
||||
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
|
||||
CKEDITOR.instances.wr_content.setData(content);
|
||||
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
|
||||
ed_wr_content.putContents(content);
|
||||
} else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors)!="undefined" && typeof(oEditors.getById['wr_content'])!="undefined" ) {
|
||||
oEditors.getById["wr_content"].exec("SET_CONTENTS", [""]);
|
||||
//oEditors.getById["wr_content"].exec("SET_IR", [""]);
|
||||
oEditors.getById["wr_content"].exec("PASTE_HTML", [content]);
|
||||
if(g5_editor != "") {
|
||||
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
|
||||
CKEDITOR.instances.wr_content.setData(content);
|
||||
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
|
||||
ed_wr_content.putContents(content);
|
||||
} else {
|
||||
if(typeof put_editor_wr_content == "function") {
|
||||
put_editor_wr_content(content);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$("#fwrite #wr_content").val(content);
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ function get_list($write_row, $board, $skin_url, $subject_len=40)
|
||||
else
|
||||
$list['last2'] = substr($list['last2'],5,5);
|
||||
|
||||
$list['wr_homepage'] = get_text(addslashes($list['wr_homepage']));
|
||||
$list['wr_homepage'] = get_text($list['wr_homepage']);
|
||||
|
||||
$tmp_name = get_text(cut_str($list['wr_name'], $config['cf_cut_name'])); // 설정된 자리수 만큼만 이름 출력
|
||||
if ($board['bo_use_sideview'])
|
||||
@ -1201,11 +1201,6 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
$email = base64_encode($email);
|
||||
$homepage = set_http(clean_xss_tags($homepage));
|
||||
|
||||
$name = preg_replace("/\'/", "", $name);
|
||||
$name = preg_replace("/\'/", "", $name);
|
||||
$name = preg_replace("/\"/", """, $name);
|
||||
$title_name = $name;
|
||||
|
||||
$tmp_name = "";
|
||||
if ($mb_id) {
|
||||
//$tmp_name = "<a href=\"".G5_BBS_URL."/profile.php?mb_id=".$mb_id."\" class=\"sv_member\" title=\"$name 자기소개\" target=\"_blank\" onclick=\"return false;\">$name</a>";
|
||||
@ -1367,10 +1362,16 @@ function cut_str($str, $len, $suffix="…")
|
||||
// TEXT 형식으로 변환
|
||||
function get_text($str, $html=0)
|
||||
{
|
||||
/* 3.22 막음 (HTML 체크 줄바꿈시 출력 오류때문)
|
||||
$source[] = "/ /";
|
||||
$target[] = " ";
|
||||
*/
|
||||
$source[] = "<";
|
||||
$target[] = "<";
|
||||
$source[] = ">";
|
||||
$target[] = ">";
|
||||
$source[] = "\"";
|
||||
$target[] = """;
|
||||
$source[] = "\'";
|
||||
$target[] = "'";
|
||||
|
||||
$str = str_replace($target, $source, $str);
|
||||
|
||||
// 3.31
|
||||
// TEXT 출력일 경우 & 등의 코드를 정상으로 출력해 주기 위함
|
||||
@ -1378,21 +1379,12 @@ function get_text($str, $html=0)
|
||||
$str = html_symbol($str);
|
||||
}
|
||||
|
||||
$source[] = "/</";
|
||||
$target[] = "<";
|
||||
$source[] = "/>/";
|
||||
$target[] = ">";
|
||||
//$source[] = "/\"/";
|
||||
//$target[] = """;
|
||||
$source[] = "/\'/";
|
||||
$target[] = "'";
|
||||
//$source[] = "/}/"; $target[] = "}";
|
||||
if ($html) {
|
||||
$source[] = "/\n/";
|
||||
$source[] = "\n";
|
||||
$target[] = "<br/>";
|
||||
}
|
||||
|
||||
return preg_replace($source, $target, $str);
|
||||
return str_replace($source, $target, $str);
|
||||
}
|
||||
|
||||
|
||||
@ -2723,11 +2715,6 @@ function clean_xss_tags($str)
|
||||
{
|
||||
$str = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $str);
|
||||
|
||||
$search = array('"', "'");
|
||||
$replace = array('"', ''');
|
||||
|
||||
$str = str_replace($search, $replace, $str);
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
249
lib/icode.lms.lib.php
Normal file
249
lib/icode.lms.lib.php
Normal file
@ -0,0 +1,249 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
// 요금제에 따른 port 구분
|
||||
function get_icode_port_type($id, $pw)
|
||||
{
|
||||
$userinfo = get_icode_userinfo($id, $pw);
|
||||
|
||||
if($userinfo['payment'] == 'A') { // 충전제
|
||||
return 1;
|
||||
} else if($userinfo['payment'] == 'C') { // 정액제
|
||||
return 1;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* SMS 발송을 관장하는 메인 클래스이다.
|
||||
*
|
||||
* 접속, 발송, URL발송, 결과등의 실질적으로 쓰이는 모든 부분이 포함되어 있다.
|
||||
*/
|
||||
class LMS {
|
||||
var $icode_id;
|
||||
var $icode_pw;
|
||||
var $socket_host;
|
||||
var $socket_port;
|
||||
var $socket_portcode;
|
||||
var $Data = array();
|
||||
var $Result = array();
|
||||
|
||||
// SMS 서버 접속
|
||||
function SMS_con($host, $id, $pw, $portcode) {
|
||||
$this->socket_host = $host;
|
||||
$this->socket_portcode = $portcode;
|
||||
$this->icode_id = FillSpace($id, 10);
|
||||
$this->icode_pw = FillSpace($pw, 10);
|
||||
}
|
||||
|
||||
function Init() {
|
||||
$this->Data = ""; // 발송하기 위한 패킷내용이 배열로 들어간다.
|
||||
$this->Result = ""; // 발송결과값이 배열로 들어간다.
|
||||
}
|
||||
|
||||
function Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate="", $nCount) {
|
||||
|
||||
// 문자 타입별 Port 설정.
|
||||
$sendType = strlen($strData) > 90 ? 1 : 0; // 0: SMS / 1: LMS
|
||||
|
||||
/* 개발 완료 후 아래 포트를 rand 함수를 이용하는 라인으로 변경 바랍니다.*/
|
||||
|
||||
// 충전식
|
||||
if ($this->socket_portcode == 1) {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8200; // LMS
|
||||
$this->socket_port=(int)rand(8200,8201); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6295; // SMS
|
||||
$this->socket_port=(int)rand(6295,6297); // SMS
|
||||
}
|
||||
}
|
||||
// 정액제
|
||||
else {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8300; // LMS
|
||||
$this->socket_port=(int)rand(8300,8301); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6291; // SMS
|
||||
$this->socket_port=(int)rand(6291,6293); // SMS
|
||||
}
|
||||
}
|
||||
|
||||
$strCallBack = FillSpace($strCallBack, 11); // 회신번호
|
||||
$strDate = FillSpace($strDate, 12); // 즉시(12byte 공백), 예약전송(YmdHi)
|
||||
|
||||
if ($sendType && $sendType == 1) {
|
||||
|
||||
/** LMS 제목 **/
|
||||
/*
|
||||
제목필드의 값이 없을 경우 단말기 기종및 설정에 따라 표기 방법이 다름
|
||||
1.설정에서 제목필드보기 설정 Disable -> 제목필드값을 넣어도 미표기
|
||||
2.설정에서 제목필드보기 설정 Enable -> 제목을 넣지 않을 경우 제목없음으로 자동표시
|
||||
|
||||
제목의 첫글자에 "<",">", 개행문자가 있을경우 단말기종류 및 통신사에 따라 메세지 전송실패 -> 글자를 체크하거나 취환처리요망
|
||||
*/
|
||||
$strSubject = str_replace("\r\n", " ", $strSubject);
|
||||
$strSubject = str_replace("<", "[", $strSubject);
|
||||
$strSubject = str_replace(">", "]", $strSubject);
|
||||
|
||||
$strSubject = FillSpace($strSubject,30);
|
||||
$strData = FillSpace(CutChar($strData,1500),1500);
|
||||
} else if (!$strURL) {
|
||||
$strData = FillSpace(CutChar($strData,90),90);
|
||||
$strCaller = FillSpace($strCaller,10);
|
||||
} else {
|
||||
$strURL = FillSpace($strURL,50);
|
||||
}
|
||||
|
||||
$Error = CheckCommonTypeDest($strDest, $nCount);
|
||||
$Error = is_vaild_callback($strCallBack);
|
||||
$Error = CheckCommonTypeDate($strDate);
|
||||
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
|
||||
$strDest[$i] = FillSpace($strDest[$i],11);
|
||||
if ($sendType && $sendType == 1) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strSubject.$strDate.$strData;
|
||||
} else if (!$strURL) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strData = FillSpace(CheckCallCenter($strURL, $strDest[$i], $strData),80);
|
||||
$this->Data[$i] = '05173 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function Send() {
|
||||
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,30); }
|
||||
$dest = substr($puts,26,11);
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
|
||||
fclose($fsocket);
|
||||
$this->Data = "";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 원하는 문자열의 길이를 원하는 길이만큼 공백을 넣어 맞추도록 합니다.
|
||||
*
|
||||
* @param text 원하는 문자열입니다.
|
||||
* size 원하는 길이입니다.
|
||||
* @return 변경된 문자열을 넘깁니다.
|
||||
*/
|
||||
function FillSpace($text,$size) {
|
||||
for ($i=0; $i<$size; $i++) $text.= " ";
|
||||
$text = substr($text,0,$size);
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* 원하는 문자열을 원하는 길에 맞는지 확인해서 조정하는 기능을 합니다.
|
||||
*
|
||||
* @param word 원하는 문자열입니다.
|
||||
* cut 원하는 길이입니다.
|
||||
* @return 변경된 문자열입니다.
|
||||
*/
|
||||
function CutChar($word, $cut) {
|
||||
$word=substr($word,0,$cut); // 필요한 길이만큼 취함.
|
||||
for ($k = $cut-1; $k > 1; $k--) {
|
||||
if (ord(substr($word,$k,1))<128) break; // 한글값은 160 이상.
|
||||
}
|
||||
$word = substr($word, 0, $cut-($cut-$k+1)%2);
|
||||
return $word;
|
||||
}
|
||||
|
||||
/**
|
||||
* 수신번호의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param strDest 발송번호 배열입니다.
|
||||
* nCount 배열의 크기입니다.
|
||||
* @return 처리결과입니다.
|
||||
*/
|
||||
function CheckCommonTypeDest($strDest, $nCount) {
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$strDest[$i] = preg_replace("/[^0-9]/","",$strDest[$i]);
|
||||
if(!preg_match("/^01[0-9]{8,9}$/", $strDest[$i]))
|
||||
return "수신번호오류";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 회신번호 유효성 여부조회 *
|
||||
* @param string callback 회신번호
|
||||
* @return 처리결과입니다
|
||||
* 한국인터넷진흥원 권고
|
||||
*/
|
||||
function is_vaild_callback($callback){
|
||||
|
||||
$_callback = preg_replace('/[^0-9]/', '', $callback);
|
||||
|
||||
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 "회신번호오류";
|
||||
}
|
||||
|
||||
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 "회신번호오류";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 예약날짜의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param string strDate (예약시간)
|
||||
* @return 처리결과입니다
|
||||
*/
|
||||
function CheckCommonTypeDate($strDate) {
|
||||
$strDate = preg_replace("/[^0-9]/", "", $strDate);
|
||||
if ($strDate){
|
||||
if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($rsvTime,0,4)))
|
||||
return "예약날짜오류";
|
||||
if (substr($strDate,8,2)>23 || substr($strDate,10,2)>59) return false;
|
||||
return "예약날짜오류";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* URL콜백용으로 메세지 크기를 수정합니다.
|
||||
*
|
||||
* @param url URL 내용입니다.
|
||||
* msg 결과메시지입니다.
|
||||
* desk 문자내용입니다.
|
||||
*/
|
||||
function CheckCallCenter($url, $dest, $data) {
|
||||
switch (substr($dest,0,3)) {
|
||||
case '010': //20바이트
|
||||
return CutChar($data,20); break;
|
||||
case '011': //80바이트
|
||||
return CutChar($data,80); break;
|
||||
case '016': // 80바이트
|
||||
return CutChar($data,80); break;
|
||||
case '017': // URL 포함 80바이트
|
||||
return CutChar($data,80 - strlen($url)); break;
|
||||
case '018': // 20바이트
|
||||
return CutChar($data,20); break;
|
||||
case '019': // 20바이트
|
||||
return CutChar($data,20); break;
|
||||
default:
|
||||
return CutChar($data,80); break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -7,7 +7,7 @@ function outlogin($skin_dir='basic')
|
||||
global $config, $member, $g5, $urlencode, $is_admin, $is_member;
|
||||
|
||||
if (array_key_exists('mb_nick', $member)) {
|
||||
$nick = cut_str($member['mb_nick'], $config['cf_cut_name']);
|
||||
$nick = get_text(cut_str($member['mb_nick'], $config['cf_cut_name']));
|
||||
}
|
||||
if (array_key_exists('mb_point', $member)) {
|
||||
$point = number_format($member['mb_point']);
|
||||
|
||||
@ -17,7 +17,7 @@ function popular($skin_dir='basic', $pop_cnt=7, $date_cnt=3)
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$list[$i] = $row;
|
||||
// 스크립트등의 실행금지
|
||||
$list[$i]['pp_word'] = get_text($list[$i]['pp_word']);
|
||||
//$list[$i]['pp_word'] = get_text($list[$i]['pp_word']);
|
||||
}
|
||||
|
||||
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||
|
||||
@ -193,8 +193,7 @@ function html_auto_br(obj)
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
@ -243,7 +242,7 @@ function fwrite_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
|
||||
@ -192,8 +192,7 @@ function html_auto_br(obj)
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
@ -242,7 +241,7 @@ function fwrite_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="attach" value="2">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php if ($is_member) { // 회원이면 ?>
|
||||
<input type="hidden" name="fnick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="fnick" value="<?php echo get_text($member['mb_nick']); ?>">
|
||||
<input type="hidden" name="fmail" value="<?php echo $member['mb_email'] ?>">
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -20,8 +20,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="cert_no" value="">
|
||||
<?php if (isset($member['mb_sex'])) { ?><input type="hidden" name="mb_sex" value="<?php echo $member['mb_sex'] ?>"><?php } ?>
|
||||
<?php if (isset($member['mb_nick_date']) && $member['mb_nick_date'] > date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400))) { // 닉네임수정일이 지나지 않았다면 ?>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<?php } ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
@ -55,7 +55,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_cert_use']) { ?>
|
||||
<span class="frm_info">아이핀 본인확인 후에는 이름이 자동 입력되고 휴대폰 본인확인 후에는 이름과 휴대폰번호가 자동 입력되어 수동으로 입력할수 없게 됩니다.</span>
|
||||
<?php } ?>
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo $member['mb_name'] ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>">
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo get_text($member['mb_name']) ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>">
|
||||
<?php
|
||||
if($config['cf_cert_use']) {
|
||||
if($config['cf_cert_ipin'])
|
||||
@ -87,8 +87,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
공백없이 한글,영문,숫자만 입력 가능 (한글2자, 영문4자 이상)<br>
|
||||
닉네임을 바꾸시면 앞으로 <?php echo (int)$config['cf_nick_modify'] ?>일 이내에는 변경 할 수 없습니다.
|
||||
</span>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>" id="reg_mb_nick" required class="frm_input required nospace" maxlength="20">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>" id="reg_mb_nick" required class="frm_input required nospace" maxlength="20">
|
||||
<span id="msg_mb_nick"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -111,14 +111,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_use_homepage']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_homepage">홈페이지<?php if ($config['cf_req_homepage']){ ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="url" name="mb_homepage" value="<?php echo $member['mb_homepage'] ?>" id="reg_mb_homepage" class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" maxlength="255" <?php echo $config['cf_req_homepage']?"required":""; ?>></td>
|
||||
<td><input type="url" name="mb_homepage" value="<?php echo get_text($member['mb_homepage']) ?>" id="reg_mb_homepage" class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" maxlength="255" <?php echo $config['cf_req_homepage']?"required":""; ?>></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_tel']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_tel">전화번호<?php if ($config['cf_req_tel']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo $member['mb_tel'] ?>" id="reg_mb_tel" class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?>></td>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?>></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -126,9 +126,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_hp" value="<?php echo $member['mb_hp'] ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<input type="text" name="mb_hp" value="<?php echo get_text($member['mb_hp']) ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<?php if ($config['cf_cert_use'] && $config['cf_cert_hp']) { ?>
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo $member['mb_hp'] ?>">
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo get_text($member['mb_hp']) ?>">
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -145,13 +145,13 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="text" name="mb_zip" value="<?php echo $member['mb_zip1'].$member['mb_zip2']; ?>" id="reg_mb_zip" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input <?php echo $config['cf_req_addr']?"required":""; ?>" size="5" maxlength="6">
|
||||
<button type="button" class="btn_frmline" onclick="win_zip('fregisterform', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
||||
<label for="reg_mb_addr1" class="sound_only">주소<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
||||
<input type="text" name="mb_addr1" value="<?php echo $member['mb_addr1'] ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50"><br>
|
||||
<input type="text" name="mb_addr1" value="<?php echo get_text($member['mb_addr1']) ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50"><br>
|
||||
<label for="reg_mb_addr2" class="sound_only">상세주소</label>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $member['mb_addr2'] ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<input type="text" name="mb_addr2" value="<?php echo get_text($member['mb_addr2']) ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<br>
|
||||
<label for="reg_mb_addr3" class="sound_only">참고항목</label>
|
||||
<input type="text" name="mb_addr3" value="<?php echo $member['mb_addr3'] ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $member['mb_addr_jibeon']; ?>">
|
||||
<input type="text" name="mb_addr3" value="<?php echo get_text($member['mb_addr3']) ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo get_text($member['mb_addr_jibeon']); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -10,7 +10,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$popular_skin_url.'/style.css">',
|
||||
<h2>인기검색어</h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo $list[$i]['pp_word'] ?></a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -53,7 +53,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_email">이메일</label></th>
|
||||
<td>
|
||||
<input type="email" name="qa_email" value="<?php echo $write['qa_email']; ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" maxlength="100">
|
||||
<input type="email" name="qa_email" value="<?php echo get_text($write['qa_email']); ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" maxlength="100">
|
||||
<input type="checkbox" name="qa_email_recv" value="1" id="qa_email_recv" <?php if($write['qa_email_recv']) echo 'checked="checked"'; ?>>
|
||||
<label for="qa_email_recv">답변받기</label>
|
||||
</td>
|
||||
@ -64,7 +64,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_hp">휴대폰</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_hp" value="<?php echo $write['qa_hp']; ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<input type="text" name="qa_hp" value="<?php echo get_text($write['qa_hp']); ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<?php if($qaconfig['qa_use_sms']) { ?>
|
||||
<input type="checkbox" name="qa_sms_recv" value="1" <?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?>> 답변등록 SMS알림 수신
|
||||
<?php } ?>
|
||||
@ -75,7 +75,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_subject" value="<?php echo $write['qa_subject']; ?>" id="qa_subject" required class="frm_input required" maxlength="255">
|
||||
<input type="text" name="qa_subject" value="<?php echo get_text($write['qa_subject']); ?>" id="qa_subject" required class="frm_input required" maxlength="255">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
13
plugin/editor/smarteditor2/autosave.editor.js
Normal file
13
plugin/editor/smarteditor2/autosave.editor.js
Normal file
@ -0,0 +1,13 @@
|
||||
function get_editor_wr_content()
|
||||
{
|
||||
return oEditors.getById['wr_content'].getIR();;
|
||||
}
|
||||
|
||||
function put_editor_wr_content(content)
|
||||
{
|
||||
oEditors.getById["wr_content"].exec("SET_CONTENTS", [""]);
|
||||
//oEditors.getById["wr_content"].exec("SET_IR", [""]);
|
||||
oEditors.getById["wr_content"].exec("PASTE_HTML", [content]);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -29,9 +29,9 @@ if($config['cf_cert_use'] == 2) {
|
||||
} else {
|
||||
// 테스트일 경우
|
||||
$cpCode = 'P00000000000';
|
||||
$idpUrl = 'https://tipin.ok-name.co.kr:8443/tis/ti/POTI90B_SendCertInfo.jsp';
|
||||
$idpUrl = 'https://tmpin.ok-name.co.kr:5443/tis/ti/POTI90B_SendCertInfo.jsp';
|
||||
$EndPointURL = 'http://twww.ok-name.co.kr:8888/KcbWebService/OkNameService'; //EndPointURL, 테스트 서버
|
||||
$kcbForm_action = 'https://tipin.ok-name.co.kr:8443/tis/ti/POTI01A_LoginRP.jsp';
|
||||
$kcbForm_action = 'https://tmpin.ok-name.co.kr:5443/tis/ti/POTI01A_LoginRP.jsp';
|
||||
}
|
||||
|
||||
$idpCode = 'V';
|
||||
|
||||
@ -26,7 +26,7 @@ function sms5_sub_paging($write_pages, $cur_page, $total_page, $url, $add="", $s
|
||||
if( $starget ){
|
||||
$url = preg_replace('#&'.$starget.'=[0-9]*#', '', $url) . '&'.$starget.'=';
|
||||
}
|
||||
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="pg_page pg_start">처음</a>'.PHP_EOL;
|
||||
@ -154,180 +154,331 @@ if ( ! function_exists('is_ie')) {
|
||||
* 접속, 발송, URL발송, 결과등의 실질적으로 쓰이는 모든 부분이 포함되어 있다.
|
||||
*/
|
||||
|
||||
class SMS5 extends SMS {
|
||||
var $Log = array();
|
||||
if($config['cf_sms_type'] == 'LMS') {
|
||||
include_once(G5_LIB_PATH.'/icode.lms.lib.php');
|
||||
|
||||
function SMS_con($sms_server,$sms_id,$sms_pw,$port) {
|
||||
$this->ID=$sms_id; // 계약 후 지정
|
||||
$this->PWD=$sms_pw; // 계약 후 지정
|
||||
$this->SMS_Server=$sms_server;
|
||||
$this->SMS_Port=$port;
|
||||
$this->ID = spacing($this->ID,10);
|
||||
$this->PWD = spacing($this->PWD,10);
|
||||
}
|
||||
class SMS5 extends LMS {
|
||||
var $icode_id;
|
||||
var $icode_pw;
|
||||
var $socket_host;
|
||||
var $socket_port;
|
||||
var $socket_portcode;
|
||||
var $send_type;
|
||||
var $Data = array();
|
||||
var $Result = array();
|
||||
var $Log = array();
|
||||
|
||||
/**
|
||||
* 발송번호의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param strDest 발송번호 배열입니다.
|
||||
* nCount 배열의 크기입니다.
|
||||
* @return 처리결과입니다.
|
||||
*/
|
||||
function CheckCommonTypeDest($strDest, $nCount) {
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$hp_number = preg_replace("/[^0-9]/","",$strDest[$i]['bk_hp']);
|
||||
if (strlen($hp_number)<10 || strlen($hp_number)>11) return "휴대폰 번호가 틀렸습니다";
|
||||
|
||||
$CID=substr($hp_number,0,3);
|
||||
if ( preg_match("/[^0-9]/",$CID) || ($CID!='010' && $CID!='011' && $CID!='016' && $CID!='017' && $CID!='018' && $CID!='019') ) return "휴대폰 앞자리 번호가 잘못되었습니다";
|
||||
// SMS 서버 접속
|
||||
function SMS_con($host, $id, $pw, $portcode) {
|
||||
$this->socket_host = $host;
|
||||
$this->socket_portcode = $portcode;
|
||||
$this->icode_id = FillSpace($id, 10);
|
||||
$this->icode_pw = FillSpace($pw, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 회신번호의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param strDest 회신번호입니다.
|
||||
* @return 처리결과입니다.
|
||||
*/
|
||||
function CheckCommonTypeCallBack($strCallBack) {
|
||||
if (preg_match("/[^0-9]/", $strCallBack)) return "회신 전화번호가 잘못되었습니다";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 예약날짜의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param text 원하는 문자열입니다.
|
||||
* size 원하는 길이입니다.
|
||||
* @return 처리결과입니다.
|
||||
*/
|
||||
function CheckCommonTypeDate($strDate) {
|
||||
$strDate=preg_replace("/[^0-9]/","",$strDate);
|
||||
if ($strDate) {
|
||||
if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($rsvTime,0,4))) return "예약날짜가 잘못되었습니다";
|
||||
if (substr($strDate,8,2)>23 || substr($strDate,10,2)>59) return "예약시간이 잘못되었습니다";
|
||||
function Init() {
|
||||
$this->Data = ""; // 발송하기 위한 패킷내용이 배열로 들어간다.
|
||||
$this->Result = ""; // 발송결과값이 배열로 들어간다.
|
||||
}
|
||||
}
|
||||
|
||||
function Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate="", $nCount) {
|
||||
// EUC-KR로 변환
|
||||
$strCaller = iconv_euckr($strCaller);
|
||||
$strSubject = iconv_euckr($strSubject);
|
||||
$strData = iconv_euckr($strData);
|
||||
|
||||
/**
|
||||
* URL콜백용으로 메세지 크기를 수정합니다.
|
||||
*
|
||||
* @param url URL 내용입니다.
|
||||
* msg 결과메시지입니다.
|
||||
* desk 문자내용입니다.
|
||||
*/
|
||||
function CheckCallCenter($url, $dest, $data) {
|
||||
switch (substr($dest,0,3)) {
|
||||
case '010': //20바이트
|
||||
return cut_char($data,20);
|
||||
break;
|
||||
case '011': //80바이트
|
||||
return cut_char($data,80);
|
||||
break;
|
||||
case '016': // 80바이트
|
||||
return cut_char($data,80);
|
||||
break;
|
||||
case '017': // URL 포함 80바이트
|
||||
return cut_char($data,80 - strlen($url));
|
||||
break;
|
||||
case '018': // 20바이트
|
||||
return cut_char($data,20);
|
||||
break;
|
||||
case '019': // 20바이트
|
||||
return cut_char($data,20);
|
||||
break;
|
||||
default:
|
||||
return cut_char($data,80);
|
||||
break;
|
||||
}
|
||||
}
|
||||
function Add($strDest, $strCallBack, $strCaller, $strURL, $strMessage, $strDate="", $nCount) {
|
||||
global $g5;
|
||||
// 문자 타입별 Port 설정.
|
||||
$sendType = strlen($strData) > 90 ? 1 : 0; // 0: SMS / 1: LMS
|
||||
|
||||
$Error = $this->CheckCommonTypeDest($strDest, $nCount);
|
||||
$Error = $this->CheckCommonTypeCallBack($strCallBack);
|
||||
$Error = $this->CheckCommonTypeDate($strDate);
|
||||
/* 개발 완료 후 아래 포트를 rand 함수를 이용하는 라인으로 변경 바랍니다.*/
|
||||
|
||||
$strCallBack = spacing($strCallBack,11);
|
||||
$strCaller = spacing($strCaller,10);
|
||||
$strDate = spacing($strDate,12);
|
||||
|
||||
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$hp_number = spacing($strDest[$i]['bk_hp'],11);
|
||||
$strData = $strMessage;
|
||||
if( !empty($strDest[$i]['bk_name']) ){
|
||||
$strData = str_replace("{이름}", $strDest[$i]['bk_name'], $strData);
|
||||
// 충전식
|
||||
if ($this->socket_portcode == 1) {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8200; // LMS
|
||||
$this->socket_port=(int)rand(8200,8201); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6295; // SMS
|
||||
$this->socket_port=(int)rand(6295,6297); // SMS
|
||||
}
|
||||
}
|
||||
// 아이코드에서는 문자에 utf-8 인코딩 형식을 아직 지원하지 않는다.
|
||||
$strData = iconv('utf-8', "euc-kr", stripslashes($strData));
|
||||
|
||||
if (!$strURL) {
|
||||
$strData = spacing(cut_char($strData,80),80);
|
||||
|
||||
$this->Data[$i] = '01144 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strURL = spacing($strURL,50);
|
||||
$strData = spacing($this->CheckCallCenter($strURL, $hp_number, $strData),80);
|
||||
|
||||
$this->Data[$i] = '05173 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
}
|
||||
return true; // 수정대기
|
||||
}
|
||||
|
||||
function Send() {
|
||||
global $g5;
|
||||
|
||||
$count = 1;
|
||||
|
||||
if ($g5['sms5_demo_send']) {
|
||||
foreach($this->Data as $puts) {
|
||||
if (rand(0,10)) {
|
||||
$phone = substr($puts,26,11);
|
||||
$code = '47022497 ';
|
||||
// 정액제
|
||||
else {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8300; // LMS
|
||||
$this->socket_port=(int)rand(8300,8301); // LMS
|
||||
} else {
|
||||
$phone = substr($puts,26,11);
|
||||
$code = 'Error(02)';
|
||||
//$this->socket_port = 6291; // SMS
|
||||
$this->socket_port=(int)rand(6291,6293); // SMS
|
||||
}
|
||||
$this->Result[] = "$phone:$code";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
|
||||
$strCallBack = FillSpace($strCallBack, 11); // 회신번호
|
||||
$strDate = FillSpace($strDate, 12); // 즉시(12byte 공백), 예약전송(YmdHi)
|
||||
|
||||
if ($sendType && $sendType == 1) {
|
||||
|
||||
/** LMS 제목 **/
|
||||
/*
|
||||
제목필드의 값이 없을 경우 단말기 기종및 설정에 따라 표기 방법이 다름
|
||||
1.설정에서 제목필드보기 설정 Disable -> 제목필드값을 넣어도 미표기
|
||||
2.설정에서 제목필드보기 설정 Enable -> 제목을 넣지 않을 경우 제목없음으로 자동표시
|
||||
|
||||
제목의 첫글자에 "<",">", 개행문자가 있을경우 단말기종류 및 통신사에 따라 메세지 전송실패 -> 글자를 체크하거나 취환처리요망
|
||||
*/
|
||||
$strSubject = str_replace("\r\n", " ", $strSubject);
|
||||
$strSubject = str_replace("<", "[", $strSubject);
|
||||
$strSubject = str_replace(">", "]", $strSubject);
|
||||
|
||||
$strSubject = FillSpace($strSubject,30);
|
||||
$strData = FillSpace(CutChar($strData,1500),1500);
|
||||
} else if (!$strURL) {
|
||||
$strData = FillSpace(CutChar($strData,90),90);
|
||||
$strCaller = FillSpace($strCaller,10);
|
||||
} else {
|
||||
$strURL = FillSpace($strURL,50);
|
||||
}
|
||||
|
||||
$Error = CheckCommonTypeDest($strDest, $nCount);
|
||||
$Error = is_vaild_callback($strCallBack);
|
||||
$Error = CheckCommonTypeDate($strDate);
|
||||
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$strDest[$i] = FillSpace($strDest[$i],11);
|
||||
if ($sendType && $sendType == 1) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strSubject.$strDate.$strData;
|
||||
} else if (!$strURL) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strData = FillSpace(CheckCallCenter($strURL, $strDest[$i], $strData),80);
|
||||
$this->Data[$i] = '05173 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function Send() {
|
||||
global $g5;
|
||||
|
||||
if ($g5['sms5_demo_send']) {
|
||||
foreach($this->Data as $puts) {
|
||||
if (rand(0,10)) {
|
||||
$phone = substr($puts,26,11);
|
||||
$code = '47022497 ';
|
||||
} else {
|
||||
$phone = substr($puts,26,11);
|
||||
$code = 'Error(02)';
|
||||
}
|
||||
$this->Result[] = "$phone:$code";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
$this->Data = "";
|
||||
return true;
|
||||
exit;
|
||||
}
|
||||
|
||||
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,30); }
|
||||
$dest = substr($puts,26,11);
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
$this->Log[] = $puts;
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
|
||||
fclose($fsocket);
|
||||
$this->Data = "";
|
||||
return true;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
|
||||
class SMS5 extends SMS {
|
||||
var $Log = array();
|
||||
|
||||
function SMS_con($sms_server,$sms_id,$sms_pw,$port) {
|
||||
$this->ID=$sms_id; // 계약 후 지정
|
||||
$this->PWD=$sms_pw; // 계약 후 지정
|
||||
$this->SMS_Server=$sms_server;
|
||||
$this->SMS_Port=$port;
|
||||
$this->ID = spacing($this->ID,10);
|
||||
$this->PWD = spacing($this->PWD,10);
|
||||
}
|
||||
|
||||
$fsocket=fsockopen($this->SMS_Server,$this->SMS_Port);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
/**
|
||||
* 발송번호의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param strDest 발송번호 배열입니다.
|
||||
* nCount 배열의 크기입니다.
|
||||
* @return 처리결과입니다.
|
||||
*/
|
||||
function CheckCommonTypeDest($strDest, $nCount) {
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$hp_number = preg_replace("/[^0-9]/","",$strDest[$i]['bk_hp']);
|
||||
if (strlen($hp_number)<10 || strlen($hp_number)>11) return "휴대폰 번호가 틀렸습니다";
|
||||
|
||||
## php4.3.10일경우
|
||||
## zend 최신버전으로 업해주세요..
|
||||
## 또는 69번째 줄을 $this->Data as $tmp => $puts 로 변경해 주세요.
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
$dest = substr($puts,26,11);
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) {
|
||||
$gets = fgets($fsocket,30);
|
||||
}
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
$this->Log[] = $puts;
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
$this->Log[] = $puts;
|
||||
$CID=substr($hp_number,0,3);
|
||||
if ( preg_match("/[^0-9]/",$CID) || ($CID!='010' && $CID!='011' && $CID!='016' && $CID!='017' && $CID!='018' && $CID!='019') ) return "휴대폰 앞자리 번호가 잘못되었습니다";
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
|
||||
// 1천건씩 전송 후 5초 쉼
|
||||
if ($count++%1000 == 0) sleep(5);
|
||||
}
|
||||
fclose($fsocket);
|
||||
$this->Data = "";
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* 회신번호의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param strDest 회신번호입니다.
|
||||
* @return 처리결과입니다.
|
||||
*/
|
||||
function CheckCommonTypeCallBack($strCallBack) {
|
||||
if (preg_match("/[^0-9]/", $strCallBack)) return "회신 전화번호가 잘못되었습니다";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 예약날짜의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
* @param text 원하는 문자열입니다.
|
||||
* size 원하는 길이입니다.
|
||||
* @return 처리결과입니다.
|
||||
*/
|
||||
function CheckCommonTypeDate($strDate) {
|
||||
$strDate=preg_replace("/[^0-9]/","",$strDate);
|
||||
if ($strDate) {
|
||||
if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($rsvTime,0,4))) return "예약날짜가 잘못되었습니다";
|
||||
if (substr($strDate,8,2)>23 || substr($strDate,10,2)>59) return "예약시간이 잘못되었습니다";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* URL콜백용으로 메세지 크기를 수정합니다.
|
||||
*
|
||||
* @param url URL 내용입니다.
|
||||
* msg 결과메시지입니다.
|
||||
* desk 문자내용입니다.
|
||||
*/
|
||||
function CheckCallCenter($url, $dest, $data) {
|
||||
switch (substr($dest,0,3)) {
|
||||
case '010': //20바이트
|
||||
return cut_char($data,20);
|
||||
break;
|
||||
case '011': //80바이트
|
||||
return cut_char($data,80);
|
||||
break;
|
||||
case '016': // 80바이트
|
||||
return cut_char($data,80);
|
||||
break;
|
||||
case '017': // URL 포함 80바이트
|
||||
return cut_char($data,80 - strlen($url));
|
||||
break;
|
||||
case '018': // 20바이트
|
||||
return cut_char($data,20);
|
||||
break;
|
||||
case '019': // 20바이트
|
||||
return cut_char($data,20);
|
||||
break;
|
||||
default:
|
||||
return cut_char($data,80);
|
||||
break;
|
||||
}
|
||||
}
|
||||
function Add($strDest, $strCallBack, $strCaller, $strURL, $strMessage, $strDate="", $nCount) {
|
||||
global $g5;
|
||||
|
||||
$Error = $this->CheckCommonTypeDest($strDest, $nCount);
|
||||
$Error = $this->CheckCommonTypeCallBack($strCallBack);
|
||||
$Error = $this->CheckCommonTypeDate($strDate);
|
||||
|
||||
$strCallBack = spacing($strCallBack,11);
|
||||
$strCaller = spacing($strCaller,10);
|
||||
$strDate = spacing($strDate,12);
|
||||
|
||||
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$hp_number = spacing($strDest[$i]['bk_hp'],11);
|
||||
$strData = $strMessage;
|
||||
if( !empty($strDest[$i]['bk_name']) ){
|
||||
$strData = str_replace("{이름}", $strDest[$i]['bk_name'], $strData);
|
||||
}
|
||||
// 아이코드에서는 문자에 utf-8 인코딩 형식을 아직 지원하지 않는다.
|
||||
$strData = iconv('utf-8', "euc-kr", stripslashes($strData));
|
||||
|
||||
if (!$strURL) {
|
||||
$strData = spacing(cut_char($strData,80),80);
|
||||
|
||||
$this->Data[$i] = '01144 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strURL = spacing($strURL,50);
|
||||
$strData = spacing($this->CheckCallCenter($strURL, $hp_number, $strData),80);
|
||||
|
||||
$this->Data[$i] = '05173 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
}
|
||||
return true; // 수정대기
|
||||
}
|
||||
|
||||
function Send() {
|
||||
global $g5;
|
||||
|
||||
$count = 1;
|
||||
|
||||
if ($g5['sms5_demo_send']) {
|
||||
foreach($this->Data as $puts) {
|
||||
if (rand(0,10)) {
|
||||
$phone = substr($puts,26,11);
|
||||
$code = '47022497 ';
|
||||
} else {
|
||||
$phone = substr($puts,26,11);
|
||||
$code = 'Error(02)';
|
||||
}
|
||||
$this->Result[] = "$phone:$code";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
$this->Data = "";
|
||||
return true;
|
||||
exit;
|
||||
}
|
||||
|
||||
$fsocket=fsockopen($this->SMS_Server,$this->SMS_Port);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
## php4.3.10일경우
|
||||
## zend 최신버전으로 업해주세요..
|
||||
## 또는 69번째 줄을 $this->Data as $tmp => $puts 로 변경해 주세요.
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
$dest = substr($puts,26,11);
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) {
|
||||
$gets = fgets($fsocket,30);
|
||||
}
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
$this->Log[] = $puts;
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
$gets = "";
|
||||
|
||||
// 1천건씩 전송 후 5초 쉼
|
||||
if ($count++%1000 == 0) sleep(5);
|
||||
}
|
||||
fclose($fsocket);
|
||||
$this->Data = "";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
if(!$config['cf_sms_use'])
|
||||
alert_close('문자보내기를 이용하실 수 없습니다.');
|
||||
|
||||
if( !$sms5['bo_skin'] ){
|
||||
$sms5['bo_skin'] = "basic";
|
||||
}
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
if(!$config['cf_sms_use'])
|
||||
alert_close('문자보내기를 이용하실 수 없습니다.');
|
||||
|
||||
// SMS 라이브러리
|
||||
$config['cf_sms_type'] = '';
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
||||
|
||||
$g5['title'] = "문자전송중";
|
||||
|
||||
if (!($token && get_session("ss_token") == $token))
|
||||
|
||||
@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
|
||||
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
|
||||
<?php if($editor_content_js) echo $editor_content_js; ?>
|
||||
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
|
||||
<div id="autosave_pop">
|
||||
<strong>임시 저장된 글 목록</strong>
|
||||
|
||||
@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
|
||||
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
|
||||
<?php if($editor_content_js) echo $editor_content_js; ?>
|
||||
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
|
||||
<div id="autosave_pop">
|
||||
<strong>임시 저장된 글 목록</strong>
|
||||
|
||||
@ -14,7 +14,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="attach" value="2">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php if ($is_member) { // 회원이면 ?>
|
||||
<input type="hidden" name="fnick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="fnick" value="<?php echo get_text($member['mb_nick']); ?>">
|
||||
<input type="hidden" name="fmail" value="<?php echo $member['mb_email'] ?>">
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -22,8 +22,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="cert_no" value="">
|
||||
<?php if (isset($member['mb_sex'])) { ?><input type="hidden" name="mb_sex" value="<?php echo $member['mb_sex'] ?>"><?php } ?>
|
||||
<?php if (isset($member['mb_nick_date']) && $member['mb_nick_date'] > date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400))) { // 닉네임수정일이 지나지 않았다면 ?>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<?php } ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
@ -60,7 +60,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_cert_use']) { ?>
|
||||
<span class="frm_info">아이핀 본인확인 후에는 이름이 자동 입력되고 휴대폰 본인확인 후에는 이름과 휴대폰번호가 자동 입력되어 수동으로 입력할수 없게 됩니다.</span>
|
||||
<?php } ?>
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo $member['mb_name'] ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>" size="10">
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo get_text($member['mb_name']) ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>" size="10">
|
||||
<?php
|
||||
if($config['cf_cert_use']) {
|
||||
if($config['cf_cert_ipin'])
|
||||
@ -92,8 +92,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
공백없이 한글,영문,숫자만 입력 가능 (한글2자, 영문4자 이상)<br>
|
||||
닉네임을 바꾸시면 앞으로 <?php echo (int)$config['cf_nick_modify'] ?>일 이내에는 변경 할 수 없습니다.
|
||||
</span>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>" id="reg_mb_nick" required class="frm_input required nospace" size="10" maxlength="20">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>" id="reg_mb_nick" required class="frm_input required nospace" size="10" maxlength="20">
|
||||
<span id="msg_mb_nick"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -116,14 +116,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_use_homepage']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_homepage">홈페이지<?php if ($config['cf_req_homepage']){ ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="text" name="mb_homepage" value="<?php echo $member['mb_homepage'] ?>" id="reg_mb_homepage" <?php echo $config['cf_req_homepage']?"required":""; ?> class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" size="70" maxlength="255"></td>
|
||||
<td><input type="text" name="mb_homepage" value="<?php echo get_text($member['mb_homepage']) ?>" id="reg_mb_homepage" <?php echo $config['cf_req_homepage']?"required":""; ?> class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" size="70" maxlength="255"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_tel']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_tel">전화번호<?php if ($config['cf_req_tel']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo $member['mb_tel'] ?>" id="reg_mb_tel" <?php echo $config['cf_req_tel']?"required":""; ?> class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20"></td>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" <?php echo $config['cf_req_tel']?"required":""; ?> class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -131,9 +131,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_hp" value="<?php echo $member['mb_hp'] ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<input type="text" name="mb_hp" value="<?php echo get_text($member['mb_hp']) ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<?php if ($config['cf_cert_use'] && $config['cf_cert_hp']) { ?>
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo $member['mb_hp'] ?>">
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo get_text($member['mb_hp']) ?>">
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -149,14 +149,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<label for="reg_mb_zip" class="sound_only">우편번호<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
||||
<input type="text" name="mb_zip" value="<?php echo $member['mb_zip1'].$member['mb_zip2']; ?>" id="reg_mb_zip" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input <?php echo $config['cf_req_addr']?"required":""; ?>" size="5" maxlength="6">
|
||||
<button type="button" class="btn_frmline" onclick="win_zip('fregisterform', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
||||
<input type="text" name="mb_addr1" value="<?php echo $member['mb_addr1'] ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50">
|
||||
<input type="text" name="mb_addr1" value="<?php echo get_text($member['mb_addr1']) ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50">
|
||||
<label for="reg_mb_addr1">기본주소<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label><br>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $member['mb_addr2'] ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<input type="text" name="mb_addr2" value="<?php echo get_text($member['mb_addr2']) ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<label for="reg_mb_addr2">상세주소</label>
|
||||
<br>
|
||||
<input type="text" name="mb_addr3" value="<?php echo $member['mb_addr3'] ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<input type="text" name="mb_addr3" value="<?php echo get_text($member['mb_addr3']) ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<label for="reg_mb_addr3">참고항목</label>
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $member['mb_addr_jibeon']; ?>">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo get_text($member['mb_addr_jibeon']); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -11,7 +11,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$popular_skin_url.'/style.css">',
|
||||
<h2>인기검색어</h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo $list[$i]['pp_word'] ?></a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -53,7 +53,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_email">이메일</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_email" value="<?php echo $write['qa_email']; ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" size="50" maxlength="100">
|
||||
<input type="text" name="qa_email" value="<?php echo get_text($write['qa_email']); ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" size="50" maxlength="100">
|
||||
<input type="checkbox" name="qa_email_recv" value="1" <?php if($write['qa_email_recv']) echo 'checked="checked"'; ?>>
|
||||
<label for="qa_email_recv">답변받기</label>
|
||||
</td>
|
||||
@ -64,7 +64,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_hp">휴대폰</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_hp" value="<?php echo $write['qa_hp']; ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<input type="text" name="qa_hp" value="<?php echo get_text($write['qa_hp']); ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<?php if($qaconfig['qa_use_sms']) { ?>
|
||||
<input type="checkbox" name="qa_sms_recv" value="1" <?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?>> 답변등록 SMS알림 수신
|
||||
<?php } ?>
|
||||
@ -75,7 +75,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_subject" value="<?php echo $write['qa_subject']; ?>" id="qa_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
<input type="text" name="qa_subject" value="<?php echo get_text($write['qa_subject']); ?>" id="qa_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ if ($is_member) { // 회원이라면 로그인 중이라는 메세지를 출력
|
||||
else if ($is_admin == 'group') $sr_admin_msg = "그룹관리자 ";
|
||||
else if ($is_admin == 'board') $sr_admin_msg = "게시판관리자 ";
|
||||
|
||||
echo '<div id="hd_login_msg">'.$sr_admin_msg.$member['mb_nick'].'님 로그인 중 ';
|
||||
echo '<div id="hd_login_msg">'.$sr_admin_msg.get_text($member['mb_nick']).'님 로그인 중 ';
|
||||
echo '<a href="'.G5_BBS_URL.'/logout.php">로그아웃</a></div>';
|
||||
}
|
||||
?>
|
||||
@ -193,8 +193,7 @@ function html_auto_br(obj)
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
@ -243,7 +242,7 @@ function fwrite_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
|
||||
@ -192,8 +192,7 @@ function html_auto_br(obj)
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
@ -242,7 +241,7 @@ function fwrite_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="attach" value="2">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php if ($is_member) { // 회원이면 ?>
|
||||
<input type="hidden" name="fnick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="fnick" value="<?php echo get_text($member['mb_nick']); ?>">
|
||||
<input type="hidden" name="fmail" value="<?php echo $member['mb_email'] ?>">
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -20,8 +20,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="cert_no" value="">
|
||||
<?php if (isset($member['mb_sex'])) { ?><input type="hidden" name="mb_sex" value="<?php echo $member['mb_sex'] ?>"><?php } ?>
|
||||
<?php if (isset($member['mb_nick_date']) && $member['mb_nick_date'] > date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400))) { // 닉네임수정일이 지나지 않았다면 ?>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<?php } ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
@ -55,7 +55,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_cert_use']) { ?>
|
||||
<span class="frm_info">아이핀 본인확인 후에는 이름이 자동 입력되고 휴대폰 본인확인 후에는 이름과 휴대폰번호가 자동 입력되어 수동으로 입력할수 없게 됩니다.</span>
|
||||
<?php } ?>
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo $member['mb_name'] ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>">
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo get_text($member['mb_name']) ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>">
|
||||
<?php
|
||||
if($config['cf_cert_use']) {
|
||||
if($config['cf_cert_ipin'])
|
||||
@ -87,8 +87,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
공백없이 한글,영문,숫자만 입력 가능 (한글2자, 영문4자 이상)<br>
|
||||
닉네임을 바꾸시면 앞으로 <?php echo (int)$config['cf_nick_modify'] ?>일 이내에는 변경 할 수 없습니다.
|
||||
</span>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>" id="reg_mb_nick" required class="frm_input required nospace" maxlength="20">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>" id="reg_mb_nick" required class="frm_input required nospace" maxlength="20">
|
||||
<span id="msg_mb_nick"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -111,14 +111,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_use_homepage']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_homepage">홈페이지<?php if ($config['cf_req_homepage']){ ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="url" name="mb_homepage" value="<?php echo $member['mb_homepage'] ?>" id="reg_mb_homepage" class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" maxlength="255" <?php echo $config['cf_req_homepage']?"required":""; ?>></td>
|
||||
<td><input type="url" name="mb_homepage" value="<?php echo get_text($member['mb_homepage']) ?>" id="reg_mb_homepage" class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" maxlength="255" <?php echo $config['cf_req_homepage']?"required":""; ?>></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_tel']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_tel">전화번호<?php if ($config['cf_req_tel']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo $member['mb_tel'] ?>" id="reg_mb_tel" class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?>></td>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?>></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -126,9 +126,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_hp" value="<?php echo $member['mb_hp'] ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<input type="text" name="mb_hp" value="<?php echo get_text($member['mb_hp']) ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<?php if ($config['cf_cert_use'] && $config['cf_cert_hp']) { ?>
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo $member['mb_hp'] ?>">
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo get_text($member['mb_hp']) ?>">
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -145,13 +145,13 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="text" name="mb_zip" value="<?php echo $member['mb_zip1'].$member['mb_zip2']; ?>" id="reg_mb_zip" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input <?php echo $config['cf_req_addr']?"required":""; ?>" size="5" maxlength="6">
|
||||
<button type="button" class="btn_frmline" onclick="win_zip('fregisterform', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
||||
<label for="reg_mb_addr1" class="sound_only">주소<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
||||
<input type="text" name="mb_addr1" value="<?php echo $member['mb_addr1'] ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50"><br>
|
||||
<input type="text" name="mb_addr1" value="<?php echo get_text($member['mb_addr1']) ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50"><br>
|
||||
<label for="reg_mb_addr2" class="sound_only">상세주소</label>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $member['mb_addr2'] ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<input type="text" name="mb_addr2" value="<?php echo get_text($member['mb_addr2']) ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<br>
|
||||
<label for="reg_mb_addr3" class="sound_only">참고항목</label>
|
||||
<input type="text" name="mb_addr3" value="<?php echo $member['mb_addr3'] ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $member['mb_addr_jibeon']; ?>">
|
||||
<input type="text" name="mb_addr3" value="<?php echo get_text($member['mb_addr3']) ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo get_text($member['mb_addr_jibeon']); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -10,7 +10,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$popular_skin_url.'/style.css">',
|
||||
<h2>인기검색어</h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo $list[$i]['pp_word'] ?></a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -53,7 +53,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_email">이메일</label></th>
|
||||
<td>
|
||||
<input type="email" name="qa_email" value="<?php echo $write['qa_email']; ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" maxlength="100">
|
||||
<input type="email" name="qa_email" value="<?php echo get_text($write['qa_email']); ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" maxlength="100">
|
||||
<input type="checkbox" name="qa_email_recv" value="1" id="qa_email_recv" <?php if($write['qa_email_recv']) echo 'checked="checked"'; ?>>
|
||||
<label for="qa_email_recv">답변받기</label>
|
||||
</td>
|
||||
@ -64,7 +64,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_hp">휴대폰</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_hp" value="<?php echo $write['qa_hp']; ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<input type="text" name="qa_hp" value="<?php echo get_text($write['qa_hp']); ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<?php if($qaconfig['qa_use_sms']) { ?>
|
||||
<input type="checkbox" name="qa_sms_recv" value="1" <?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?>> 답변등록 SMS알림 수신
|
||||
<?php } ?>
|
||||
@ -75,7 +75,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_subject" value="<?php echo $write['qa_subject']; ?>" id="qa_subject" required class="frm_input required" maxlength="255">
|
||||
<input type="text" name="qa_subject" value="<?php echo get_text($write['qa_subject']); ?>" id="qa_subject" required class="frm_input required" maxlength="255">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
|
||||
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
|
||||
<?php if($editor_content_js) echo $editor_content_js; ?>
|
||||
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
|
||||
<div id="autosave_pop">
|
||||
<strong>임시 저장된 글 목록</strong>
|
||||
|
||||
@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
|
||||
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
|
||||
<?php if($editor_content_js) echo $editor_content_js; ?>
|
||||
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
|
||||
<div id="autosave_pop">
|
||||
<strong>임시 저장된 글 목록</strong>
|
||||
|
||||
@ -14,7 +14,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="attach" value="2">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php if ($is_member) { // 회원이면 ?>
|
||||
<input type="hidden" name="fnick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="fnick" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<input type="hidden" name="fmail" value="<?php echo $member['mb_email'] ?>">
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -22,8 +22,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<input type="hidden" name="cert_no" value="">
|
||||
<?php if (isset($member['mb_sex'])) { ?><input type="hidden" name="mb_sex" value="<?php echo $member['mb_sex'] ?>"><?php } ?>
|
||||
<?php if (isset($member['mb_nick_date']) && $member['mb_nick_date'] > date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400))) { // 닉네임수정일이 지나지 않았다면 ?>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo $member['mb_nick'] ?>">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<input type="hidden" name="mb_nick" value="<?php echo get_text($member['mb_nick']) ?>">
|
||||
<?php } ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
@ -60,7 +60,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_cert_use']) { ?>
|
||||
<span class="frm_info">아이핀 본인확인 후에는 이름이 자동 입력되고 휴대폰 본인확인 후에는 이름과 휴대폰번호가 자동 입력되어 수동으로 입력할수 없게 됩니다.</span>
|
||||
<?php } ?>
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo $member['mb_name'] ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>" size="10">
|
||||
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo get_text($member['mb_name']) ?>" <?php echo $required ?> <?php echo $readonly; ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>" size="10">
|
||||
<?php
|
||||
if($config['cf_cert_use']) {
|
||||
if($config['cf_cert_ipin'])
|
||||
@ -92,8 +92,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
공백없이 한글,영문,숫자만 입력 가능 (한글2자, 영문4자 이상)<br>
|
||||
닉네임을 바꾸시면 앞으로 <?php echo (int)$config['cf_nick_modify'] ?>일 이내에는 변경 할 수 없습니다.
|
||||
</span>
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?$member['mb_nick']:''; ?>" id="reg_mb_nick" required class="frm_input required nospace" size="10" maxlength="20">
|
||||
<input type="hidden" name="mb_nick_default" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>">
|
||||
<input type="text" name="mb_nick" value="<?php echo isset($member['mb_nick'])?get_text($member['mb_nick']):''; ?>" id="reg_mb_nick" required class="frm_input required nospace" size="10" maxlength="20">
|
||||
<span id="msg_mb_nick"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -116,14 +116,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<?php if ($config['cf_use_homepage']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_homepage">홈페이지<?php if ($config['cf_req_homepage']){ ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="text" name="mb_homepage" value="<?php echo $member['mb_homepage'] ?>" id="reg_mb_homepage" <?php echo $config['cf_req_homepage']?"required":""; ?> class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" size="70" maxlength="255"></td>
|
||||
<td><input type="text" name="mb_homepage" value="<?php echo get_text($member['mb_homepage']) ?>" id="reg_mb_homepage" <?php echo $config['cf_req_homepage']?"required":""; ?> class="frm_input <?php echo $config['cf_req_homepage']?"required":""; ?>" size="70" maxlength="255"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_tel']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_tel">전화번호<?php if ($config['cf_req_tel']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo $member['mb_tel'] ?>" id="reg_mb_tel" <?php echo $config['cf_req_tel']?"required":""; ?> class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20"></td>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" <?php echo $config['cf_req_tel']?"required":""; ?> class="frm_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -131,9 +131,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_hp" value="<?php echo $member['mb_hp'] ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<input type="text" name="mb_hp" value="<?php echo get_text($member['mb_hp']) ?>" id="reg_mb_hp" <?php echo ($config['cf_req_hp'])?"required":""; ?> class="frm_input <?php echo ($config['cf_req_hp'])?"required":""; ?>" maxlength="20">
|
||||
<?php if ($config['cf_cert_use'] && $config['cf_cert_hp']) { ?>
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo $member['mb_hp'] ?>">
|
||||
<input type="hidden" name="old_mb_hp" value="<?php echo get_text($member['mb_hp']) ?>">
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -149,14 +149,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<label for="reg_mb_zip" class="sound_only">우편번호 앞자리<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
||||
<input type="text" name="mb_zip" value="<?php echo $member['mb_zip1'].$member['mb_zip2']; ?>" id="reg_mb_zip" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input <?php echo $config['cf_req_addr']?"required":""; ?>" size="5" maxlength="6">
|
||||
<button type="button" class="btn_frmline" onclick="win_zip('fregisterform', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
||||
<input type="text" name="mb_addr1" value="<?php echo $member['mb_addr1'] ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50">
|
||||
<input type="text" name="mb_addr1" value="<?php echo get_text($member['mb_addr1']) ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50">
|
||||
<label for="reg_mb_addr1">기본주소<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label><br>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $member['mb_addr2'] ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<input type="text" name="mb_addr2" value="<?php echo get_text($member['mb_addr2']) ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<label for="reg_mb_addr2">상세주소</label>
|
||||
<br>
|
||||
<input type="text" name="mb_addr3" value="<?php echo $member['mb_addr3'] ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<input type="text" name="mb_addr3" value="<?php echo get_text($member['mb_addr3']) ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<label for="reg_mb_addr3">참고항목</label>
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $member['mb_addr_jibeon']; ?>">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo get_text($member['mb_addr_jibeon']); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -11,7 +11,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$popular_skin_url.'/style.css">',
|
||||
<h2>인기검색어</h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo $list[$i]['pp_word'] ?></a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&sop=and&stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -53,7 +53,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_email">이메일</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_email" value="<?php echo $write['qa_email']; ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" size="50" maxlength="100">
|
||||
<input type="text" name="qa_email" value="<?php echo get_text($write['qa_email']); ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" size="50" maxlength="100">
|
||||
<input type="checkbox" name="qa_email_recv" value="1" <?php if($write['qa_email_recv']) echo 'checked="checked"'; ?>>
|
||||
<label for="qa_email_recv">답변받기</label>
|
||||
</td>
|
||||
@ -64,7 +64,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_hp">휴대폰</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_hp" value="<?php echo $write['qa_hp']; ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<input type="text" name="qa_hp" value="<?php echo get_text($write['qa_hp']); ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_hp.' '; ?>frm_input" size="30">
|
||||
<?php if($qaconfig['qa_use_sms']) { ?>
|
||||
<input type="checkbox" name="qa_sms_recv" value="1" <?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?>> 답변등록 SMS알림 수신
|
||||
<?php } ?>
|
||||
@ -75,7 +75,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_subject" value="<?php echo $write['qa_subject']; ?>" id="qa_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
<input type="text" name="qa_subject" value="<?php echo get_text($write['qa_subject']); ?>" id="qa_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user