sms5 회원간 문자전송 기능 제거
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 60 B |
Binary file not shown.
|
Before Width: | Height: | Size: 67 B |
@ -1,48 +0,0 @@
|
||||
#sms5_send {position:relative}
|
||||
|
||||
.sms5_box {position:relative;padding:10px;border-radius:5px;background:#fbec99}
|
||||
.sms5_box .box_ico {position:absolute;top:20px;left:-7px;width:7px;height:13px;background:url('img/box_ico.gif') no-repeat}
|
||||
.sms5_box .box_txt {border:0;background:transparent;word-break:break-all;resize:none;overflow:hidden}
|
||||
.sms5_box .box_square {width:100px;height:90px}
|
||||
|
||||
#send_write {padding:0 20px !important}
|
||||
#send_write h2 {padding:0 0 10px}
|
||||
#send_write .sms5_box {margin:0 0 5px;text-align:center}
|
||||
#send_write .box_txt {width:90%;height:80px}
|
||||
#wr_message_lbl {position:absolute;top:45px;left:48%;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
.write_inner {position:relative;padding:10px 0;border-bottom:1px solid #efefef;zoom:1}
|
||||
.write_inner:after {display:block;visibility:hidden;clear:both;content:''}
|
||||
.write_inner h2 {margin:0;padding:0 0 20px !important}
|
||||
.write_floater {position:absolute;top:10px;right:0;text-align:right}
|
||||
.write_floater_btn {margin:0;padding:0;border:0;background:transparent;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
#write_rcv {margin:0 0 10px}
|
||||
#write_rcv strong {display:inline-block;margin:0 10px 0 0}
|
||||
#write_reply label {display:inline-block;margin:0 10px 0 0;font-weight:bold}
|
||||
#write_reply #mh_reply {padding:0 5px;width:90px;height:20px;border:1px solid #e9e9e9;text-align:center;line-height:1.8em}
|
||||
|
||||
#write_rsv .rsv_line {display:block;height:10px}
|
||||
|
||||
.write_scemo strong {display:block;margin:0 0 10px}
|
||||
.write_scemo .scemo_btn {margin:0 0 1px;padding:10px 0;width:100%;border:0;background:#686868;color:#fff;text-align:center}
|
||||
.write_scemo .scemo_list {display:none;letter-spacing:-4px}
|
||||
.write_scemo .list_closer {margin:5px 0;text-align:right}
|
||||
.write_scemo .list_closer_btn {margin:0;padding:10px 0;width:100%;border:0;background:#383838;color:#fff;letter-spacing:0}
|
||||
.write_scemo .scemo_add {margin:0;padding:0;width:25%;height:40px;border:1px solid #e9e9e9;background:transparent;letter-spacing:0}
|
||||
#write_sc .scemo_list {margin:0 0 20px}
|
||||
|
||||
#sms_byte {position:absolute;top:-27px;right:0;color:#999}
|
||||
|
||||
#send_emo {position:relative;padding:20px;border-top:1px solid #e9e9e9;background:#f7f7f7}
|
||||
#send_emo h2 {margin:0 0 20px}
|
||||
#send_emo .tmp_loading {display:block;padding:180px 0 0;text-align:center}
|
||||
#send_emo #emo_sel {position:absolute;top:20px;right:20px;margin:0}
|
||||
#send_emo .emo_list {margin:0;padding:0;list-style:none}
|
||||
#send_emo li {float:left;margin:0 2% 10px 0;width:49%}
|
||||
#send_emo li:nth-of-type(even) {margin:0 0 10px}
|
||||
#send_emo .sms5_box {background:#fbec99}
|
||||
#send_emo .box_ico {display:none}
|
||||
#send_emo .box_txt {cursor:pointer}
|
||||
#send_emo .emo_tit {display:block;height:20px;line-height:2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
#send_emo .btn_submit {padding:0 5px;height:24px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.95em;vertical-align:middle;cursor:pointer}
|
||||
@ -1,50 +0,0 @@
|
||||
#sms5_send {position:relative}
|
||||
|
||||
.sms5_box {position:relative;padding:10px;border-radius:5px;background:#fbec99}
|
||||
.sms5_box .box_ico {position:absolute;top:20px;left:-7px;width:7px;height:13px;background:url('img/box_ico.gif') no-repeat}
|
||||
.sms5_box .box_txt {border:0;background:transparent;word-break:break-all;resize:none;overflow:hidden}
|
||||
.sms5_box .box_square {width:100px;height:90px}
|
||||
|
||||
#send_write {padding:0 20px !important}
|
||||
#send_write h2 {padding:0 0 10px}
|
||||
#send_write .sms5_box {margin:0 0 5px;text-align:center}
|
||||
#send_write .box_txt {width:390px;height:80px}
|
||||
#wr_message_lbl {position:absolute;top:45px;left:200px;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
.write_inner {position:relative;padding:10px 0;border-bottom:1px solid #efefef;zoom:1}
|
||||
.write_inner:after {display:block;visibility:hidden;clear:both;content:''}
|
||||
.write_inner h2 {margin:0;padding:0 0 10px !important}
|
||||
.write_floater {position:absolute;top:15px;right:0;text-align:right}
|
||||
.write_floater_btn {margin:0;padding:0;border:0;background:transparent;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
#write_rcv {float:left;height:22px;line-height:1.8em}
|
||||
#write_rcv strong {display:inline-block;margin:0 10px 0 0}
|
||||
#write_reply {float:right}
|
||||
#write_reply label {display:inline-block;margin:0 10px 0 0;font-weight:bold}
|
||||
#write_reply #mh_reply {padding:0 5px;width:90px;height:20px;border:1px solid #e9e9e9;text-align:center;line-height:1.8em}
|
||||
|
||||
.write_scemo {width:48%}
|
||||
.write_scemo strong {display:block;margin:0 0 10px}
|
||||
.write_scemo .scemo_list {letter-spacing:-4px}
|
||||
.write_scemo .scemo_add {margin:0;padding:0;height:25px;border:1px solid #e9e9e9;background:transparent;letter-spacing:0}
|
||||
#write_sc {float:left}
|
||||
#write_sc .scemo_add {width:25px}
|
||||
#write_emo {float:right}
|
||||
#write_emo .scemo_list {text-align:right}
|
||||
#write_emo .scemo_add {width:66px}
|
||||
#write_emo .emo_long {}
|
||||
|
||||
#sms_byte {position:absolute;top:-27px;right:0;color:#999}
|
||||
|
||||
#send_emo {position:relative;padding:20px;border-top:1px solid #e9e9e9;background:#f7f7f7}
|
||||
#send_emo h2 {margin:0 0 20px}
|
||||
#send_emo .tmp_loading {display:block;padding:180px 0 0;text-align:center}
|
||||
#send_emo #emo_sel {position:absolute;top:20px;right:20px;margin:0}
|
||||
#send_emo .emo_list {margin:0;padding:0;list-style:none}
|
||||
#send_emo li {float:left;margin:0 10px 10px 0 !important;margin:0 5px 10px 0;width:113px !important;width:110px}
|
||||
#send_emo li:nth-of-type(3n) {margin:0 0 10px !important}
|
||||
#send_emo .sms5_box {background:#fbec99}
|
||||
#send_emo .box_ico {display:none}
|
||||
#send_emo .box_txt {cursor:pointer}
|
||||
#send_emo .emo_tit {display:block;height:20px;line-height:2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
#send_emo .btn_submit {padding:0 5px;height:24px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.95em;vertical-align:middle;cursor:pointer}
|
||||
@ -1,378 +0,0 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$sms5_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<div id="sms5_send" class="new_win">
|
||||
<h1 id="win_title">SMS 보내기</h1>
|
||||
|
||||
<div id="send_write">
|
||||
<form action="<?php echo $action_url?>" onsubmit="return smssend_submit(this);" name="smsform" method="post" autocomplete="off">
|
||||
<input type="hidden" name="token" value="<?php echo $token?>">
|
||||
<input type="hidden" name="mh_hp" value="">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb_id?>">
|
||||
<h2>보낼내용</h2>
|
||||
<div class="sms5_box">
|
||||
<span class="box_ico"></span>
|
||||
<label for="mh_message" id="wr_message_lbl">내용</label>
|
||||
<textarea name="mh_message" id="mh_message" class="box_txt" onkeyup="byte_check('mh_message', 'sms_bytes');"></textarea>
|
||||
<div id="sms_byte"><span id="sms_bytes">0</span> / 80 byte</div>
|
||||
</div>
|
||||
|
||||
<div class="write_inner">
|
||||
<?php if( $mb['mb_id'] ){ //회원 아이디가 있다면 ?>
|
||||
<div id="write_rcv">
|
||||
<strong>수신회원</strong> <?php echo $mb['mb_nick']?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div id="write_reply">
|
||||
<label for="mh_reply">회신번호</label>
|
||||
<input type="text" name="mh_reply" value="<?php echo $member['mb_hp']?>" id="mh_reply" <?php if ($is_admin != 'super') { ?> readonly<?php } ?>>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="write_rsv" class="write_inner">
|
||||
<h2>예약전송</h2>
|
||||
|
||||
<div class="write_floater">
|
||||
<label for="booking_flag"><span class="sound_only">예약전송 </span>사용</label>
|
||||
<input type="checkbox" name="booking_flag" id="booking_flag" value="true" onclick="booking_show()" >
|
||||
</div>
|
||||
|
||||
<select name="mh_by" id="mh_by" disabled>
|
||||
<option value="<?php echo date('Y')?>"><?php echo date('Y')?></option>
|
||||
<option value="<?php echo date('Y')+1?>"><?php echo date('Y')+1?></option>
|
||||
</select> 년
|
||||
<select name="mh_bm" id="mh_bm" disabled>
|
||||
<?php for ($i=1; $i<=12; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('m')==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 월
|
||||
<select name="mh_bd" id="mh_bd" disabled>
|
||||
<?php for ($i=1; $i<=31; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('d')==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 일
|
||||
<select name="mh_bh" id="mh_bh" disabled>
|
||||
<?php for ($i=0; $i<24; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('H')+1==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 시
|
||||
<select name="mh_bi" id="mh_bi" disabled>
|
||||
<?php for ($i=0; $i<=59; $i+=5) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>"><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 분
|
||||
</div>
|
||||
|
||||
<div class="write_inner">
|
||||
<div id="write_sc" class="write_scemo">
|
||||
<strong>특수기호</strong>
|
||||
<div class="scemo_list">
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('■')">■</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('□')">□</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▣')">▣</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◈')">◈</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◆')">◆</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◇')">◇</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♥')">♥</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♡')">♡</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('●')">●</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('○')">○</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▲')">▲</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▼')">▼</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▶')">▶</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▷')">▷</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◀')">◀</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◁')">◁</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☎')">☎</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☏')">☏</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♠')">♠</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♤')">♤</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♣')">♣</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♧')">♧</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('★')">★</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☆')">☆</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☞')">☞</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☜')">☜</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▒')">▒</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('⊙')">⊙</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('㈜')">㈜</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('№')">№</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('㉿')">㉿</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♨')">♨</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('™')">™</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('℡')">℡</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('∑')">∑</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('∏')">∏</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♬')">♬</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♪')">♪</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♩')">♩</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♭')">♭</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="write_emo" class="write_scemo">
|
||||
<strong>이모티콘</strong>
|
||||
<div class="scemo_list">
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('*^^*')">*^^*</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♡.♡')">♡.♡</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('@_@')">@_@</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☞_☜')">☞_☜</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('ㅠ ㅠ')">ㅠ ㅠ</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('Θ.Θ')">Θ.Θ</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('^_~♥')">^_~♥</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('~o~')">~o~</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('★.★')">★.★</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('(!.!)')">(!.!)</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('⊙.⊙')">⊙.⊙</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('q.p')">q.p</button>
|
||||
<button type="button" class="scemo_add emo_long" onclick="javascript:add('↖(^-^)↗')">↖(^-^)↗</button>
|
||||
<button type="button" class="scemo_add emo_long" onclick="javascript:add('(*^-^*)')">(*^-^*)</button>
|
||||
<button type="button" class="scemo_add emo_long" onclick="javascript:add('d(^-^)b')">d(^-^)b</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="win_btn">
|
||||
<input type="submit" value="전송" class="btn_submit">
|
||||
<button type="button" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if( count($emoticon_group) ){ //회원에게 공개된 이모티콘 그룹이 있다면 ?>
|
||||
<div id="send_emo">
|
||||
<h2>이모티콘 목록</h2>
|
||||
<form name="emoticon_form">
|
||||
<label for="emo_sel" class="sound_only">이모티콘 그룹</label>
|
||||
<select name="fg_no" id="emo_sel">
|
||||
<option value="" <?php echo $fg_no?'':'selected'?>>전체</option>
|
||||
<?php for($i=0; $i<count($emoticon_group); $i++) {?>
|
||||
<option value="<?php echo $emoticon_group[$i]['fg_no']?>"<?php echo ($fg_no==$emoticon_group[$i]['fg_no'])?'selected':''?>><?php echo $emoticon_group[$i]['fg_name']?> (<?php echo number_format($emoticon_group[$i]['fg_count'])?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<ul class="emo_list">
|
||||
</ul>
|
||||
|
||||
<nav class="pg_wrap">
|
||||
<span class="pg" id="emoticon_pg"></span>
|
||||
</nav>
|
||||
|
||||
<form name="emoticon_search" id="emoticon_search">
|
||||
<input type="hidden" name="page" id="hidden_page" >
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function sms_error(obj, err) {
|
||||
alert(err);
|
||||
obj.value = '';
|
||||
}
|
||||
|
||||
function smssend_submit(f)
|
||||
{
|
||||
if (!f.mh_message.value)
|
||||
{
|
||||
alert('보내실 문자를 입력하십시오.');
|
||||
f.mh_message.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!f.mh_reply.value)
|
||||
{
|
||||
alert('발신 번호를 입력하십시오.\n\n발신 번호는 회원정보의 휴대폰번호입니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
//f.submit();
|
||||
//win.focus();
|
||||
}
|
||||
|
||||
function booking_show()
|
||||
{
|
||||
if (document.getElementById('booking_flag').checked) {
|
||||
document.getElementById('mh_by').disabled = false;
|
||||
document.getElementById('mh_bm').disabled = false;
|
||||
document.getElementById('mh_bd').disabled = false;
|
||||
document.getElementById('mh_bh').disabled = false;
|
||||
document.getElementById('mh_bi').disabled = false;
|
||||
} else {
|
||||
document.getElementById('mh_by').disabled = true;
|
||||
document.getElementById('mh_bm').disabled = true;
|
||||
document.getElementById('mh_bd').disabled = true;
|
||||
document.getElementById('mh_bh').disabled = true;
|
||||
document.getElementById('mh_bi').disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function add(str) {
|
||||
var conts = document.getElementById('mh_message');
|
||||
var bytes = document.getElementById('sms_bytes');
|
||||
conts.focus();
|
||||
conts.value+=str;
|
||||
byte_check('mh_message', 'sms_bytes');
|
||||
return;
|
||||
}
|
||||
|
||||
function byte_check(mh_message, sms_bytes)
|
||||
{
|
||||
var conts = document.getElementById(mh_message);
|
||||
var bytes = document.getElementById(sms_bytes);
|
||||
|
||||
var i = 0;
|
||||
var cnt = 0;
|
||||
var exceed = 0;
|
||||
var ch = '';
|
||||
|
||||
for (i=0; i<conts.value.length; i++)
|
||||
{
|
||||
ch = conts.value.charAt(i);
|
||||
if (escape(ch).length > 4) {
|
||||
cnt += 2;
|
||||
} else {
|
||||
cnt += 1;
|
||||
}
|
||||
}
|
||||
|
||||
bytes.innerHTML = cnt;
|
||||
|
||||
if (cnt > 80)
|
||||
{
|
||||
exceed = cnt - 80;
|
||||
alert('메시지 내용은 80바이트를 넘을수 없습니다.\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 > 80) {
|
||||
tmp = tmp.substring(0,i);
|
||||
break;
|
||||
} else {
|
||||
xcnt = tcnt;
|
||||
}
|
||||
}
|
||||
conts.value = tmp;
|
||||
bytes.innerHTML = xcnt;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
byte_check('mh_message', 'sms_bytes');
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL?>/jquery.sms_paging.js"></script>
|
||||
<script>
|
||||
var emoticon_list = {
|
||||
go : function(fo_no){
|
||||
var wr_message = document.getElementById('mh_message');
|
||||
|
||||
//wr_message.focus();
|
||||
wr_message.value = document.getElementById('fo_contents_' + fo_no).value;
|
||||
|
||||
byte_check('mh_message', 'sms_bytes');
|
||||
}
|
||||
};
|
||||
(function($){
|
||||
$(".box_txt").bind("focus keydown", function(){
|
||||
$("#wr_message_lbl").hide();
|
||||
});
|
||||
|
||||
var $search_form = $("form#emoticon_search");
|
||||
emoticon_list.fn_paging = function( hash_val,total_page ){
|
||||
$('#emoticon_pg').paging({
|
||||
current:hash_val ? hash_val : 1,
|
||||
max:total_page == 0 || total_page ? total_page : 45,
|
||||
length : 5,
|
||||
liitem : 'span',
|
||||
format:'{0}',
|
||||
next:'next',
|
||||
prev:'prev',
|
||||
first:'<<',last:'>>',
|
||||
href:'#',
|
||||
itemCurrent:'pg_current',
|
||||
itemClass:'pg_page',
|
||||
appendhtml:'<span class="sound_only">페이지</span>',
|
||||
onclick:function(e,page){
|
||||
e.preventDefault();
|
||||
$("#hidden_page").val( page );
|
||||
var params = $($search_form).serialize();
|
||||
emoticon_list.select_page( params, "json" );
|
||||
}
|
||||
});
|
||||
}
|
||||
emoticon_list.loading = function( el, src ){
|
||||
if( !el || !src) return;
|
||||
$(el).append("<span class='tmp_loading'><img src='"+src+"' title='loading...' ></span>");
|
||||
}
|
||||
emoticon_list.loadingEnd = function( el ){
|
||||
$(".tmp_loading", $(el)).remove();
|
||||
}
|
||||
emoticon_list.select_page = function( params, type ){
|
||||
if( !type ){
|
||||
type = "json";
|
||||
}
|
||||
emoticon_list.loading(".emo_list", "<?php echo $sms5_skin_url?>/img/ajax-loader.gif" ); //로딩 이미지 보여줌
|
||||
$.ajax({
|
||||
url: "./ajax.sms_emoticon.php",
|
||||
cache:false,
|
||||
timeout : 30000,
|
||||
dataType:type,
|
||||
data:params,
|
||||
success: function(HttpRequest) {
|
||||
if( type == "json" ){
|
||||
if (HttpRequest.error) {
|
||||
alert(HttpRequest.error);
|
||||
return false;
|
||||
} else {
|
||||
var $emoticon_box = $(".emo_list");
|
||||
var list_text = "";
|
||||
$.each( HttpRequest.list_text , function(num) {
|
||||
var list_data = HttpRequest.list_text[num];
|
||||
list_text = list_text + "<li class=\"screen_list sms5_box\"><span class=\"box_ico\"></span><textarea class=\"sms_textarea box_txt box_square\" readonly onclick=\"emoticon_list.go("+list_data.fo_no+")\">"+list_data.fo_content+"</textarea><textarea id=\"fo_contents_"+list_data.fo_no+"\" style=\"display:none; width:0; height:0\">"+list_data.fo_content+"</textarea><strong class=\"emo_tit\">"+list_data.fo_name+"</strong></li>";
|
||||
});
|
||||
if( !list_text ){
|
||||
list_text = "<li>데이터가 없습니다.</li>";
|
||||
}
|
||||
$emoticon_box.html( list_text );
|
||||
emoticon_list.fn_paging( HttpRequest.page, HttpRequest.total_page );
|
||||
$("#hidden_page").val( HttpRequest.page );
|
||||
}
|
||||
}
|
||||
emoticon_list.loadingEnd(".emo_list"); //로딩 이미지 지움
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#emo_sel").bind("change", function(e){
|
||||
var params = { fg_no : $(this).val() };
|
||||
$search_form[0].reset();
|
||||
$("#hidden_fg_no").val( $(this).val() );
|
||||
emoticon_list.select_page( params, "json" );
|
||||
});
|
||||
$search_form.submit(function(e){
|
||||
e.preventDefault();
|
||||
var $form = $(this),
|
||||
params = $(this).serialize();
|
||||
emoticon_list.select_page( params, "json" );
|
||||
});
|
||||
if( $("#emo_sel").length ){
|
||||
$("#emo_sel").trigger("change");
|
||||
}
|
||||
})(jQuery);
|
||||
</script>
|
||||
@ -1,394 +0,0 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$sms5_skin_url.'/mobile.css">', 0);
|
||||
?>
|
||||
|
||||
<div id="sms5_send" class="new_win">
|
||||
<h1 id="win_title">SMS 보내기</h1>
|
||||
|
||||
<div id="send_write">
|
||||
<form action="<?php echo $action_url?>" onsubmit="return smssend_submit(this);" name="smsform" method="post" autocomplete="off">
|
||||
<input type="hidden" name="token" value="<?php echo $token?>">
|
||||
<input type="hidden" name="mh_hp" value="">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb_id?>">
|
||||
<h2>보낼내용</h2>
|
||||
<div class="sms5_box">
|
||||
<span class="box_ico"></span>
|
||||
<label for="mh_message" id="wr_message_lbl">내용</label>
|
||||
<textarea name="mh_message" id="mh_message" class="box_txt" onkeyup="byte_check('mh_message', 'sms_bytes');"></textarea>
|
||||
<div id="sms_byte"><span id="sms_bytes">0</span> / 80 byte</div>
|
||||
</div>
|
||||
|
||||
<div class="write_inner">
|
||||
<?php if( $mb['mb_id'] ){ //회원 아이디가 있다면 ?>
|
||||
<div id="write_rcv">
|
||||
<strong>수신회원</strong> <?php echo $mb['mb_nick']?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div id="write_reply">
|
||||
<label for="mh_reply">회신번호</label>
|
||||
<input type="text" name="mh_reply" value="<?php echo $member['mb_hp']?>" id="mh_reply" <?php if ($is_admin != 'super') { ?> readonly<?php } ?>>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="write_rsv" class="write_inner">
|
||||
<h2>예약전송</h2>
|
||||
|
||||
<div class="write_floater">
|
||||
<label for="booking_flag"><span class="sound_only">예약전송 </span>사용</label>
|
||||
<input type="checkbox" name="booking_flag" id="booking_flag" value="true" onclick="booking_show()" >
|
||||
</div>
|
||||
|
||||
<select name="mh_by" id="mh_by" disabled>
|
||||
<option value="<?php echo date('Y')?>"><?php echo date('Y')?></option>
|
||||
<option value="<?php echo date('Y')+1?>"><?php echo date('Y')+1?></option>
|
||||
</select> 년
|
||||
<select name="mh_bm" id="mh_bm" disabled>
|
||||
<?php for ($i=1; $i<=12; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('m')==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 월
|
||||
<span class="rsv_line"></span>
|
||||
<select name="mh_bd" id="mh_bd" disabled>
|
||||
<?php for ($i=1; $i<=31; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('d')==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 일
|
||||
<select name="mh_bh" id="mh_bh" disabled>
|
||||
<?php for ($i=0; $i<24; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('H')+1==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 시
|
||||
<select name="mh_bi" id="mh_bi" disabled>
|
||||
<?php for ($i=0; $i<=59; $i+=5) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>"><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select> 분
|
||||
</div>
|
||||
|
||||
<div class="write_inner">
|
||||
<div id="write_sc" class="write_scemo">
|
||||
<button type="button" id="scemo_sc" class="scemo_btn">특수기호</button>
|
||||
<div class="scemo_list scemo_sc">
|
||||
<div class="list_closer"><button type="button" class="list_closer_btn">특수기호닫기</button></div>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('■')">■</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('□')">□</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▣')">▣</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◈')">◈</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◆')">◆</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◇')">◇</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♥')">♥</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♡')">♡</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('●')">●</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('○')">○</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▲')">▲</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▼')">▼</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▶')">▶</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▷')">▷</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◀')">◀</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('◁')">◁</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☎')">☎</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☏')">☏</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♠')">♠</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♤')">♤</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♣')">♣</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♧')">♧</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('★')">★</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☆')">☆</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☞')">☞</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☜')">☜</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('▒')">▒</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('⊙')">⊙</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('㈜')">㈜</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('№')">№</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('㉿')">㉿</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♨')">♨</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('™')">™</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('℡')">℡</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('∑')">∑</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('∏')">∏</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♬')">♬</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♪')">♪</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♩')">♩</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♭')">♭</button>
|
||||
<div class="list_closer"><button type="button" class="list_closer_btn">특수기호닫기</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="write_emo" class="write_scemo">
|
||||
<button type="button" id="scemo_emo" class="scemo_btn">이모티콘</button>
|
||||
<div class="scemo_list scemo_emo">
|
||||
<div class="list_closer"><button type="button" class="list_closer_btn">이모티콘닫기</button></div>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('*^^*')">*^^*</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('♡.♡')">♡.♡</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('@_@')">@_@</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('☞_☜')">☞_☜</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('ㅠ ㅠ')">ㅠ ㅠ</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('Θ.Θ')">Θ.Θ</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('^_~♥')">^_~♥</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('~o~')">~o~</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('★.★')">★.★</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('(!.!)')">(!.!)</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('⊙.⊙')">⊙.⊙</button>
|
||||
<button type="button" class="scemo_add" onclick="javascript:add('q.p')">q.p</button>
|
||||
<button type="button" class="scemo_add emo_long" onclick="javascript:add('↖(^-^)↗')">↖(^-^)↗</button>
|
||||
<button type="button" class="scemo_add emo_long" onclick="javascript:add('(*^-^*)')">(*^-^*)</button>
|
||||
<button type="button" class="scemo_add emo_long" onclick="javascript:add('d(^-^)b')">d(^-^)b</button>
|
||||
<div class="list_closer"><button type="button" class="list_closer_btn">이모티콘닫기</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="win_btn">
|
||||
<input type="submit" value="전송" class="btn_submit">
|
||||
<button type="button" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if( count($emoticon_group) ){ //회원에게 공개된 이모티콘 그룹이 있다면 ?>
|
||||
<div id="send_emo">
|
||||
<h2>이모티콘 목록</h2>
|
||||
<form name="emoticon_form">
|
||||
<label for="emo_sel" class="sound_only">이모티콘 그룹</label>
|
||||
<select name="fg_no" id="emo_sel">
|
||||
<option value="" <?php echo $fg_no?'':'selected'?>>전체</option>
|
||||
<?php for($i=0; $i<count($emoticon_group); $i++) {?>
|
||||
<option value="<?php echo $emoticon_group[$i]['fg_no']?>"<?php echo ($fg_no==$emoticon_group[$i]['fg_no'])?'selected':''?>><?php echo $emoticon_group[$i]['fg_name']?> (<?php echo number_format($emoticon_group[$i]['fg_count'])?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<ul class="emo_list">
|
||||
</ul>
|
||||
|
||||
<nav class="pg_wrap">
|
||||
<span class="pg" id="emoticon_pg"></span>
|
||||
</nav>
|
||||
|
||||
<form name="emoticon_search" id="emoticon_search">
|
||||
<input type="hidden" name="page" id="hidden_page" >
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function sms_error(obj, err) {
|
||||
alert(err);
|
||||
obj.value = '';
|
||||
}
|
||||
|
||||
function smssend_submit(f)
|
||||
{
|
||||
if (!f.mh_message.value)
|
||||
{
|
||||
alert('보내실 문자를 입력하십시오.');
|
||||
f.mh_message.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!f.mh_reply.value)
|
||||
{
|
||||
alert('발신 번호를 입력하십시오.\n\n발신 번호는 회원정보의 휴대폰번호입니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
//f.submit();
|
||||
//win.focus();
|
||||
}
|
||||
|
||||
function booking_show()
|
||||
{
|
||||
if (document.getElementById('booking_flag').checked) {
|
||||
document.getElementById('mh_by').disabled = false;
|
||||
document.getElementById('mh_bm').disabled = false;
|
||||
document.getElementById('mh_bd').disabled = false;
|
||||
document.getElementById('mh_bh').disabled = false;
|
||||
document.getElementById('mh_bi').disabled = false;
|
||||
} else {
|
||||
document.getElementById('mh_by').disabled = true;
|
||||
document.getElementById('mh_bm').disabled = true;
|
||||
document.getElementById('mh_bd').disabled = true;
|
||||
document.getElementById('mh_bh').disabled = true;
|
||||
document.getElementById('mh_bi').disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function add(str) {
|
||||
var conts = document.getElementById('mh_message');
|
||||
var bytes = document.getElementById('sms_bytes');
|
||||
conts.focus();
|
||||
conts.value+=str;
|
||||
byte_check('mh_message', 'sms_bytes');
|
||||
return;
|
||||
}
|
||||
|
||||
function byte_check(mh_message, sms_bytes)
|
||||
{
|
||||
var conts = document.getElementById(mh_message);
|
||||
var bytes = document.getElementById(sms_bytes);
|
||||
|
||||
var i = 0;
|
||||
var cnt = 0;
|
||||
var exceed = 0;
|
||||
var ch = '';
|
||||
|
||||
for (i=0; i<conts.value.length; i++)
|
||||
{
|
||||
ch = conts.value.charAt(i);
|
||||
if (escape(ch).length > 4) {
|
||||
cnt += 2;
|
||||
} else {
|
||||
cnt += 1;
|
||||
}
|
||||
}
|
||||
|
||||
bytes.innerHTML = cnt;
|
||||
|
||||
if (cnt > 80)
|
||||
{
|
||||
exceed = cnt - 80;
|
||||
alert('메시지 내용은 80바이트를 넘을수 없습니다.\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 > 80) {
|
||||
tmp = tmp.substring(0,i);
|
||||
break;
|
||||
} else {
|
||||
xcnt = tcnt;
|
||||
}
|
||||
}
|
||||
conts.value = tmp;
|
||||
bytes.innerHTML = xcnt;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
byte_check('mh_message', 'sms_bytes');
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL?>/jquery.sms_paging.js"></script>
|
||||
<script>
|
||||
var emoticon_list = {
|
||||
go : function(fo_no){
|
||||
var wr_message = document.getElementById('mh_message');
|
||||
|
||||
//wr_message.focus();
|
||||
wr_message.value = document.getElementById('fo_contents_' + fo_no).value;
|
||||
|
||||
byte_check('mh_message', 'sms_bytes');
|
||||
}
|
||||
};
|
||||
(function($){
|
||||
$(".box_txt").bind("focus keydown", function(){
|
||||
$("#wr_message_lbl").hide();
|
||||
});
|
||||
|
||||
var $search_form = $("form#emoticon_search");
|
||||
emoticon_list.fn_paging = function( hash_val,total_page ){
|
||||
$('#emoticon_pg').paging({
|
||||
current:hash_val ? hash_val : 1,
|
||||
max:total_page == 0 || total_page ? total_page : 45,
|
||||
length : 5,
|
||||
liitem : 'span',
|
||||
format:'{0}',
|
||||
next:'next',
|
||||
prev:'prev',
|
||||
first:'<<',last:'>>',
|
||||
href:'#',
|
||||
itemCurrent:'pg_current',
|
||||
itemClass:'pg_page',
|
||||
appendhtml:'<span class="sound_only">페이지</span>',
|
||||
onclick:function(e,page){
|
||||
e.preventDefault();
|
||||
$("#hidden_page").val( page );
|
||||
var params = $($search_form).serialize();
|
||||
emoticon_list.select_page( params, "json" );
|
||||
}
|
||||
});
|
||||
}
|
||||
emoticon_list.loading = function( el, src ){
|
||||
if( !el || !src) return;
|
||||
$(el).append("<span class='tmp_loading'><img src='"+src+"' title='loading...' ></span>");
|
||||
}
|
||||
emoticon_list.loadingEnd = function( el ){
|
||||
$(".tmp_loading", $(el)).remove();
|
||||
}
|
||||
emoticon_list.select_page = function( params, type ){
|
||||
if( !type ){
|
||||
type = "json";
|
||||
}
|
||||
emoticon_list.loading(".emo_list", "<?php echo $sms5_skin_url?>/img/ajax-loader.gif" ); //로딩 이미지 보여줌
|
||||
$.ajax({
|
||||
url: "./ajax.sms_emoticon.php",
|
||||
cache:false,
|
||||
timeout : 30000,
|
||||
dataType:type,
|
||||
data:params,
|
||||
success: function(HttpRequest) {
|
||||
if( type == "json" ){
|
||||
if (HttpRequest.error) {
|
||||
alert(HttpRequest.error);
|
||||
return false;
|
||||
} else {
|
||||
var $emoticon_box = $(".emo_list");
|
||||
var list_text = "";
|
||||
$.each( HttpRequest.list_text , function(num) {
|
||||
var list_data = HttpRequest.list_text[num];
|
||||
list_text = list_text + "<li class=\"screen_list\"><div class=\"sms5_box\"><span class=\"box_ico\"></span><textarea class=\"sms_textarea box_txt box_square\" readonly onclick=\"emoticon_list.go("+list_data.fo_no+")\">"+list_data.fo_content+"</textarea><textarea id=\"fo_contents_"+list_data.fo_no+"\" style=\"display:none; width:0; height:0\">"+list_data.fo_content+"</textarea><strong class=\"emo_tit\">"+list_data.fo_name+"</strong></div></li>";
|
||||
});
|
||||
if( !list_text ){
|
||||
list_text = "<li>데이터가 없습니다.</li>";
|
||||
}
|
||||
$emoticon_box.html( list_text );
|
||||
emoticon_list.fn_paging( HttpRequest.page, HttpRequest.total_page );
|
||||
$("#hidden_page").val( HttpRequest.page );
|
||||
}
|
||||
}
|
||||
emoticon_list.loadingEnd(".emo_list"); //로딩 이미지 지움
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#emo_sel").bind("change", function(e){
|
||||
var params = { fg_no : $(this).val() };
|
||||
$search_form[0].reset();
|
||||
$("#hidden_fg_no").val( $(this).val() );
|
||||
emoticon_list.select_page( params, "json" );
|
||||
});
|
||||
$search_form.submit(function(e){
|
||||
e.preventDefault();
|
||||
var $form = $(this),
|
||||
params = $(this).serialize();
|
||||
emoticon_list.select_page( params, "json" );
|
||||
});
|
||||
if( $("#emo_sel").length ){
|
||||
$("#emo_sel").trigger("change");
|
||||
}
|
||||
|
||||
$(".scemo_btn").click(function(){
|
||||
var scemoid = $(this).attr("id");
|
||||
$(this).hide();
|
||||
$(".scemo_list").hide();
|
||||
$("."+scemoid).show();
|
||||
});
|
||||
$(".list_closer_btn").click(function(){
|
||||
$(".scemo_btn").show();
|
||||
$(".scemo_list").hide();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
@ -1,75 +0,0 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
if(!$config['cf_sms_use'])
|
||||
alert_close('문자보내기를 이용하실 수 없습니다.');
|
||||
|
||||
if( !$sms5['bo_skin'] ){
|
||||
$sms5['bo_skin'] = "basic";
|
||||
}
|
||||
|
||||
$err = null;
|
||||
|
||||
if (!$mb_id){
|
||||
$err = "받는회원 아이디가 넘어오지 않았습니다.";
|
||||
alert_close($err);
|
||||
}
|
||||
if (!$sms5['cf_member']){
|
||||
$err = "문자전송이 허용되지 않았습니다.\\n\\n사이트 관리자에게 문의하여 주십시오.";
|
||||
alert_close($err);
|
||||
}
|
||||
if (!$err and !$is_member){
|
||||
$err = "로그인 해주세요.";
|
||||
alert_close($err);
|
||||
}
|
||||
if (!$err and $member['mb_level'] < $sms5['cf_level']){
|
||||
$err = "회원 {$sms5['cf_level']} 레벨 이상만 문자전송이 가능합니다.";
|
||||
alert_close($err);
|
||||
}
|
||||
// 오늘 문자를 보낸 총 건수
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['sms5_member_history_table']} where mb_id='{$member['mb_id']}' and date_format(mh_datetime, '%Y-%m-%d') = '".G5_TIME_YMD."' ");
|
||||
$total = $row['cnt'];
|
||||
|
||||
// 건수 제한
|
||||
if (!$err and $sms5['cf_day_count'] > 0 && $is_admin != 'super') {
|
||||
if ($total >= $sms5['cf_day_count']) {
|
||||
$err = "하루에 보낼수 있는 문자갯수(".number_format($sms5['cf_day_count'])." 건)를 초과하였습니다.";
|
||||
alert_close($err);
|
||||
}
|
||||
}
|
||||
|
||||
// 포인트 검사
|
||||
if (!$err and $sms5['cf_point'] > 0 && $is_admin != 'super') {
|
||||
if ($sms5['cf_point'] > $member['mb_point']) {
|
||||
$err = "보유하신 포인트(".number_format($member['mb_point'])." 포인트)가 없거나 모자라서\\n\\n문자전송(".number_format($sms5['cf_point'])." 포인트)이 불가합니다.\\n\\n포인트를 적립하신 후 다시 시도 해 주십시오.";
|
||||
alert_close($err);
|
||||
}
|
||||
}
|
||||
|
||||
// 특정회원에게 문자 전송
|
||||
if ($mb_id) {
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_hp']) alert_close("회원 휴대폰번호가 없습니다.");
|
||||
if (!$mb['mb_open']) alert_close("정보를 공개하지 않았습니다.");
|
||||
if (!$mb['mb_sms']) alert_close("SMS 수신여부가 비활성화 되어 있습니다.");
|
||||
//$hp = $mb['mb_hp'];
|
||||
}
|
||||
|
||||
$g5['title'] = "문자전송";
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$emoticon_group = array();
|
||||
$qry = sql_query("select * from {$g5['sms5_form_group_table']} where fg_member = 1 order by fg_name");
|
||||
while ($res = sql_fetch_array($qry)) array_push($emoticon_group, $res);
|
||||
|
||||
$action_url = "./write_update.php";
|
||||
|
||||
if( G5_IS_MOBILE ){
|
||||
$write_skin_page = "/write_mobile.skin.php";
|
||||
} else {
|
||||
$write_skin_page = "/write.skin.php";
|
||||
}
|
||||
include_once ($sms5_skin_path.$write_skin_page);
|
||||
echo PHP_EOL.'<!-- skin : '.$sms5['bo_skin'].' -->'.PHP_EOL;
|
||||
?>
|
||||
@ -1,170 +0,0 @@
|
||||
<?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))
|
||||
die("올바른 방법으로 사용해 주십시오.");
|
||||
|
||||
if (!$sms5['cf_member'])
|
||||
die("문자전송이 허용되지 않았습니다. 사이트 관리자에게 문의하여 주십시오.");
|
||||
|
||||
if (!$is_member)
|
||||
die("로그인 해주세요.");
|
||||
|
||||
if ($member['mb_level'] < $sms5['cf_level'])
|
||||
alert("회원 {$sms5['cf_level']}레벨 이상만 문자전송이 가능합니다.");
|
||||
|
||||
$mh_reply = preg_replace('#[^0-9\-]#', '', trim($mh_reply));
|
||||
$mh_message = clean_xss_tags(trim($mh_message));
|
||||
|
||||
if (!$mh_reply)
|
||||
alert('보내는 번호를 입력해주세요.');
|
||||
|
||||
if (!$mh_message)
|
||||
alert('메세지를 입력해주세요.');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
{
|
||||
$mh_reply = get_hp($mh_reply, 0);
|
||||
if (!$mh_reply)
|
||||
alert("보내는 번호가 올바르지 않습니다.");
|
||||
}
|
||||
else
|
||||
{
|
||||
$mh_reply = str_replace("-", "", $mh_reply);;
|
||||
if (!check_string($mh_reply, G5_NUMERIC))
|
||||
alert("보내는 번호가 올바르지 않습니다.");
|
||||
}
|
||||
|
||||
$mh_hp = explode(',', $mh_hp);
|
||||
|
||||
if ($mb_id) {
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_sms'] || !$mb['mb_open']) {
|
||||
alert("정보를 공개하지 않았습니다.");
|
||||
}
|
||||
if( $mb['mb_hp'] ){
|
||||
array_push( $mh_hp, $mb['mb_hp'] );
|
||||
}
|
||||
}
|
||||
|
||||
if (!count($mh_hp))
|
||||
alert('받는 번호를 입력해주세요.');
|
||||
|
||||
// 핸드폰 번호만 걸러낸다.
|
||||
$tmp = array();
|
||||
for ($i=0; $i<count($mh_hp); $i++)
|
||||
{
|
||||
$hp = trim($mh_hp[$i]);
|
||||
$hp = get_hp($hp);
|
||||
|
||||
if ($hp)
|
||||
$tmp[]['bk_hp'] = get_hp($hp, 0);
|
||||
}
|
||||
$mh_hp = $tmp;
|
||||
|
||||
$total = count($mh_hp);
|
||||
|
||||
// 건수 제한
|
||||
if ($sms5['cf_day_count'] > 0 && $is_admin != 'super') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['sms5_member_history_table']} where mb_id='{$member['mb_id']}' and date_format(mh_datetime, '%Y-%m-%d') = '".G5_TIME_YMD."' ");
|
||||
if ($row['cnt'] + $total > $sms5['cf_day_count']) {
|
||||
alert("하루에 보낼수 있는 문자갯수(".number_format($sms5['cf_day_count']).")를 초과하였습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
// 포인트 검사
|
||||
if ($sms5['cf_point'] > 0 && $is_admin != 'super') {
|
||||
$minus_point = $sms5['cf_point'] * $total;
|
||||
if ($minus_point > $member['mb_point'])
|
||||
alert("보유하신 포인트(".number_format($member['mb_point']).")가 없거나 모자라서 문자전송(".number_format($minus_point).")이 불가합니다.\\n\\n포인트를 적립하신 후 다시 시도 해 주십시오.");
|
||||
} else
|
||||
$minus_point = 0;
|
||||
|
||||
// 예약전송
|
||||
if ($mh_by && $mh_bm && $mh_bd && $mh_bh && $mh_bi) {
|
||||
$mh_booking = "$mh_by-$mh_bm-$mh_bd $mh_bh:$mh_bi:00";
|
||||
$booking = $mh_by.$mh_bm.$mh_bd.$mh_bh.$mh_bi;
|
||||
} else {
|
||||
$mh_booking = '';
|
||||
$booking = '';
|
||||
}
|
||||
|
||||
$SMS = new SMS5;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
|
||||
$mh_message = conv_unescape_nl($mh_message);
|
||||
|
||||
$result = $SMS->Add($mh_hp, $mh_reply, '', '', $mh_message, $booking, $total);
|
||||
|
||||
$is_success = null;
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$result = $SMS->Send();
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
foreach ($SMS->Result as $result)
|
||||
{
|
||||
list($hp, $code) = explode(":", $result);
|
||||
|
||||
if (substr($code,0,5) == "Error")
|
||||
{
|
||||
$is_success = false;
|
||||
|
||||
switch (substr($code,6,2)) {
|
||||
case '02': // "02:형식오류"
|
||||
$mh_log = "형식이 잘못되어 전송이 실패하였습니다.";
|
||||
break;
|
||||
case '23': // "23:인증실패,데이터오류,전송날짜오류"
|
||||
$mh_log = "데이터를 다시 확인해 주시기바랍니다.";
|
||||
break;
|
||||
case '97': // "97:잔여코인부족"
|
||||
$mh_log = "잔여코인이 부족합니다.";
|
||||
break;
|
||||
case '98': // "98:사용기간만료"
|
||||
$mh_log = "사용기간이 만료되었습니다.";
|
||||
break;
|
||||
case '99': // "99:인증실패"
|
||||
$mh_log = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$mh_log = "알 수 없는 오류로 전송이 실패하었습니다.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_success = true;
|
||||
$mh_log = "문자전송:".get_hp($hp, 1);
|
||||
}
|
||||
|
||||
$hp = get_hp($hp, 1);
|
||||
$log = array_shift($SMS->Log);
|
||||
sql_query("insert into {$g5['sms5_member_history_table']} set mb_id='{$member['mb_id']}', mh_reply='$mh_reply', mh_hp='$hp', mh_datetime='".G5_TIME_YMDHIS."', mh_booking='$mh_booking', mh_log='$mh_log', mh_ip='".$_SERVER['REMOTE_ADDR']."'");
|
||||
|
||||
if ($is_admin == 'super')
|
||||
$sms5['cf_point'] = 0;
|
||||
|
||||
if ($is_success)
|
||||
insert_point($member['mb_id'], (-1) * $sms5['cf_point'], "$mh_log");
|
||||
|
||||
}
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
}
|
||||
else alert("에러: SMS 서버와 통신이 불안정합니다.");
|
||||
}
|
||||
else alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다.");
|
||||
|
||||
alert_close("$total 건의 문자메세지 전송을 완료하였습니다.");
|
||||
?>
|
||||
Reference in New Issue
Block a user