This commit is contained in:
kdh0120 2020-12-03 00:00:31 +00:00
parent f3c87487e1
commit e98814ced9
11 changed files with 59 additions and 7 deletions

View File

@ -354,7 +354,7 @@ namespace NP.BO.Controllers
smstype = "A",
isok = string.IsNullOrEmpty(u.mobile) ? -1 : 1,
mobile = (u.mobile ?? "").Replace("-", ""),
mcontents = string.Format("영남건설기술교육원입니다.\n\n{0}님이 수강중인 [{1}] 자격검정이 [{2}]에 {3}에서 이뤄질 예정입니다.\n\n☞사이트: https://edu.kfcf.or.kr",
mcontents = string.Format("영남건설기술교육원입니다.\n\n{0}님이 신청중인 [{1}] 자격검정이 [{2}]에 {3}에서 이뤄질 예정입니다.\n\n☞사이트: https://edu.kfcf.or.kr",
u.username, u.cname, u.stime.ToString("yyyy-MM-dd HH:mm"),u.place)
});
}

View File

@ -465,7 +465,7 @@ namespace NP.Base.Controllers
Random r = new Random();
int lakey = r.Next(100000, 999999);
SmsAuth sa = new SmsAuth() { lakey = lakey.ToString(),lectno=lectno };
String msg = "영남건설기술교육원 입니다.\n 회원님의 인증번호는 :\t" + lakey + "\t 입니다.";
String msg = "[영남건설기술교육원]\n\n영남건설기술교육원 인증번호 [" + lakey + "] 입니다.";
var users = Dao.Get<Users>("users.findme", new Hashtable() { { "mobile", mobile } }).ToList();
if(users.Count() == 0)
{
@ -476,7 +476,7 @@ namespace NP.Base.Controllers
return JsonBack(new JsonRtn() { code = -1 });
}
Dao.Insert("common.smsauth", sa);
//Dao.Insert("common.sms.send", new Hashtable() { { "CMID", result }, { "DEST_PHONE", mobile.Replace(" ", "").Replace("-", "") }, { "SEND_PHONE", "0260051004" }, { "MSG_BODY", msg } });
Dao.Insert("common.atalk.send", new Hashtable() { { "senderkey", GetConfig("mastersms").Split(';')[0] },{"method","alarm" }, { "DEST_PHONE", mobile.Replace(" ", "").Replace("-", "") }, { "SEND_PHONE", GetConfig("mastersms").Split(';')[1] },{"title","인증번호" }, { "MSG_BODY", msg },{"replace_type","S" } });
return JsonOK(sa.authno);
}
[HttpPost]

View File

@ -1 +1 @@
360ee404857251438cfed673dada16fc24819b88
eca8cda3d1a6996c6a1890f7ee38a0835275ba74

View File

@ -489,5 +489,9 @@
set latime = now()
where authno = #authno#
</update>
<insert id ="common.atalk.send" parameterClass="hashtable">
insert into MTS_ATALK_MSG (TRAN_SENDER_KEY,TRAN_TMPL_CD,TRAN_CALLBACK,TRAN_PHONE,TRAN_SUBJECT,TRAN_MSG,TRAN_DATE,TRAN_TYPE,TRAN_STATUS,TRAN_REPLACE_TYPE,TRAN_REPLACE_MSG)
values (#senderkey#,#method#,#SEND_PHONE#,#DEST_PHONE#,#title#,#MSG_BODY#,now(),5,'1',#replace_type#,#MSG_BODY#);
</insert>
</statements>
</sqlMap>

View File

@ -53,6 +53,7 @@ namespace NP.FO.Controllers
public ActionResult Innings()
{
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
ViewBag.Mobile = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault().mobile;
if (vm.LectInnings.Count() > 0 && vm.LectInnings.First().isrebate == 1)
{
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "isfinishtoday", 1 } }).Count();

View File

