diff --git a/Base/Controller/FCommonCRoom.cs b/Base/Controller/FCommonCRoom.cs index a7d3a79..228fb63 100644 --- a/Base/Controller/FCommonCRoom.cs +++ b/Base/Controller/FCommonCRoom.cs @@ -159,7 +159,7 @@ namespace NP.Base.Controllers return JsonOK(Dao.Save("cr.lectsdboardcmt.del", new Hashtable() { { "bcno", bcno }, { "cno", SUserInfo.UserNo }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } [HttpPost] - public JsonResult AttCertCheck(int lectno) + public JsonResult AttCertCheck(long lectno) { var data = Dao.Get("lect.attcert.check", new Hashtable() { { "lectno", lectno } }).FirstOrDefault(); if (data.intval2 == 1 || data.intval3 == 1) @@ -183,6 +183,34 @@ namespace NP.Base.Controllers } } [HttpPost] + public JsonResult AttCertCheckForLectinning(long lectno, long cmino) + { + var data = Dao.Get("lect.lectinning.attcert.check", new Hashtable() { { "lectno", lectno }, { "cmino", cmino }, {"userno", SUserInfo.UserNo } }).FirstOrDefault(); + if (data.intval2 == 1 || data.intval3 == 1) + { + //intval2 출석인증제외 회원, intval3 출석인증제외 강좌 + return JsonBack(new JsonRtn() { code = 1000, obj = 1 }); + } + else + { + //출석인증 + if (data.intval == 1) + { + return JsonBack(new JsonRtn() { code = 1000, obj = 2 }); + } + //핸드폰인증인데 핸드폰번호가 없는경우(에러) + if ( string.IsNullOrEmpty(data.strval) && data.strval2 == "2") + { + return JsonBack(new JsonRtn() { code = -1 }); + } + else + { + //data.strval2 <- authplatform 1:IPIN, 2:Mobile + return JsonBack(new JsonRtn() { code = 1000, obj = 3, msg = data.strval2 }); + } + } + } + [HttpPost] public JsonResult LectComplete(Int64 lectno) { var ispass = Dao.Get("grade.ispass", new Hashtable() { { "lectno", lectno } } ).FirstOrDefault().ispass; diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs index d20285b..bd4704e 100644 --- a/Base/Controller/FOCommon.cs +++ b/Base/Controller/FOCommon.cs @@ -555,12 +555,44 @@ namespace NP.Base.Controllers } else if (datas.Where(w => w.strval.Replace(" ", "").Equals(lakey.Replace(" ", "")) && w.time.AddMinutes(3) >= DateTime.Now).Count() > 0) { - Dao.Save("lect.isatt.in", new System.Collections.Hashtable() { { "lectno", datas.FirstOrDefault().intval2 }, { "lakey", datas.FirstOrDefault().strval } }); - return JsonBack(new JsonRtn() { code = 1000, obj = datas.First() }); + Dao.Save("lect.isatt.in", new System.Collections.Hashtable() { { "lectno", datas.FirstOrDefault().intval2 }, { "lakey", datas.FirstOrDefault().strval } }); + return JsonBack(new JsonRtn() { code = 1000, obj = datas.First() }); } return JsonOK(0); } [HttpPost] + public JsonResult ChkLakeyForLectinning(String lakey, int authno, long cmino) + { + IList datas = Dao.Get("common.sms.chk", new Hashtable() { { "authno", authno } }); + if (datas.Count() < 1) + { + return JsonOK(0); + } + else if (datas.Where(w => w.strval.Replace(" ", "").Equals(lakey.Replace(" ", "")) && w.time.AddMinutes(3) < DateTime.Now).Count() > 0) + { + return JsonBack(new JsonRtn() { code = 1 }); + } + else if (datas.Where(w => w.strval.Replace(" ", "").Equals(lakey.Replace(" ", "")) && w.time.AddMinutes(3) >= DateTime.Now).Count() > 0) + { + var lectno = datas.FirstOrDefault().intval2; + var lectInnings = Dao.Get("cr.cminnings", new System.Collections.Hashtable() { { "lectno", lectno }, { "userno", SUserInfo.UserNo } }); + if (lectInnings.Where(w => w.cmino == cmino).Count() > 0) + { + var Hashtable = new System.Collections.Hashtable() { + { "lectno", lectno }, + { "cmino", cmino }, + { "isattcheck", 1 }, + { "userno", SUserInfo.UserNo }, + { "uno", SUserInfo.UserNo }, + { "uip", GetUserIP() } + }; + Dao.Save("lect.lectinning.isatt.in", Hashtable); + return JsonBack(new JsonRtn() { code = 1000, obj = datas.First() }); + } + } + return JsonOK(0); + } + [HttpPost] public JsonResult PageLearningTotalTime(Int64 lectno, Int64 cmino, int cpno) { if (SUserInfo.UserNo > 0) diff --git a/Dao/DB/DB1.Scheme.txt b/Dao/DB/DB1.Scheme.txt index de858a4..1f764eb 100644 --- a/Dao/DB/DB1.Scheme.txt +++ b/Dao/DB/DB1.Scheme.txt @@ -1071,7 +1071,7 @@ create table lectinning ( ,pseq tinyint not null default 1 ,psec smallint ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL - ,isauth TINYINT(4) NOT NULL DEFAULT 0, + ,isattcheck TINYINT(4) NOT NULL DEFAULT 0, ,primary key(lectno,cmino)); create table lectinningpage ( diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index 437f960..0064fa7 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -1499,6 +1499,16 @@ inner join cm c on c.cmno = a.cmno where a.lectno = #lectno# +
-

휴대폰 인증

I-PIN 인증으로 변경 +

휴대폰 인증

I-PIN 인증으로 변경
@@ -104,7 +104,7 @@ @if(u.authplatform == AuthPlatform.Mobile) { -

@(u.mobile)

수정 +

@(u.mobile)

수정 } else { diff --git a/FO/Views/Shared/Partial/MobileChk.cshtml b/FO/Views/Shared/Partial/MobileChk.cshtml index 08c5ee2..a8afe15 100644 --- a/FO/Views/Shared/Partial/MobileChk.cshtml +++ b/FO/Views/Shared/Partial/MobileChk.cshtml @@ -96,6 +96,6 @@ } } function chklakey() { - capp("/focommon/chklakey", { lakey: $("#mobile_lakey").val(), authno: authno }, "@(_method)"); + capp("/focommon/chklakeyforlectinning", { lakey: $("#mobile_lakey").val(), authno: authno, cmino:_cmino }, "@(_method)"); } \ No newline at end of file diff --git a/FO/Views/Shared/Partial/OkCert3.cshtml b/FO/Views/Shared/Partial/OkCert3.cshtml index 70cb2e3..7e4c1c7 100644 --- a/FO/Views/Shared/Partial/OkCert3.cshtml +++ b/FO/Views/Shared/Partial/OkCert3.cshtml @@ -17,8 +17,8 @@ var pop; $(document).ready(function () { }); - function mobilechkview(sel, reason) { - var popupWindow = window.open("/Account/CertOk3Req?sel=" + sel + "&reason=" + reason, "auth_popup", "width=450,height=640,scrollbar=yes,resizable=no"); + function certok3reqview(sel, reason, param1, param2) { + var popupWindow = window.open("/Account/CertOk3Req?sel=" + sel + "&reason=" + reason + (param1 ? "¶m1=" + param1 : "") + (param2 ? "¶m2=" + param2 : ""), "auth_popup", "width=450,height=640,scrollbar=yes,resizable=no"); popupWindow.focus(); } \ No newline at end of file diff --git a/Model/CM.cs b/Model/CM.cs index f9977a0..5dd3f76 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -2960,9 +2960,9 @@ namespace NP.Model public String existslectinning { get; set; } public String cname { get; set; } /// - /// 학습인증여부 (0:미인증,1:인증) + /// 출석인증여부 (0:미인증,1:인증) /// - public int isauth { get; set; } + public int isattcheck { get; set; } } [Serializable]