diff --git a/BO/Views/cm/cmreg.cshtml b/BO/Views/cm/cmreg.cshtml
index dcc5341..1269340 100644
--- a/BO/Views/cm/cmreg.cshtml
+++ b/BO/Views/cm/cmreg.cshtml
@@ -39,14 +39,14 @@
@*
*@
+
+ *@
@**@
+
+ *@
}
+
}
else
{
@@ -190,6 +194,12 @@
@Html.Partial("./Partial/Radio", Model.CM.iscertificate, new ViewDataDictionary() { { "valuetext", "1:발행;0:미발행" }, { "checked", Model.CM.iscertificate }, { "name", "CM.iscertificate" } })
+
}
diff --git a/BO/Views/user/ur.cshtml b/BO/Views/user/ur.cshtml
index 96cfd9b..6ebc160 100644
--- a/BO/Views/user/ur.cshtml
+++ b/BO/Views/user/ur.cshtml
@@ -51,6 +51,10 @@
@Html.TextBox("userpno2", (Model.User.userpno ?? "").Length > 12 ? Model.User.userpno.Substring(6, 7) : Model.User.userpno, new { @class = "form-control disp-init int nocomma text-center", @data_zero = "1", @style = "width: 143px;", @maxlength = "7" })
+
}
@@ -74,8 +78,8 @@
@if (Model.viewname == "user")
{
- @Html.HiddenFor(w=>w.User.birthday)
- @*@Html.Partial("./Partial/Date", Model.User.birthday == null ? (DateTime?)null : Convert.ToDateTime(Model.User.birthday), new ViewDataDictionary { { "name", "User.birthday" } })*@
+ @Html.HiddenFor(w => w.User.birthday)
+ @*@Html.Partial("./Partial/Date", Model.User.birthday == null ? (DateTime?)null : Convert.ToDateTime(Model.User.birthday), new ViewDataDictionary { { "name", "User.birthday" } })*@
}
@if (Model.viewname == "user")
{
diff --git a/Base/Controller/ACommonUser.cs b/Base/Controller/ACommonUser.cs
index d02b5a6..06d6e46 100644
--- a/Base/Controller/ACommonUser.cs
+++ b/Base/Controller/ACommonUser.cs
@@ -49,7 +49,7 @@ namespace NP.Base.Controllers
}
if (vm.User.usertype > 91)
{
- vm.User.asno = 288;
+ vm.User.asno = 1;
}
vm.User.mobile = vm.User.MobileFormat;
if (vm.User.userno < 1)
diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs
index 7b325ca..69a7f7f 100644
--- a/Base/Controller/FOCommon.cs
+++ b/Base/Controller/FOCommon.cs
@@ -446,6 +446,51 @@ namespace NP.Base.Controllers
}
return JsonOK(0);
}
+
+ [HttpPost]
+ public JsonResult SendLakey(Int64 lectno, String mobile)
+ {
+ 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 입니다.";
+ var users = Dao.Get("users.findme", new Hashtable() { { "mobile", mobile } }).ToList();
+ if(users.Count() == 0)
+ {
+ return JsonBack(new JsonRtn() { code = -2 });
+ }
+ if(users.Count() != 1)
+ {
+ 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 } });
+ return JsonOK(sa.authno);
+ }
+ [HttpPost]
+ public JsonResult ExtendLakey(int authno)
+ {
+ return JsonOK(Dao.Save("common.sms.extend", new Hashtable() { { "authno", authno } }));
+ }
+ [HttpPost]
+ public JsonResult ChkLakey(String lakey, int authno)
+ {
+ 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)
+ {
+ 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);
+ }
}
}
\ No newline at end of file
diff --git a/Dao/DB/DB1.Scheme.txt b/Dao/DB/DB1.Scheme.txt
index b18fcd7..46b1357 100644
--- a/Dao/DB/DB1.Scheme.txt
+++ b/Dao/DB/DB1.Scheme.txt
@@ -1466,3 +1466,8 @@ create table kcblog (
logmsg mediumtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+create table smsauth (
+ lectno bigint(20) NOT NULL,
+ latime datetime NOT NULL DEFAULT current_timestamp(),
+ lakey varchar(6) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
\ No newline at end of file
diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml
index f535f21..6ed86c3 100644
--- a/Dao/MyBatis/Maps/CM.xml
+++ b/Dao/MyBatis/Maps/CM.xml
@@ -131,6 +131,7 @@
,d.cname pcname
,e.ccode,e.cname studyplacename
,f.cnt lectcnt
+ ,a.ischkatt
,a.cdt,a.udt
,a.cmno value,a.cname text
,row_number() over(order by $orderby$a.udt desc) rno
@@ -237,11 +238,11 @@
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape
,infee,outfee,quota
,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
- ,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isdel,isseq,fgnocm,typeman,typeedu,typegrade,typejob,iscertificate,)
+ ,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isdel,isseq,fgnocm,typeman,typeedu,typegrade,typejob,iscertificate,ischkatt,)
values (#ismaster#,#cgno#,#pcmno#,#cname#,#kname#,#tmno#,#classno#,#rstime#,#retime#,#sstime#,#setime#,#gstime#,#getime#,#cshape#
,#infee#,#outfee#,#quota#
,#introhtml#,#targethtml#,#goalhtml#,#contenthtml#
- ,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,);
+ ,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,#ischkatt#,);
SELECT LAST_INSERT_ID()
@@ -279,6 +280,7 @@
,typegrade =#typegrade#
,typejob =#typejob#
,iscertificate =#iscertificate#
+ ,ischkatt =#ischkatt#
where cmno=#cmno#
diff --git a/Dao/MyBatis/Maps/Common.xml b/Dao/MyBatis/Maps/Common.xml
index 14ec5f0..de6cb59 100644
--- a/Dao/MyBatis/Maps/Common.xml
+++ b/Dao/MyBatis/Maps/Common.xml
@@ -8,6 +8,7 @@
+
@@ -473,5 +474,20 @@
where qno=#qno# and authkey=#authkey#;
update question set authkey=null where qno=#qno#
+
+ insert into smsauth(latime,lakey,lectno)
+ values(now(),#lakey#,#lectno#);
+ SELECT LAST_INSERT_ID()
+
+
+
+ update smsauth
+ set latime = now()
+ where authno = #authno#
+
diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml
index e77fad3..7838c0c 100644
--- a/Dao/MyBatis/Maps/Lect.xml
+++ b/Dao/MyBatis/Maps/Lect.xml
@@ -1398,6 +1398,13 @@
set status = 5, oktime = now(), udt = now(), uno = #uno#, uip = #uip#
where cmno = #cmno# and ifnull(isready,0) = 1 and ischanged=0 and status = 4 and DATE_ADD(oktime, INTERVAL 2 DAY) <
+
+ update lect
+ set isattcheck = 1,
+ lakey = #lakey#,
+ latime = now()
+ where lectno = #lectno#
+
diff --git a/Dao/MyBatis/Maps/User.xml b/Dao/MyBatis/Maps/User.xml
index 15551af..6a7014a 100644
--- a/Dao/MyBatis/Maps/User.xml
+++ b/Dao/MyBatis/Maps/User.xml
@@ -237,7 +237,7 @@
,case when c.refcode='9' then a.ccpositionetc else c.cname end ccpositionname
,case when a.usertype=1 then '교육생' when d.authname is null then '-' else d.authname end usertypestr
,CAST(AES_DECRYPT(UNHEX(a.birthday), ) AS char) birthday
- ,a.uduty,a.slevel,a.isacceptmobile,a.vssn
+ ,a.uduty,a.slevel,a.isacceptmobile,a.vssn,a.ischkatt
,row_number() over(order by $orderby$a.username) rno
,count(a.cdt) over() pagetotalcount
from users a
@@ -302,13 +302,13 @@
,asno,pasname,depart,ccposition,ccpositionetc,fgnoprofile,ccjobs
,userpno,bankname,bankno
,post,address1,address2,introhtml,status,logintime,send335time,pwcalltime,pwcallno,eastereggkey,eetime,kfcfyear,isassignuser,edus
- ,isacceptmobile,uduty,slevel,jointype,birthday,snsid,di,ci,vssn,)
+ ,isacceptmobile,uduty,slevel,jointype,birthday,snsid,di,ci,vssn,ischkatt,)
values (#usertype#,#userkind#,#userid#,#userpass#,#username#,#usernameeng#
,gender,HEX(AES_ENCRYPT(#email#, )),#isacceptemail#,HEX(AES_ENCRYPT(#mobile#, )),HEX(AES_ENCRYPT(#telno#, ))
,#asno#,#pasname#,#depart#,#ccposition#,#ccpositionetc#,#fgnoprofile#,#ccjobs#
,HEX(AES_ENCRYPT(#userpno#, )),#bankname#,HEX(AES_ENCRYPT(#bankno#, ))
,#post#,#address1#,#address2#,#introhtml#,#status#,,null,null,null,null,null,#kfcfyear#,#isassignuser#,#edus#
- ,#isacceptmobile#,#uduty#,#slevel#,#jointype#,HEX(AES_ENCRYPT(#birthday#, )),#snsid#,#di#,#ci#,#vssn#,);
+ ,#isacceptmobile#,#uduty#,#slevel#,#jointype#,HEX(AES_ENCRYPT(#birthday#, )),#snsid#,#di#,#ci#,#vssn#,#ischkatt#,);
SELECT LAST_INSERT_ID()
@@ -349,6 +349,7 @@
,isassignuser =#isassignuser#,kfcfyear =#kfcfyear#,edus=#edus#
,status =case when #status# > 0 then #status# else status end
+ ,ischkatt = #ischkatt#
where userno=#userno#
@@ -588,9 +589,9 @@
and a.email=HEX(AES_ENCRYPT(#email#, ))
-
+
+ and a.mobile=HEX(AES_ENCRYPT(#mobile#, ))
+
update users set pwcalltime=,pwcallno=#pwcallno# where userno=#userno#
diff --git a/FO/Controllers/CRoomController.cs b/FO/Controllers/CRoomController.cs
index 31d7186..d50b68d 100644
--- a/FO/Controllers/CRoomController.cs
+++ b/FO/Controllers/CRoomController.cs
@@ -21,6 +21,7 @@ namespace NP.FO.Controllers
{
vm.Lect = Dao.Get("cr.main.mygrade", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "cmno", vm.croomcmno},{ "userno", SUserInfo.UserNo} }).FirstOrDefault();
ViewBag.fronturl = GetConfig("fronturl");
+ ViewBag.Mobile = Dao.Get("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault().mobile;
if (vm.Lect == null)
{
return Redirect("/My/Lecture");
diff --git a/FO/FO.csproj b/FO/FO.csproj
index 7b34c1c..f169c64 100644
--- a/FO/FO.csproj
+++ b/FO/FO.csproj
@@ -672,6 +672,7 @@
+
diff --git a/FO/Views/CRoom/Index.cshtml b/FO/Views/CRoom/Index.cshtml
index fa7345e..c45d358 100644
--- a/FO/Views/CRoom/Index.cshtml
+++ b/FO/Views/CRoom/Index.cshtml
@@ -3,6 +3,8 @@
}
+
+
나의성적
@@ -34,11 +36,11 @@
| @(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점 |
}
@*@(Model.Lect.attrate)%(@(Model.Lect.apoint)점) |
- @(Model.Lect.mpoint)점 |
- @(Model.Lect.fpoint)점 |
- @(Model.Lect.spoint)점 |
- @(Model.Lect.dpoint)점 |
- @(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점 | *@
+ @(Model.Lect.mpoint)점 |
+ @(Model.Lect.fpoint)점 |
+ @(Model.Lect.spoint)점 |
+ @(Model.Lect.dpoint)점 |
+ @(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점 | *@
| 수료기준 |
@@ -59,36 +61,36 @@
-
@@ -97,48 +99,49 @@
-@foreach (var d in Model.LectInnings)
-{
-
- |
-
- [@(d.iseq)회] @d.ititle
-
- - @(d.isonline == 0 && d.istatus == 2 ? "출석완료" : d.isonline == 0 && d.idate < DateTime.Now ? "결석" : d.isonline == 0 ? "출석전" : d.stime == null ? "학습전(0%)" : d.istatus == 2 ? "학습완료" : string.Format("학습중({0}%)", d.sttime > 0 ? (d.totstudy * 100 / (d.sttime * 60)) : 0))
- - @(d.isonline == 0 ? "강의시작일" : "강의기간") : @(d.isonline == 0 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : (d.sstime.ToString("MM/dd") + " ~ " + d.setime.ToString("MM/dd")))
- @if (d.isonline == 0)
- {
- - 강의실 : @(d.icontent??"-")
- }
-
- |
-
-
- -
- @if (d.isonline == 1)
- {
- 학습하기
- }
-
- -
- @if (d.fileno > 0)
- {
- 교안보기
- }
- @if (d.fileno < 1 && !string.IsNullOrEmpty(d.tfurl))
- {
- 교안보기
- }
-
-
- |
-
-}
+ @foreach (var d in Model.LectInnings)
+ {
+
+ |
+
+ [@(d.iseq)회] @d.ititle
+
+ - @(d.isonline == 0 && d.istatus == 2 ? "출석완료" : d.isonline == 0 && d.idate < DateTime.Now ? "결석" : d.isonline == 0 ? "출석전" : d.stime == null ? "학습전(0%)" : d.istatus == 2 ? "학습완료" : string.Format("학습중({0}%)", d.sttime > 0 ? (d.totstudy * 100 / (d.sttime * 60)) : 0))
+ - @(d.isonline == 0 ? "강의시작일" : "강의기간") : @(d.isonline == 0 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : (d.sstime.ToString("MM/dd") + " ~ " + d.setime.ToString("MM/dd")))
+ @if (d.isonline == 0)
+ {
+ - 강의실 : @(d.icontent??"-")
+ }
+
+ |
+
+
+ -
+ @if (d.isonline == 1)
+ {
+ 학습하기
+ }
+
+ -
+ @if (d.fileno > 0)
+ {
+ 교안보기
+ }
+ @if (d.fileno < 1 && !string.IsNullOrEmpty(d.tfurl))
+ {
+ 교안보기
+ }
+
+
+ |
+
+ }
+@Html.Partial("./Partial/MobileChk", null, new ViewDataDictionary { { "bindmethod", "cbchkmobile" } })
@section scriptsHeader{
}
@@ -146,7 +149,7 @@
}
\ No newline at end of file
diff --git a/Model/CM.cs b/Model/CM.cs
index 406a95b..b036ab7 100644
--- a/Model/CM.cs
+++ b/Model/CM.cs
@@ -439,6 +439,7 @@ namespace NP.Model
public int finalcut { get; set; }
public String username { get; set; }
public Int64 lectnocheck { get; set; }
+ public int ischkatt { get; set; }
}
[Serializable]
diff --git a/Model/Common.cs b/Model/Common.cs
index 1c9d84c..32eac50 100644
--- a/Model/Common.cs
+++ b/Model/Common.cs
@@ -225,4 +225,24 @@ namespace NP.Model
///
public String msgid { get; set; }
}
+
+ public class SmsAuth
+ {
+ ///
+ /// 문자발송번호
+ ///
+ public Int64 authno { get; set; }
+ ///
+ /// 강좌번호
+ ///
+ public Int64 lectno { get; set; }
+ ///
+ /// 인증요청시간
+ ///
+ public DateTime latime { get; set; }
+ ///
+ /// 인증번호
+ ///
+ public String lakey { get; set; }
+ }
}
diff --git a/Model/Users.cs b/Model/Users.cs
index 3ec0cbb..bbc06ff 100644
--- a/Model/Users.cs
+++ b/Model/Users.cs
@@ -250,6 +250,7 @@ namespace NP.Model
public String di { get; set; }
public String ci { get; set; }
public String vssn { get; set; }
+ public int ischkatt { get; set; }
}
///