@ -3,7 +3,6 @@
}
<div class="lctcScore">
<input type="hidden" id="mobile" name="mobile" value="@(ViewBag.Mobile)" />
<input type="hidden" id="mobile" name="mobile" value="@(ViewBag.Mobile)" />
<div class="lctCont">
<h5>나의성적</h5>

View File

@ -6,6 +6,7 @@
<a href="#" onclick="showatt()">출결이력조회</a>
</div>
<div class="lctcWeek lrnList">
<input type="hidden" id="mobile" name="mobile" value="@(ViewBag.Mobile)" />
<table>
<tbody>
@foreach (var d in Model.LectInnings)
@ -122,11 +123,14 @@
</div>
</div>
</div>
@Html.Partial("./Partial/MobileChk", null, new ViewDataDictionary { { "bindmethod", "cbchkmobile" } })
@section scriptsHeader{
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">}
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
}
@section scripts{
<script>
var _cmino = 0;
$(document).ready(function () {
$("body").on("click", ".atdOpen", function () {
var atdNum = $(this).attr('atdOpen');
@ -150,7 +154,50 @@
} else if (notoverflag < 1) {
msg("일일 최대 학습회차는 6차시입니다.");
} else {
viewcontents(cmino, false, @Model.croomlectno);
_cmino = cmino;
chkcontent();
//viewcontents(cmino, false, @Model.croomlectno);
}
}
function chkcontent() {
capp("/fcommon/attcertcheck", {lectno : @Model.croomlectno}, "cbchkcontent");
}
function cbchkcontent() {
if (capResult.code == 1000) {
if (capResult.obj == 1) {
viewcontents(_cmino, false,@Model.croomlectno);
} else if (capResult.obj == 2) {
viewcontents(_cmino, false,@Model.croomlectno);
} else {
confirmtoggle(true, "해당 과정의 학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 1회에 한 해 진행됩니다.<br/> 본인인증을 하시겠습니까?","chkmobile()");
//confirmtoggle(true, "해당 과정의 학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 1회에 한 해 진행됩니다.<br/> 본인인증을 하시겠습니까?","showpop()");
//confirmtoggle(true, "해당 과정의 학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 1회에 한 해 진행됩니다.<br/> 본인인증을 하시겠습니까?","mobilechkview('MOBI')");
}
} else {
msg("휴대폰 번호가 공란입니다.<br/>정보수정을 통해 번호를 입력해주세요.");
}
}
function chkmobile() {
setv("mobile", val("mobile").replace(/ /, '').replace(/ /, ''));
setv("mobile", formatmobile(val("mobile")));
if (!ismobilenumber(val("mobile"))) {
focus("mobile");
msg("핸드폰번호를 확인해주세요.");
} else {
capp("/focommon/sendlakey", { lectno: @Model.croomlectno, mobile: $("#mobile").val()}, "sendkey");
}
}
function cbchkmobile() {
if (capResult.code == 1000) {
//msg("인증이 성공하였습니다.\n 확인 버튼을 클릭하시면 학습이 가능합니다.");
$("#mobile").css("background", "#ddd");
mobilechkclose();
viewcontents(_cmino, false,@Model.croomlectno);
} else if (capResult.code == 1) {
msg("유효시간이 만료되었습니다.\n 창을 닫고 인증을 다시 진행해주세요.");
} else {
msg("인증이 실패하였습니다.\n 다시 확인해주세요.");
}
}
function lctpTab(num) {

View File

@ -36,6 +36,7 @@
<add key="reporturl" value="http://ynicter.nptc.kr" />
<!--<add key="masteremail" value="edu@ynicte.or.kr;mail.ynicte.or.kr;25;ynicte@ynicte.or.kr;k7758870!%" />-->
<add key="masteremail" value="yicte@cte.or.kr;smtp.daum.net;465;yicte2020;yicte04003" />
<add key="mastersms" value="10d3158b52019fa6b7e5563b1e35cf8c48a8caf9;15447660" />
<add key="usessl" value="Y" />
<add key="ssonoauth" value="Y" />
<add key="daokey" value="ynictelms2020" />