This commit is contained in:
kdh0120 2020-11-30 05:13:00 +00:00
parent 9bf9eb12bb
commit 9fd7460c19
15 changed files with 233 additions and 99 deletions

View File

@ -39,14 +39,14 @@
</div>
</div>
@*<div id="keyword" style="@(Model.CM.pcgno==Model.CGs.Where(w=>w.cgcode==ViewBag.OffCode).Select(w=>w.cgno).FirstOrDefault() ? "":"display:none;")">
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">키워드</label>
<div class="col-sm-8 col-md-10">
@Html.TextBoxFor(m => m.CM.kname, new { @class = "form-control disp-init ff", @style = "width: 60%", @maxlength = "100" })<br />
<label style="color: red;">* 강좌를 표현할 수 있는 단어를 입력해주세요. 홈페이지 홈화면 오프라인 강좌에 출력됩니다. </label>
</div>
</div>
</div>*@
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">키워드</label>
<div class="col-sm-8 col-md-10">
@Html.TextBoxFor(m => m.CM.kname, new { @class = "form-control disp-init ff", @style = "width: 60%", @maxlength = "100" })<br />
<label style="color: red;">* 강좌를 표현할 수 있는 단어를 입력해주세요. 홈페이지 홈화면 오프라인 강좌에 출력됩니다. </label>
</div>
</div>
</div>*@
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label @(Model.CM.ismaster == 0 ? "req" : "")">신청기간</label>
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Date", Model.CM.rstime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.rstime), new ViewDataDictionary { { "name", "CM.rstime" } }) ~ @Html.Partial("./Partial/Date", Model.CM.retime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.retime), new ViewDataDictionary { { "name", "CM.retime" } })</div>
@ -67,14 +67,14 @@
<div class="col-sm-8 col-md-10">@Html.TextBoxFor(m => m.CM.cname, new { @class = "form-control disp-init ff", @style = "width: 50%", @maxlength = "100", @placeholder = Model.viewidxname + "명을 입력하세요." })</div>
</div>
@*<div id="keyword" style=" @(Model.CM.pcgno==Model.CGs.Where(w=>w.cgcode==ViewBag.OffCode).Select(w=>w.cgno).FirstOrDefault() ? "":"display:none;")">
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">키워드</label>
<div class="col-sm-8 col-md-10">
@Html.TextBoxFor(m => m.CM.kname, new { @class = "form-control disp-init ff", @style = "width: 60%", @maxlength = "100" })<br />
<label style="color: red;">* 과정을 표현할 수 있는 단어를 입력해주세요. 홈페이지 홈화면 오프라인 강좌에 출력됩니다. </label>
</div>
</div>
</div>*@
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">키워드</label>
<div class="col-sm-8 col-md-10">
@Html.TextBoxFor(m => m.CM.kname, new { @class = "form-control disp-init ff", @style = "width: 60%", @maxlength = "100" })<br />
<label style="color: red;">* 과정을 표현할 수 있는 단어를 입력해주세요. 홈페이지 홈화면 오프라인 강좌에 출력됩니다. </label>
</div>
</div>
</div>*@
}
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label req">교육유형</label>
@ -181,6 +181,10 @@
<label class="col-sm-4 col-md-2 control-label">이수증발행여부</label>
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", Model.CM.iscertificate, new ViewDataDictionary() { { "valuetext", "1:발행;0:미발행" }, { "checked", Model.CM.iscertificate }, { "name", "CM.iscertificate" } })</div>
</div>
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">출석인증제외</label>
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "checked", Model.CM.ischkatt }, { "name", "CM.ischkatt" } })</div>
</div>
}
else
{
@ -190,6 +194,12 @@
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", Model.CM.iscertificate, new ViewDataDictionary() { { "valuetext", "1:발행;0:미발행" }, { "checked", Model.CM.iscertificate }, { "name", "CM.iscertificate" } })</div>
</div>
</div>
<div style="display:none">
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">출석인증제외</label>
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "checked", Model.CM.ischkatt }, { "name", "CM.ischkatt" } })</div>
</div>
</div>
}
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">첨부파일</label>

View File

@ -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" })
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">출석인증제외</label>
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "checked", Model.User.ischkatt }, { "name", "User.ischkatt" } })</div>
</div>
}
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label @(Model.viewname =="user" || Model.viewname=="professor" ? "req" : "")">이메일</label>
@ -74,8 +78,8 @@
</div>
@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")
{

View File

@ -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)

View File

@ -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>("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<Data> datas = Dao.Get<Data>("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);
}
}
}

View File

@ -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;

View File

