<%@ include file="../layout/include_header.jsp" %>
<%
// SMS 발송
/*
연동경로[ http://211.233.20.184/MSG/send/web_admin_send.htm ]
결과값|유료잔액|전송수|예약유무|전달값
http://211.233.20.184/MSG/send/web_admin_send.htm?userid=zone841221&passwd=zone841221&sender=01034114505&receiver=01034114505&message=testsms
결과값
코드 9 성공
1 필수전달값이 빠짐
2 존재하지 않는 아이디
3 비밀번호 인증실패 (2차 비밀번호설정 유무 확인)
4 잔액이 충분하지 않음
6 보내는 번호가 잘못됨
7 서비스 이용이 중지된 아이디
11 중복 전송(짧은 시간 같은 내용, 같은 번호로의 전송) *보장되지 않음
12 보내는 번호의 규칙이 틀림(자리수 8자리 이상 11자리 이하)
13 보내는 번호가 사전등록되지 않음
14 국내아이피가 아니거나 사전등록되지 않은 아이피
*/
// 잔액조회
/*
잔액/단가확인방법[ http://211.233.20.184/MSG/send/web_admin_send.htm ]
유료잔액|무료건수|단문단가|장문단가
59296|0|25|50
*/
%>
<%
//String smsInfo = "500000|0|25|50";
String smsInfo = CommonUtil.getSmsInfo();
String resultSmsInfo[] = StringUtil.split(smsInfo, "|");
String balance = resultSmsInfo[0];
String unitPrice = resultSmsInfo[2];
int balanceCount = StringUtil.nullToInteger(balance) / StringUtil.nullToInteger(unitPrice);
String smsInfoTitle = "문자나라 SMS 잔액 [ 잔액: "+balance+" 원, 남은발송건수 : " + balanceCount +" 건 ]";
%>
<%
/************************************************************************
*
* SMS 발송 테스트
*
*************************************************************************/
//int result_sms = 0;
//String sms_result[] = null;
String resultMsg = "";
String sms_message = request.getParameter("sms_message");
String sms_receiver = request.getParameter("sms_receiver");
if(sms_message != null && sms_receiver != null) {
resultMsg = CommonUtil.sendSmsMunjanara(sms_message, sms_receiver);
}
%>
SMS 발송 테스트 ${DateUtil.getDate("HH:mm:ss")} :: SMS 발송 결과 --> <%=resultMsg %>
<%@ include file="../layout/include_footer.jsp" %>