@ -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 <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.udt desc</isNull>) 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,<include refid="sql.inc"></include>)
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isdel,isseq,fgnocm,typeman,typeedu,typegrade,typejob,iscertificate,ischkatt,<include refid="sql.inc"></include>)
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#,<include refid="sql.inv"></include>);
,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,#ischkatt#,<include refid="sql.inv"></include>);
<selectKey type="post" property="cmno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
</insert>
<update id="cm.cmup" parameterClass="hashtable">
@ -279,6 +280,7 @@
,typegrade =#typegrade#
,typejob =#typejob#
,iscertificate =#iscertificate#
,ischkatt =#ischkatt#
where cmno=#cmno#
</update>
<update id="cm.data.delete" parameterClass="hashtable">

View File

@ -8,6 +8,7 @@
<typeAlias alias="basemodel" type="NP.Model.BaseModel, NP.Model" />
<typeAlias alias="data" type="NP.Model.Data, NP.Model" />
<typeAlias alias="emailsend" type="NP.Model.EmailSend, NP.Model" />
<typeAlias alias="smsauth" type="NP.Model.SmsAuth, NP.Model" />
</alias>
<cacheModels>
@ -473,5 +474,20 @@
where qno=#qno# and authkey=#authkey#;
update question set authkey=null where qno=#qno#
</select>
<insert id="common.smsauth" parameterClass="smsauth">
insert into smsauth(latime,lakey,lectno)
values(now(),#lakey#,#lectno#);
<selectKey type="post" property="authno" resultClass="long">SELECT LAST_INSERT_ID()</selectKey>
</insert>
<select id ="common.sms.chk" parameterClass="hashtable" resultClass="data">
select authno intval,lectno intval2,latime time,lakey strval
from smsauth
where authno = #authno#
</select>
<update id="common.sms.extend" parameterClass="hashtable">
update smsauth
set latime = now()
where authno = #authno#
</update>
</statements>
</sqlMap>

View File

@ -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) &lt; <include refid="sql.now"></include>
</update>
<update id="lect.isatt.in" parameterClass="hashtable">
update lect
set isattcheck = 1,
lakey = #lakey#,
latime = now()
where lectno = #lectno#
</update>
</statements>
</sqlMap>

View File

@ -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), <include refid="sql.digest"></include>) 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 <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.username</isNull>) 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,<include refid="sql.inc"></include>)
,isacceptmobile,uduty,slevel,jointype,birthday,snsid,di,ci,vssn,ischkatt,<include refid="sql.inc"></include>)
values (#usertype#,#userkind#,#userid#,#userpass#,#username#,#usernameeng#
,gender,HEX(AES_ENCRYPT(#email#, <include refid="sql.digest"></include>)),#isacceptemail#,HEX(AES_ENCRYPT(#mobile#, <include refid="sql.digest"></include>)),HEX(AES_ENCRYPT(#telno#, <include refid="sql.digest"></include>))
,#asno#,#pasname#,#depart#,#ccposition#,#ccpositionetc#,#fgnoprofile#,#ccjobs#
,HEX(AES_ENCRYPT(#userpno#, <include refid="sql.digest"></include>)),#bankname#,HEX(AES_ENCRYPT(#bankno#, <include refid="sql.digest"></include>))
,#post#,#address1#,#address2#,#introhtml#,#status#,<include refid="sql.now"></include>,null,null,null,null,null,#kfcfyear#,#isassignuser#,#edus#
,#isacceptmobile#,#uduty#,#slevel#,#jointype#,HEX(AES_ENCRYPT(#birthday#, <include refid="sql.digest"></include>)),#snsid#,#di#,#ci#,#vssn#,<include refid="sql.inv"></include>);
,#isacceptmobile#,#uduty#,#slevel#,#jointype#,HEX(AES_ENCRYPT(#birthday#, <include refid="sql.digest"></include>)),#snsid#,#di#,#ci#,#vssn#,#ischkatt#,<include refid="sql.inv"></include>);
<selectKey type="post" property="userno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
</insert>
@ -349,6 +349,7 @@
,isassignuser =#isassignuser#,kfcfyear =#kfcfyear#,edus=#edus#
</isEqual>
,status =case when #status# &gt; 0 then #status# else status end
,ischkatt = #ischkatt#
where userno=#userno#
</update>
<update id="users.exitjoin" parameterClass="hashtable">
@ -588,9 +589,9 @@
<isNotNull property="email">
and a.email=HEX(AES_ENCRYPT(#email#, <include refid="sql.digest"></include>))
</isNotNull>
<!--<isNotNull property="mobile1">
and (a.mobile=HEX(AES_ENCRYPT(#Mobile1#, <include refid="sql.digest"></include>)) or a.mobile=HEX(AES_ENCRYPT(#Mobile2#, <include refid="sql.digest"></include>)))
</isNotNull>-->
<isNotNull property="mobile">
and a.mobile=HEX(AES_ENCRYPT(#mobile#, <include refid="sql.digest"></include>))
</isNotNull>
</select>
<update id="users.pwcalltime" parameterClass="long">
update users set pwcalltime=<include refid="sql.now"></include>,pwcallno=#pwcallno#<!--floor(RAND() * (30000-1)+1)--> where userno=#userno#

View File

@ -21,6 +21,7 @@ namespace NP.FO.Controllers
{
vm.Lect = Dao.Get<Lect>("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.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault().mobile;
if (vm.Lect == null)
{
return Redirect("/My/Lecture");

View File

@ -672,6 +672,7 @@
<Content Include="Views\Account\KakaoCallback.cshtml" />
<Content Include="Views\Account\NaverCallbackJoin.cshtml" />
<Content Include="Views\Account\GoogleCallback.cshtml" />
<Content Include="Views\Shared\Partial\MobileChk.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />

View File

@ -3,6 +3,8 @@
}
<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>
<table>
@ -34,11 +36,11 @@
<td style="color:#ff0000;">@(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점</td>
}
@*<td>@(Model.Lect.attrate)%(@(Model.Lect.apoint)점)</td>
<td>@(Model.Lect.mpoint)점</td>
<td>@(Model.Lect.fpoint)점</td>
<td>@(Model.Lect.spoint)점</td>
<td>@(Model.Lect.dpoint)점</td>
<td style="color:#ff0000;">@(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점</td>*@
<td>@(Model.Lect.mpoint)점</td>
<td>@(Model.Lect.fpoint)점</td>
<td>@(Model.Lect.spoint)점</td>
<td>@(Model.Lect.dpoint)점</td>
<td style="color:#ff0000;">@(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점</td>*@
</tr>
<tr>
<td>수료기준</td>
@ -59,36 +61,36 @@
<div class="lctcList" style="height:200px;">
<h5>최근게시글 @*<a href="#">더보기</a>*@</h5>
<ul>
@foreach (var d in Model.Datas.Where(w => w.dtype == 100))
{
<li><a href="/CRoom/BoardView?@Model.croomparam&croombmno=@d.intval&BNo=@d.longval"><p>[@d.strval] @d.strval2 </p><em>@d.time.ToString("yy-MM-dd")</em></a></li>
}
@if (Model.Datas.Where(w => w.dtype == 100).Count() < 1)
{
<li>게시글이 없습니다.</li>
}
@foreach (var d in Model.Datas.Where(w => w.dtype == 100))
{
<li><a href="/CRoom/BoardView?@Model.croomparam&croombmno=@d.intval&BNo=@d.longval"><p>[@d.strval] @d.strval2 </p><em>@d.time.ToString("yy-MM-dd")</em></a></li>
}
@if (Model.Datas.Where(w => w.dtype == 100).Count() < 1)
{
<li>게시글이 없습니다.</li>
}
</ul>
</div>
</div>
<div>
<div class="lctcList"style="height:200px;">
<div class="lctcList" style="height:200px;">
<h5>나의 할일 Top 3</h5>
<ul>
@foreach(var d in Model.Datas.Where(w=>w.dtype < 100))
{
if (d.intval == 2)
{
<li><a href="#" style="cursor: default"><p>[출석] @(d.intval2)차시<span>(@(d.strval3)까지)</span></p></a></li>
}
else
{
<li><a href="#" style="cursor: default"><p>[@(d.intval == 3 ? (d.intval4 == 0 ? "진행평가" : "최종평가") : d.intval == 4 ? "과제" : "토론")] @(d.intval == 3 ? "응시" : d.intval == 4 ? "제출" : "참여")<span>(@d.time2.ToString("MM/dd")까지)</span></p></a></li>
}
}
@if (Model.Datas.Where(w => w.dtype < 100).Count() < 1)
{
<li>아직 할 일이 없습니다.</li>
}
@foreach (var d in Model.Datas.Where(w => w.dtype < 100))
{
if (d.intval == 2)
{
<li><a href="#" style="cursor: default"><p>[출석] @(d.intval2)차시<span>(@(d.strval3)까지)</span></p></a></li>
}
else
{
<li><a href="#" style="cursor: default"><p>[@(d.intval == 3 ? (d.intval4 == 0 ? "진행평가" : "최종평가") : d.intval == 4 ? "과제" : "토론")] @(d.intval == 3 ? "응시" : d.intval == 4 ? "제출" : "참여")<span>(@d.time2.ToString("MM/dd")까지)</span></p></a></li>
}
}
@if (Model.Datas.Where(w => w.dtype < 100).Count() < 1)
{
<li>아직 할 일이 없습니다.</li>
}
</ul>
</div>
</div>
@ -97,48 +99,49 @@
<h5>금주의 학습 <a href="/CRoom/Innings?@Model.croomparam">수강 중인 강의 모두 보기</a></h5>
<table>
<tbody>
@foreach (var d in Model.LectInnings)
{
<tr>
<th><em style="background:url(@(d.isonline == 0 ? "/img/lecture/week_thumb02.jpg" : (string.IsNullOrEmpty(d.tasteurl)?"/img/lecture/week_thumb01.jpg":(Model.Files + d.tasteurl))))no-repeat center center"></em></th>
<td>
<h5>[@(d.iseq)회] @d.ititle</h5>
<dl>
<dt>@(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))</dt>
<dd><span>@(d.isonline == 0 ? "강의시작일" : "강의기간")</span> : @(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")))</dd>
@if (d.isonline == 0)
{
<dd style="margin-left:10px;"><span style="color:#222">강의실</span> : @(d.icontent??"-")</dd>
}
</dl>
</td>
<td>
<ul>
<li class="lctc1">
@if (d.isonline == 1)
{
<a href="#" onclick="playerOpen(@d.cmino, @(d.sstime < DateTime.Now && d.setime > DateTime.Now ? 1 : 0), @(d.isseq == 1 &&d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 5 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
}
</li>
<li class="lctc2">
@if (d.fileno > 0)
{
<a href="/focommon/downfile?fno=@d.fileno" class="lctcBook">교안보기</a>
}
@if (d.fileno < 1 && !string.IsNullOrEmpty(d.tfurl))
{
<a href="@d.tfurl" target="_blank" class="lctcBook">교안보기</a>
}
</li>
</ul>
</td>
</tr>
}
@foreach (var d in Model.LectInnings)
{
<tr>
<th><em style="background:url(@(d.isonline == 0 ? "/img/lecture/week_thumb02.jpg" : (string.IsNullOrEmpty(d.tasteurl)?"/img/lecture/week_thumb01.jpg":(Model.Files + d.tasteurl))))no-repeat center center"></em></th>
<td>
<h5>[@(d.iseq)회] @d.ititle</h5>
<dl>
<dt>@(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))</dt>
<dd><span>@(d.isonline == 0 ? "강의시작일" : "강의기간")</span> : @(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")))</dd>
@if (d.isonline == 0)
{
<dd style="margin-left:10px;"><span style="color:#222">강의실</span> : @(d.icontent??"-")</dd>
}
</dl>
</td>
<td>
<ul>
<li class="lctc1">
@if (d.isonline == 1)
{
<a href="#" onclick="playerOpen(@d.cmino, @(d.sstime < DateTime.Now && d.setime > DateTime.Now ? 1 : 0), @(d.isseq == 1 &&d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 5 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
}
</li>
<li class="lctc2">
@if (d.fileno > 0)
{
<a href="/focommon/downfile?fno=@d.fileno" class="lctcBook">교안보기</a>
}
@if (d.fileno < 1 && !string.IsNullOrEmpty(d.tfurl))
{
<a href="@d.tfurl" target="_blank" class="lctcBook">교안보기</a>
}
</li>
</ul>
</td>
</tr>
}
</tbody>
</table>
</div><!-- lctcWeek -->
</div>
@Html.Partial("./Partial/MobileChk", null, new ViewDataDictionary { { "bindmethod", "cbchkmobile" } })
@section scriptsHeader{
}
@ -171,7 +174,7 @@
} else if (capResult.obj == 2) {
viewcontents(_cmino, false,@Model.croomlectno);
} else {
@*confirmtoggle(true, "해당 과정의 학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 1회에 한 해 진행됩니다.<br/> 본인인증을 하시겠습니까?","mobilechkview("+@Model.croomlectno+")");*@
confirmtoggle(true, "해당 과정의 학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 1회에 한 해 진행됩니다.<br/> 본인인증을 하시겠습니까?","chkmobile()");
//confirmtoggle(true, "해당 과정의 학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 1회에 한 해 진행됩니다.<br/> 본인인증을 하시겠습니까?","showpop()");
//confirmtoggle(true, "해당 과정의 학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 1회에 한 해 진행됩니다.<br/> 본인인증을 하시겠습니까?","mobilechkview('MOBI')");
@ -180,10 +183,27 @@
msg("휴대폰 번호가 공란입니다.<br/>정보수정을 통해 번호를 입력해주세요.");
}
}
function showpop() {
bglayer(false);
$("#pop3").show();
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 다시 확인해주세요.");
}
}
</script>
}

View File

@ -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]

View File

@ -225,4 +225,24 @@ namespace NP.Model
/// </summary>
public String msgid { get; set; }
}
public class SmsAuth
{
/// <summary>
/// 문자발송번호
/// </summary>
public Int64 authno { get; set; }
/// <summary>
/// 강좌번호
/// </summary>
public Int64 lectno { get; set; }
/// <summary>
/// 인증요청시간
/// </summary>
public DateTime latime { get; set; }
/// <summary>
/// 인증번호
/// </summary>
public String lakey { get; set; }
}
}

View File

@ -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; }
}
/// <summary>