최근 변경로직 일괄 커밋

This commit is contained in:
jity7777 2024-05-02 03:42:16 +00:00
parent 46e362bba8
commit 994271dbfa
21 changed files with 1552 additions and 108 deletions

View File

@ -76,7 +76,7 @@
<HintPath>..\References\MySql.Data.dll</HintPath> <HintPath>..\References\MySql.Data.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="NPDao, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="NPDao, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@ -1935,5 +1935,38 @@ namespace NP.Base
Random r = new Random(); Random r = new Random();
return r.Next(10000000, 99999999); return r.Next(10000000, 99999999);
} }
protected int GetRand2()
{
Random r = new Random();
return r.Next(100000, 999999);
}
protected string GetPostPage(string pageUrl = "", string paramStr = "", char divStr = ',')
{
string pageHtml = "";
if (pageUrl != "")
{
pageHtml = "<form id='frm' action='" + pageUrl + "' method='POST'>";
string[] paramArr = paramStr.Split(divStr);
string[] paramValArr;
foreach (var item in paramArr)
{
paramValArr = item.Split(':');
pageHtml += "<input type='hidden' name='" + paramValArr[0] + "' value='" + paramValArr[1] + "'/>";
}
pageHtml += "</form>";
pageHtml += "<script>";
pageHtml += "document.getElementById('frm').submit()";
pageHtml += "</script>";
}
return pageHtml;
}
} }
} }

View File

@ -9,6 +9,9 @@ using System.Collections;
using NP.Base.Auth; using NP.Base.Auth;
using NP.Base.ENUM; using NP.Base.ENUM;
using QRCoder; using QRCoder;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
namespace NP.Base.Controllers namespace NP.Base.Controllers
{ {
public partial class FCommonController : NP.Base.BaseController public partial class FCommonController : NP.Base.BaseController
@ -105,13 +108,58 @@ namespace NP.Base.Controllers
var user = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault(); var user = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
if (user != null) if (user != null)
{ {
if (string.IsNullOrEmpty(user.di) || user.di == u.di) OkCert3Result okCert3Result = new OkCert3Result();
okCert3Result.no = 0;
okCert3Result.gubn = "";
if (!string.IsNullOrWhiteSpace(u.zstring0) && !string.IsNullOrWhiteSpace(u.zstring1))
{
string certiOkData = Dao.Get<string>("sys.okcert3.get", new Hashtable { { "no", u.zstring0 }, { "sn", u.zstring1 } }).FirstOrDefault();
if(certiOkData != null)
{
JObject data = JObject.FromObject(JsonConvert.DeserializeObject(certiOkData));
okCert3Result.no = long.Parse(u.zstring0);
okCert3Result.gubn = u.zstring2;
okCert3Result.ci = data["CI"].ToString();
okCert3Result.di = data["DI"].ToString();
okCert3Result.username = data["RSLT_NAME"].ToString();
okCert3Result.birthday = data["RSLT_BIRTHDAY"].ToString();
okCert3Result.mobile = data["TEL_NO"] == null ? "" : data["TEL_NO"].ToString();
}
else
{
okCert3Result.no = -1;
}
}
if ((string.IsNullOrEmpty(user.di) || user.di == u.di) && okCert3Result.no != -1)
{ {
u.userno = SUserInfo.UserNo; u.userno = SUserInfo.UserNo;
u.uno = SUserInfo.UserNo; u.uno = SUserInfo.UserNo;
u.uip = GetUserIP(); u.uip = GetUserIP();
u.usertype = 1; u.usertype = 1;
u.userpass = string.IsNullOrEmpty(u.userpass) ? null : NP.Base.Lib.KISA_SHA256.SHA256Hash(u.userpass.Trim()); u.userpass = string.IsNullOrEmpty(u.userpass) ? null : NP.Base.Lib.KISA_SHA256.SHA256Hash(u.userpass.Trim());
if(okCert3Result.gubn != "")
{
if (okCert3Result.gubn == "MOBI")
{
u.mobile = okCert3Result.mobile;
u.authplatform = Model.ENUM.AuthPlatform.Mobile;
}
else
{
u.authplatform = Model.ENUM.AuthPlatform.IPIN;
}
u.username = okCert3Result.username;
u.birthday = okCert3Result.birthday; // 이걸로 적용시 날짜형식에 맞는지 체크할 것
u.di = okCert3Result.di;
u.ci = okCert3Result.ci;
// 이름도 인증이름으로 할지여부
}
var telno = (u.telno ?? "").Replace("-", ""); var telno = (u.telno ?? "").Replace("-", "");
u.telno = telno.Length == 11 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 3), telno.Substring(3, 4), telno.Substring(7, 4)) : u.telno = telno.Length == 11 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 3), telno.Substring(3, 4), telno.Substring(7, 4)) :
telno.Length == 10 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 3), telno.Substring(3, 3), telno.Substring(6, 4)) : telno.Length == 10 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 3), telno.Substring(3, 3), telno.Substring(6, 4)) :
@ -139,6 +187,10 @@ namespace NP.Base.Controllers
//} //}
return JsonOK(result); return JsonOK(result);
} }
else
{
JsonOK(-1);
}
} }
return JsonOK(0); return JsonOK(0);
} }
@ -150,16 +202,62 @@ namespace NP.Base.Controllers
if(vm.userno > 0) if(vm.userno > 0)
{ {
u.userpass = string.IsNullOrEmpty(u.userpass) ? null : NP.Base.Lib.KISA_SHA256.SHA256Hash(vm.User.userpass.Trim()); OkCert3Result okCert3Result = new OkCert3Result();
if (u.userpass == null) okCert3Result.no = 0;
okCert3Result.gubn = "";
if (!string.IsNullOrWhiteSpace(u.zstring0) && !string.IsNullOrWhiteSpace(u.zstring1))
{ {
u.userpass = Request["User.userpass"]; string certiOkData = Dao.Get<string>("sys.okcert3.get", new Hashtable { { "no", u.zstring0 }, { "sn", u.zstring1 } }).FirstOrDefault();
if (certiOkData != null)
{
JObject data = JObject.FromObject(JsonConvert.DeserializeObject(certiOkData));
okCert3Result.no = long.Parse(u.zstring0);
okCert3Result.gubn = u.zstring2;
//okCert3Result.ci = data["CI"].ToString();
//okCert3Result.di = data["DI"].ToString();
okCert3Result.username = data["RSLT_NAME"].ToString();
okCert3Result.birthday = data["RSLT_BIRTHDAY"].ToString();
okCert3Result.mobile = data["TEL_NO"] == null ? "" : data["TEL_NO"].ToString();
if (u.username != okCert3Result.username || u.birthday != okCert3Result.birthday)
{
passResult = -1;
}
if (passResult == 0 && okCert3Result.gubn == "MOBI" && u.mobile != okCert3Result.mobile)
{
passResult = -1;
}
Dao.Save("sys.okcert3.setUno", new Hashtable { { "no", u.zstring0 }, { "uno", vm.userno } });
}
else
{
okCert3Result.no = -1;
}
} }
if (u.userpass != null) if(passResult == 0 && okCert3Result.no != -1)
{ {
u.userpass = NP.Base.Lib.KISA_SHA256.SHA256Hash(vm.User.userpass.Trim()); u.userpass = string.IsNullOrEmpty(u.userpass) ? null : NP.Base.Lib.KISA_SHA256.SHA256Hash(vm.User.userpass.Trim());
passResult = Dao.Get<int>("users.pass.check", new System.Collections.Hashtable() { { "userno", vm.userno }, { "userpass", u.userpass } }).FirstOrDefault(); if (u.userpass == null)
{
u.userpass = Request["User.userpass"];
}
if (u.userpass != null)
{
u.userpass = NP.Base.Lib.KISA_SHA256.SHA256Hash(vm.User.userpass.Trim());
passResult = Dao.Get<int>("users.pass.check", new System.Collections.Hashtable() { { "userno", vm.userno }, { "userpass", u.userpass } }).FirstOrDefault();
}
}
else
{
passResult = (int)okCert3Result.no;
} }
} }
else else
@ -229,6 +327,18 @@ namespace NP.Base.Controllers
//정상으로 된거로 판단 //정상으로 된거로 판단
return JsonOK(1); return JsonOK(1);
} }
public JsonResult userGetMyinfo()
{
Users users = new Users();
if(SUserInfo.UserNo > 0)
{
users = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
}
return JsonObj<Users>(users);
}
} }
} }

View File

@ -9,6 +9,8 @@ using System.Collections;
using NP.Base.Auth; using NP.Base.Auth;
using NP.Base.ENUM; using NP.Base.ENUM;
using System.Web.ModelBinding; using System.Web.ModelBinding;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
namespace NP.Base.Controllers namespace NP.Base.Controllers
{ {
@ -248,7 +250,7 @@ namespace NP.Base.Controllers
return JsonOK(GetInt(ht["asno"])); return JsonOK(GetInt(ht["asno"]));
} }
[HttpPost] [HttpPost]
public JsonResult Join(Users u) public JsonResult Join_old(Users u)
{ {
u.uip = GetUserIP(); u.uip = GetUserIP();
//이메일, 아이디 중복 체크 //이메일, 아이디 중복 체크
@ -263,6 +265,49 @@ namespace NP.Base.Controllers
Dao.Insert("users.in", u); Dao.Insert("users.in", u);
return JsonOK(u.userno); return JsonOK(u.userno);
} }
public JsonResult Join(Users u)
{
if (!string.IsNullOrWhiteSpace(u.zstring0))
{
// 인증 후 okcert3log.no와 sn 값으로 인증된 결과값 가져오기
string decStr = DecString(u.zstring0);
string[] tempArr = decStr.Split(',');
string gubn = tempArr[2];
ViewBag.reason = tempArr[3];
ViewBag.rsltCd = tempArr[4];
string certiOkData = Dao.Get<string>("sys.okcert3.get", new Hashtable { { "no", tempArr[0] }, { "sn", tempArr[1] } }).FirstOrDefault();
JObject data = JObject.FromObject(JsonConvert.DeserializeObject(certiOkData));
// 인증 후 강제로 수정된 정보를 인증 정보로 대체하기
u.username = data["RSLT_NAME"].ToString();
u.ci = data["CI"].ToString();
u.di = data["DI"].ToString();
u.birthday = data["RSLT_BIRTHDAY"].ToString();
if(gubn == "MOBI")
{
u.mobile = data["TEL_NO"] == null ? "" : data["TEL_NO"].ToString();
}
u.vssn = data["VSSN"] == null ? "" : data["VSSN"].ToString();
u.uip = GetUserIP();
//이메일, 아이디 중복 체크
var u129 = Dao.Get<int>("users.checkuser", new Hashtable() { { "userid", u.userid }, { "email", u.email }, { "mobile", u.mobile } }).First();
if (u129 != 9)
{
return JsonOK(u129 * -1);
}
u.userpass = NP.Base.Lib.KISA_SHA256.SHA256Hash(u.userpass.Trim());
u.birthday = u.birthday != null && u.birthday.Length == 8 ? (u.birthday ?? "").Substring(0, 4) + "-" + (u.birthday ?? "").Substring(4, 2) + "-" + (u.birthday ?? "").Substring(6, 2) : null;
u.usertype = u.status = 1;
Dao.Insert("users.in", u);
return JsonOK(u.userno);
}
else
{
return JsonOK(0);
}
}
[HttpPost] [HttpPost]
public JsonResult FindMe(String email) public JsonResult FindMe(String email)
{ {
@ -991,5 +1036,55 @@ namespace NP.Base.Controllers
} }
return JsonOK(0); return JsonOK(0);
} }
public JsonResult GetOkCert3Rslt(string stringval)
{
stringval = string.IsNullOrWhiteSpace(stringval) ? "" : stringval.Trim();
//string result = "NoCert"; // 초기값
OkCert3Result result = new OkCert3Result();
result.rsltCd = "NoCert";
if (!string.IsNullOrWhiteSpace(stringval))
{
stringval = HttpUtility.UrlDecode(stringval);
string decStr = DecString(stringval);
string tempStr = "";
string[] tempArr = decStr.Split(',');
string gubn = tempArr[2];
result.reasonNo = int.Parse(tempArr[3].ToString());
result.rsltCd = tempArr[4];
string certiOkData = Dao.Get<string>("sys.okcert3.get", new Hashtable { { "no", tempArr[0] }, { "sn", tempArr[1] } }).FirstOrDefault();
JObject data = JObject.FromObject(JsonConvert.DeserializeObject(certiOkData));
result.no = long.Parse(tempArr[0]);
result.sn = tempArr[1];
result.gubn = gubn;
result.ci = data["CI"].ToString();
result.di = data["DI"].ToString();
result.username = data["RSLT_NAME"].ToString();
result.birthday = data["RSLT_BIRTHDAY"].ToString();
result.mobile = data["TEL_NO"] == null ? "" : data["TEL_NO"].ToString();
result.vssn = data["VSSN"] == null ? "" : data["VSSN"].ToString();
if (!string.IsNullOrWhiteSpace(result.mobile))
{
tempStr = result.mobile.Trim();
if (tempStr.Length == 10)
{
result.mobile = tempStr.Substring(0, 3) + "-" + tempStr.Substring(3, 3) + "-" + tempStr.Substring(6, 4);
}
else if(tempStr.Length == 11)
{
result.mobile = tempStr.Substring(0, 3) + "-" + tempStr.Substring(3, 4) + "-" + tempStr.Substring(7, 4);
}
// 10,11 개 아닐 경우 그대로 표현
}
}
return JsonOKObj(result);
}
} }
} }

View File

@ -9,7 +9,7 @@
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net46" /> <package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net46" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" /> <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /> <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net46" /> <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net46" />
<package id="OfficeOpenXml.Core.ExcelPackage" version="1.0.0" targetFramework="net46" /> <package id="OfficeOpenXml.Core.ExcelPackage" version="1.0.0" targetFramework="net46" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net46" /> <package id="SharpZipLib" version="0.86.0" targetFramework="net46" />
<package id="Spring.Aop" version="2.0.1" targetFramework="net45" /> <package id="Spring.Aop" version="2.0.1" targetFramework="net45" />

View File

@ -10,6 +10,7 @@
<typeAlias alias="actlog" type="NP.Model.ActLog, NP.Model" /> <typeAlias alias="actlog" type="NP.Model.ActLog, NP.Model" />
<typeAlias alias="cmlect" type="NP.Model.CMLect, NP.Model" /> <typeAlias alias="cmlect" type="NP.Model.CMLect, NP.Model" />
<typeAlias alias="cmcalc" type="NP.Model.CMCalc, NP.Model" /> <typeAlias alias="cmcalc" type="NP.Model.CMCalc, NP.Model" />
<typeAlias alias="okcert3" type="NP.Model.OkCert3Item, NP.Model" />
</alias> </alias>
<cacheModels> <cacheModels>
@ -1375,5 +1376,29 @@
<include refid="sql.pagedynamic"></include> <include refid="sql.pagedynamic"></include>
order by edno desc order by edno desc
</select> </select>
<insert id="sys.okcert3.in" parameterClass="okcert3" >
insert into okcert3log (gubn, ret, reason, sn, rsltcd, rslt, dt)
select #gubn#, #retVal#, #reasonNo#, #sn#, #rsltCd#, #rslt#, now()
<selectKey type="post" property="no" resultClass="long">SELECT LAST_INSERT_ID()</selectKey>
</insert>
<select id="sys.okcert3.get" parameterClass="hashtable" resultClass="string">
select rslt
from okcert3log
where no = $no$ and sn=#sn#
</select>
<update id="sys.okcert3.setUno" parameterClass="hashtable">
update okcert3log set uno = $uno$
where no = $no$;
</update>
<update id="sys.okcert3.setEnccd" parameterClass="hashtable">
update okcert3log set enccd = #enccd#
where no = $no$;
</update>
</statements> </statements>
</sqlMap> </sqlMap>

View File

@ -587,7 +587,106 @@ namespace NP.FO.Controllers
} }
ViewBag.result = CP_CD + ":" + RSLT_CD + ":" + RSLT_MSG + ":" + MDL_TKN + ":" + TX_SEQ_No; ViewBag.result = CP_CD + ":" + RSLT_CD + ":" + RSLT_MSG + ":" + MDL_TKN + ":" + TX_SEQ_No;
return View(); return View();
} }
public ActionResult CertOk3Req2(String sel, String reason, String param1, String param2)
{
String CP_CD = "V47690000000";
String SITE_NAME = "YNICTE";
String REQ_SITE_NM = "YNICTE";
String REQ_URL = "";
String RETURN_MSG = "";
String SITE_URL = "https://" + Request.Url.Host;
//String SITE_URL = GetConfig("fronturl");
//인증요청사유코드
//00 : 회원가입
//01 : 성인인증
//02 : 회원정보수정
//03 : 비밀번호찾기
//04 : 상품구매
//99 : 기타
String RQST_CAUS_CD = reason == "Join" ? "00" : "02";
String target = "PROD";
String param = null;
String RSLT_CD = null;
String RSLT_MSG = null;
String MDL_TKN = null;
String TX_SEQ_No = null;
String RETURN_URL = "";
String RTN_URL = "";
String CHNL_CD = "";
String license = "";
String svcName = "";
ViewBag.sel = sel;
ViewBag.tcUrl = "";
ViewBag.PopupUrl = "";
//return url 설정
RETURN_URL = "https://" + Request.Url.Host + "/Account/CertOk3" + sel + "2?reason=" + reason + (!string.IsNullOrEmpty(param1) ? "&param1=" + param1 : "") + (!string.IsNullOrEmpty(param2) ? "&param2=" + param2 : "");
RTN_URL = "https://" + Request.Url.Host + "/Account/CertOk3" + sel + "2?reason=" + reason + (!string.IsNullOrEmpty(param1) ? "&param1=" + param1 : "") + (!string.IsNullOrEmpty(param2) ? "&param2=" + param2 : "");
//RETURN_URL = GetConfig("fronturl") + "/Account/CertOk3" + sel + "?reason=" + reason + (!string.IsNullOrEmpty(param1) ? "&param1=" + param1 : "") + (!string.IsNullOrEmpty(param2) ? "&param2=" + param2 : "");
//RTN_URL = GetConfig("fronturl") + "/Account/CertOk3" + sel + "?reason=" + reason + (!string.IsNullOrEmpty(param1) ? "&param1=" + param1 : "") + (!string.IsNullOrEmpty(param2) ? "&param2=" + param2 : "");
//모바일팝업
if (sel == "MOBI")
{
license = "C:\\Windows\\SysWOW64\\" + CP_CD + "_IDS_01_" + target + "_AES_license.dat";
svcName = "IDS_HS_POPUP_START";
ViewBag.tcUrl = "kcb.oknm.online.safehscert.popup.cmd.P931_CertChoiceCmd";
ViewBag.PopupUrl = "https://safe.ok-name.co.kr/CommonSvl";
}
else if (sel == "IPIN")
{
license = "C:\\Windows\\SysWOW64\\" + CP_CD + "_TIS_01_" + target + "_AES_license.dat";
svcName = "TIS_IPIN_POPUP_START";
ViewBag.tcUrl = "kcb.tis.ti.cmd.LoginRPCert3Cmd";
ViewBag.PopupUrl = "https://ipin.ok-name.co.kr/CommonSvl";
}
JObject reqJson = new JObject();
reqJson.Add("RETURN_URL", RETURN_URL);
reqJson.Add("REQ_SITE_NM", REQ_SITE_NM);
reqJson.Add("REQ_URL", REQ_URL);
reqJson.Add("RTN_URL", RTN_URL);
reqJson.Add("SITE_NAME", SITE_NAME);
reqJson.Add("SITE_URL", SITE_URL);
reqJson.Add("CHNL_CD", CHNL_CD);
reqJson.Add("RQST_CAUS_CD", RQST_CAUS_CD);
reqJson.Add("RETURN_MSG", RETURN_MSG);
param = JsonConvert.SerializeObject(reqJson);
reqJson.RemoveAll();
reqJson = null;
//OkCert3 실행1
OkCert3 myObject = new OkCert3Com.OkCert3() { };
//객체생성실패
if (myObject == null)
{
ViewBag.result = null;
}
else
{
//모듈호출, 결과
dynamic ret = myObject.callOkCert3(target, CP_CD, svcName, param, license, out object mOut);
ViewBag.ret = ret;
if (ret != 0)
{
ViewBag.result = null;
}
else
{
JObject outputobj = JObject.FromObject(JsonConvert.DeserializeObject(mOut.ToString()));
RSLT_CD = outputobj["RSLT_CD"].ToString();
RSLT_MSG = outputobj["RSLT_MSG"].ToString();
MDL_TKN = outputobj["MDL_TKN"].ToString();
TX_SEQ_No = outputobj["TX_SEQ_NO"].ToString();
}
}
ViewBag.result = CP_CD + ":" + RSLT_CD + ":" + RSLT_MSG + ":" + MDL_TKN + ":" + TX_SEQ_No;
return View();
}
#endregion #endregion
#region #region
@ -791,9 +890,405 @@ namespace NP.FO.Controllers
ViewBag.reason = reason; ViewBag.reason = reason;
} }
return View(); return View();
} }
public ActionResult CertOk3MOBI2(string reason, String param1, String param2)
{
String MDL_TKN = Request["MDL_TKN"];
String CP_CD = "V47690000000";
String target = "PROD";
String svcName = "IDS_HS_POPUP_RESULT";
String license = "C:\\Windows\\SysWOW64\\" + CP_CD + "_IDS_01_" + target + "_AES_license.dat";
String TX_SEQ_NO = null;
String RSLT_CD = null;
String RSLT_MSG = null;
String RSLT_NAME = null;
String RSLT_BIRTHDAY = null;
String RSLT_SEX_CD = null;
String RSLT_NTV_FRNR_CD = null;
String DI = null;
String CI = null;
String CI_UPDATE = null;
String TEL_COM_CD = null;
String TEL_NO = null;
String RETURN_MSG = null;
int chkNo = 0;
try
{
JObject reqJson = new JObject();
JObject outputobj = new JObject();
reqJson.Add("MDL_TKN", MDL_TKN);
String param = JsonConvert.SerializeObject(reqJson);
reqJson.RemoveAll();
reqJson = null;
OkCert3 myObject = new OkCert3Com.OkCert3() { };
// 인증 후 결과값
int reasonNo = -1;
string retVal = "";
string rslt = "";
string rsltCd = "";
switch (reason)
{
case "Join":
reasonNo = CertOkReason.Join.GetHashCode();
break;
case "AuthPlatformChange":
reasonNo = CertOkReason.AuthPlatformChange.GetHashCode();
break;
case "MobileNumberChange":
reasonNo = CertOkReason.MobileNumberChange.GetHashCode();
break;
}
if (myObject == null)
{
RETURN_MSG = null;
}
else
{
chkNo = 1;
dynamic ret = myObject.callOkCert3(target, CP_CD, svcName, param, license, out object mOut);
retVal = ((int)ret).ToString();
myObject = null;
rslt = mOut.ToString();
outputobj = JObject.FromObject(JsonConvert.DeserializeObject(rslt));
TX_SEQ_NO = outputobj["TX_SEQ_NO"].ToString();
RSLT_CD = outputobj["RSLT_CD"].ToString();
RSLT_MSG = outputobj["RSLT_MSG"].ToString();
RETURN_MSG = outputobj["RETURN_MSG"].ToString();
if (RSLT_CD == "B000")
{
chkNo = 2;
RSLT_NAME = outputobj["RSLT_NAME"].ToString();
RSLT_BIRTHDAY = outputobj["RSLT_BIRTHDAY"].ToString();
RSLT_SEX_CD = outputobj["RSLT_SEX_CD"].ToString();
RSLT_NTV_FRNR_CD = outputobj["RSLT_NTV_FRNR_CD"].ToString();
DI = outputobj["DI"].ToString();
CI = outputobj["CI"].ToString();
CI_UPDATE = outputobj["CI_UPDATE"].ToString();
TEL_COM_CD = outputobj["TEL_COM_CD"].ToString();
TEL_NO = outputobj["TEL_NO"].ToString();
TEL_NO = string.IsNullOrEmpty(TEL_NO) || TEL_NO.Replace("-", "").Length < 10 ? (TEL_NO ?? "") : TEL_NO.Replace("-", "").Length == 10 ? string.Format("{0}-{1}-{2}", TEL_NO.Replace("-", "").Substring(0, 3), TEL_NO.Replace("-", "").Substring(3, 3), TEL_NO.Replace("-", "").Substring(6)) : string.Format("{0}-{1}-{2}", TEL_NO.Replace("-", "").Substring(0, 3), TEL_NO.Replace("-", "").Substring(3, 4), TEL_NO.Replace("-", "").Substring(7));
if (!string.IsNullOrEmpty(TEL_NO))
{
rsltCd = CertOkRslt.Ok.ToString();
if (reason == "Join")
{
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleMember.ToString();
RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다.";
}
else
{
IList<Users> chk2 = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "di", DI } });
if (chk2.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleCert.ToString();
RSLT_MSG = "이미 해당 인증정보로 등록된 회원이 존재합니다.";
}
}
}
else if (reason == "AuthPlatformChange")
{
var user = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
if (user != null)
{
if (string.IsNullOrEmpty(user.di))
{
//정보수정시 본인제외 체크를 위해 usernonot추가
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO }, { "usernonot", SUserInfo.UserNo } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleMember.ToString();
RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다.";
}
else
{
IList<Users> chk2 = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "di", DI }, { "usernonot", SUserInfo.UserNo } });
if (chk2.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleCert.ToString();
RSLT_MSG = "이미 해당 인증정보로 등록된 회원이 존재합니다.";
}
}
}
else if (user.di == DI)
{
//정보수정시 본인제외 체크를 위해 usernonot추가
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO }, { "usernonot", SUserInfo.UserNo } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleMember.ToString();
RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다.";
}
}
else
{
RSLT_CD = "U002";
rsltCd = CertOkRslt.CertError.ToString();
RSLT_MSG = "인증정보가 등록된 회원 인증정보와 일치하지 않습니다.";
}
}
else
{
RSLT_CD = "U999";
rsltCd = CertOkRslt.NoMember.ToString();
RSLT_MSG = "비로그인";
}
if (RSLT_CD == "B000")
{
// ci, di
}
}
else if (reason == "MobileNumberChange")
{
var user = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
if (user != null)
{
if (string.IsNullOrEmpty(user.di))
{
//정보수정시 본인제외 체크를 위해 usernonot추가
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO }, { "usernonot", SUserInfo.UserNo } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleMember.ToString();
RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다.";
}
else
{
IList<Users> chk2 = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "di", DI }, { "usernonot", SUserInfo.UserNo } });
if (chk2.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleCert.ToString();
RSLT_MSG = "이미 해당 인증정보로 등록된 회원이 존재합니다.";
}
}
}
else if (user.di == DI)
{
//정보수정시 본인제외 체크를 위해 usernonot추가
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO }, { "usernonot", SUserInfo.UserNo } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleMember.ToString();
RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다.";
}
}
else
{
RSLT_CD = "U002";
rsltCd = CertOkRslt.CertError.ToString();
RSLT_MSG = "인증정보가 등록된 회원 인증정보와 일치하지 않습니다.";
}
}
else
{
RSLT_CD = "U999";
rsltCd = CertOkRslt.NoMember.ToString();
RSLT_MSG = "비로그인";
}
}
}
else
{
RSLT_CD = "U001";
rsltCd = CertOkRslt.NoPhone.ToString();
RSLT_MSG = "휴대폰 번호 오류";
}
}
else
{
rsltCd = CertOkRslt.NoCert.ToString();
}
chkNo = 3;
outputobj = null;
mOut = null;
ViewBag.result = CP_CD + ":" + TX_SEQ_NO + ":" + RSLT_CD + ":" + RSLT_MSG + ":"
+ RSLT_NAME + ":" + RSLT_BIRTHDAY + ":" + RSLT_SEX_CD + ":" + RSLT_NTV_FRNR_CD + ":"
+ DI + ":" + CI + ":" + CI_UPDATE + ":" + TEL_COM_CD + ":"
+ TEL_NO + ":" + RETURN_MSG;
Dao.Save("sys.kcblog.in", new Hashtable() { { "cp_cd", CP_CD }, { "mobile", TEL_NO }, { "logmsg", "RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG } });
//ViewBag.reason = reason;
}
chkNo = 4;
// 인증 결과 데이터 저장
string gubn = "MOBI";
int sn1 = GetRand();
int sn2 = GetRand2();
string sn = sn1.ToString() + sn2.ToString();
string dtStr = string.Format("{0:yyyyMMddHHmmss}", DateTime.Now);
Model.OkCert3Item okCert3item = new OkCert3Item();
okCert3item.gubn = gubn;
okCert3item.retVal = retVal;
okCert3item.reasonNo = reasonNo;
okCert3item.sn = sn;
okCert3item.rsltCd = rsltCd;
okCert3item.rslt = rslt;
chkNo = 5;
Dao.Insert<Model.OkCert3Item>("sys.okcert3.in", okCert3item);
bool errChk = false;
string paramStr = "";
ViewBag.formUrl = "";
ViewBag.result = "";
ViewBag.rsltCd = rsltCd;
chkNo = 6;
switch (reason)
{
case "Join":
if (RSLT_CD == "B000" && rsltCd == "Ok")
{
ViewBag.formUrl = "/Account/Join";
paramStr += okCert3item.no;
paramStr += "," + sn;
paramStr += "," + gubn;
paramStr += "," + reasonNo;
paramStr += "," + rsltCd;
//paramEncStr = "stringval:" + EncString(paramStr);
ViewBag.result = EncString(paramStr);
}
else
{
errChk = true;
ViewBag.result = rsltCd;
}
break;
case "AuthPlatformChange":
ViewBag.formUrl = "";
if (RSLT_CD == "B000" && rsltCd == "Ok")
{
paramStr += okCert3item.no;
paramStr += "," + sn;
paramStr += "," + gubn;
paramStr += "," + reasonNo;
paramStr += "," + rsltCd;
//paramEncStr = "stringval:" + EncString(paramStr);
ViewBag.result = EncString(paramStr);
}
else
{
errChk = true;
ViewBag.result = getOkCertErrMsg(rsltCd);
}
break;
case "MobileNumberChange":
ViewBag.formUrl = "";
if (RSLT_CD == "B000" && rsltCd == "Ok")
{
paramStr += okCert3item.no;
paramStr += "," + sn;
paramStr += "," + gubn;
paramStr += "," + reasonNo;
paramStr += "," + rsltCd;
//paramEncStr = "stringval:" + EncString(paramStr);
ViewBag.result = EncString(paramStr);
}
else
{
errChk = true;
ViewBag.result = getOkCertErrMsg(rsltCd);
}
break;
}
chkNo = 7;
/*
* AuthPlatformChange, MobileNumberChange
*
*/
if (errChk)
{
ViewBag.result = getOkCertErrMsg(rsltCd);
}
else
{
ViewBag.result = HttpUtility.UrlEncode(ViewBag.result);
Dao.Save("sys.okcert3.setEnccd", new Hashtable { { "enccd", ViewBag.result }, { "no", okCert3item.no } });
}
}
catch (Exception e)
{
ViewBag.result = "er.(" + chkNo + "||" + RSLT_CD + ")" + e.Message;
}
return View();
}
#endregion #endregion
public string getOkCertErrMsg(string rsltCd)
{
string result = "";
switch (rsltCd)
{
case "DoubleMember":
result = "er.이미 해당 휴대폰번호로 등록된 회원이 존재합니다.";
break;
case "DoubleiPinMember":
result = "er.이미 해당 ipin으로 등록된 회원이 존재합니다.";
break;
case "DoubleCert":
result = "er.이미 해당 인증정보로 등록된 회원이 존재합니다.";
break;
case "CertError":
result = "er.인증정보가 등록된 회원 인증정보와 일치하지 않습니다.";
break;
case "NoMember":
result = "er.회원정보를 찾을 수 없습니다.";
break;
case "NoPhone":
result = "er.인증정보에 입력된 핸드폰정보를 찾을 수 없습니다.";
break;
case "iPinError":
result = "er.ipin 번호 오류 입니다.";
break;
case "CmiNo":
result = "er.잘못된 회차키 입니다.";
break;
case "LectNo":
result = "er.잘못된 강좌코드 입니다.";
break;
default:
// NoCert
result = "er.인증에 실패하였습니다.";
break;
}
return result;
}
#region IPIN인증 #region IPIN인증
/// <summary> /// <summary>
/// IPIN인증 결과 /// IPIN인증 결과
@ -1006,6 +1501,351 @@ namespace NP.FO.Controllers
} }
return View(); return View();
} }
public ActionResult CertOk3IPIN2(string reason, string param1, string param2)
{
String MDL_TKN = Request["MDL_TKN"];
String CP_CD = "V47690000000";
String target = "PROD";
String svcName = "TIS_IPIN_POPUP_RESULT";
String license = "C:\\Windows\\SysWOW64\\" + CP_CD + "_TIS_01_" + target + "_AES_license.dat";
String TX_SEQ_NO = null;
String RSLT_CD = null;
String RSLT_MSG = null;
String RSLT_NAME = null;
String RSLT_BIRTHDAY = null;
String RSLT_SEX_CD = null;
String RSLT_NTV_FRNR_CD = null;
String DI = null;
String CI = null;
String CI_UPDATE = null;
String VSSN = null;
String RETURN_MSG = null;
try
{
JObject reqJson = new JObject();
JObject outputobj = new JObject();
reqJson.Add("MDL_TKN", MDL_TKN);
String param = JsonConvert.SerializeObject(reqJson);
reqJson.RemoveAll();
reqJson = null;
OkCert3 myObject = new OkCert3Com.OkCert3() { };
// 인증 후 결과값
int reasonNo = -1;
string retVal = "";
string rslt = "";
string rsltCd = "";
switch (reason)
{
case "Join":
reasonNo = CertOkReason.Join.GetHashCode();
break;
case "AuthPlatformChange":
reasonNo = CertOkReason.AuthPlatformChange.GetHashCode();
break;
case "MobileNumberChange":
reasonNo = CertOkReason.MobileNumberChange.GetHashCode();
break;
}
if (myObject == null)
{
RETURN_MSG = null;
}
else
{
dynamic ret = myObject.callOkCert3(target, CP_CD, svcName, param, license, out object mOut);
retVal = ((int)ret).ToString();
myObject = null;
rslt = mOut.ToString();
outputobj = JObject.FromObject(JsonConvert.DeserializeObject(mOut.ToString()));
TX_SEQ_NO = outputobj["TX_SEQ_NO"].ToString();
RSLT_CD = outputobj["RSLT_CD"].ToString();
RSLT_MSG = outputobj["RSLT_MSG"].ToString();
RETURN_MSG = outputobj["RETURN_MSG"].ToString();
if (RSLT_CD == "T000")
{
RSLT_NAME = outputobj["RSLT_NAME"].ToString();
RSLT_BIRTHDAY = outputobj["RSLT_BIRTHDAY"].ToString();
RSLT_SEX_CD = outputobj["RSLT_SEX_CD"].ToString();
RSLT_NTV_FRNR_CD = outputobj["RSLT_NTV_FRNR_CD"].ToString();
DI = outputobj["DI"].ToString();
CI = outputobj["CI"].ToString();
CI_UPDATE = outputobj["CI_UPDATE"].ToString();
VSSN = outputobj["VSSN"].ToString();
//Users users = new Users()
//{
// username = RSLT_NAME,
// birthday = RSLT_BIRTHDAY,
// di = DI,
// ci = CI,
// vssn = VSSN,
// jointype = 0
//};
if (!string.IsNullOrEmpty(VSSN))
{
rsltCd = CertOkRslt.Ok.ToString();
if (reason == "Join")
{
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "vssn", VSSN } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleiPinMember.ToString();
RSLT_MSG = "이미 해당 ipin으로 등록된 회원이 존재합니다.";
}
else
{
IList<Users> chk2 = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "di", DI } });
if (chk2.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleCert.ToString();
RSLT_MSG = "이미 해당 인증정보로 등록된 회원이 존재합니다.";
}
}
}
else if (reason == "AuthPlatformChange")
{
var user = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
if (user != null)
{
if (string.IsNullOrEmpty(user.di))
{
//정보수정시 본인제외 체크를 위해 usernonot추가
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "vssn", VSSN }, { "usernonot", SUserInfo.UserNo } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleCert.ToString();
RSLT_MSG = "이미 해당 ipin으로 등록된 회원이 존재합니다.";
}
else
{
IList<Users> chk2 = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "di", DI }, { "usernonot", SUserInfo.UserNo } });
if (chk2.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleCert.ToString();
RSLT_MSG = "이미 해당 인증정보로 등록된 회원이 존재합니다.";
}
}
}
else if (user.di == DI)
{
//정보수정시 본인제외 체크를 위해 usernonot추가
IList<Users> chk = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "vssn", VSSN }, { "usernonot", SUserInfo.UserNo } });
if (chk.Count() > 0)
{
RSLT_CD = "U000";
rsltCd = CertOkRslt.DoubleCert.ToString();
RSLT_MSG = "이미 해당 ipin으로 등록된 회원이 존재합니다.";
}
}
else
{
RSLT_CD = "U002";
rsltCd = CertOkRslt.CertError.ToString();
RSLT_MSG = "인증정보가 등록된 회원 인증정보와 일치하지 않습니다.";
}
}
else
{
RSLT_CD = "U999";
rsltCd = CertOkRslt.NoMember.ToString();
RSLT_MSG = "비로그인";
}
}
else if (reason == "LectinningAuth")
{
var user = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
if (user != null)
{
if (string.IsNullOrEmpty(user.di) || user.di == DI)
{
if (long.TryParse(param1, out long lectno))
{
if (long.TryParse(param2, out long cmino))
{
var lectInnings = Dao.Get<LectInning>("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);
ViewBag.lectno = lectno;
ViewBag.cmino = cmino;
}
else
{
RSLT_CD = "U998";
rsltCd = CertOkRslt.CmiNo.ToString();
RSLT_MSG = "cmino 에러";
}
}
else
{
RSLT_CD = "U998";
rsltCd = CertOkRslt.CmiNo.ToString();
RSLT_MSG = "cmino 에러";
}
}
else
{
RSLT_CD = "U998";
rsltCd = CertOkRslt.LectNo.ToString();
RSLT_MSG = "lectno 에러";
}
}
else
{
RSLT_CD = "U002";
rsltCd = CertOkRslt.CertError.ToString();
RSLT_MSG = "인증정보가 등록된 회원 인증정보와 일치하지 않습니다.";
}
}
else
{
RSLT_CD = "U999";
rsltCd = CertOkRslt.NoMember.ToString();
RSLT_MSG = "비로그인";
}
}
}
else
{
RSLT_CD = "U001";
rsltCd = CertOkRslt.iPinError.ToString();
RSLT_MSG = "ipin 번호 오류";
}
}
else
{
rsltCd = CertOkRslt.NoCert.ToString();
}
outputobj = null;
mOut = null;
ViewBag.result = CP_CD + ":" + TX_SEQ_NO + ":" + RSLT_CD + ":" + RSLT_MSG + ":"
+ RSLT_NAME + ":" + RSLT_BIRTHDAY + ":" + RSLT_SEX_CD + ":" + RSLT_NTV_FRNR_CD + ":"
+ DI + ":" + CI + ":" + CI_UPDATE + ":" + VSSN + ":"
+ RETURN_MSG;
//vm.stringval = "CP_CD:" + CP_CD + "&RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG;
Dao.Save("sys.kcblog.in", new System.Collections.Hashtable() { { "cp_cd", CP_CD }, { "vssn", VSSN }, { "logmsg", "RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG } });
}
string gubn = "IPIN";
int sn1 = GetRand();
int sn2 = GetRand2();
string sn = sn1.ToString() + sn2.ToString();
Model.OkCert3Item okCert3item = new OkCert3Item();
okCert3item.gubn = "IPIN";
okCert3item.retVal = retVal;
okCert3item.reasonNo = reasonNo;
okCert3item.sn = sn;
okCert3item.rsltCd = rsltCd;
okCert3item.rslt = rslt;
Dao.Insert<Model.OkCert3Item>("sys.okcert3.in", okCert3item);
bool errChk = false;
string paramStr = "";
ViewBag.formUrl = "";
ViewBag.result = "";
ViewBag.rsltCd = rsltCd;
switch (reason)
{
case "Join":
if (RSLT_CD == "T000" && rsltCd == "Ok")
{
ViewBag.formUrl = "/Account/Join";
paramStr += okCert3item.no;
paramStr += "," + sn;
paramStr += "," + gubn;
paramStr += "," + reasonNo;
paramStr += "," + rsltCd;
//paramEncStr = "stringval:" + EncString(paramStr);
ViewBag.result = EncString(paramStr);
}
else
{
errChk = true;
ViewBag.result = rsltCd;
}
break;
case "AuthPlatformChange":
ViewBag.formUrl = "";
if (RSLT_CD == "T000" && rsltCd == "Ok")
{
paramStr += okCert3item.no;
paramStr += "," + sn;
paramStr += "," + gubn;
paramStr += "," + reasonNo;
paramStr += "," + rsltCd;
//paramEncStr = "stringval:" + EncString(paramStr);
ViewBag.result = EncString(paramStr);
}
else
{
errChk = true;
ViewBag.result = getOkCertErrMsg(rsltCd);
}
break;
case "MobileNumberChange":
ViewBag.formUrl = "";
if (RSLT_CD == "T000" && rsltCd == "Ok")
{
paramStr += okCert3item.no;
paramStr += "," + sn;
paramStr += "," + gubn;
paramStr += "," + reasonNo;
paramStr += "," + rsltCd;
//paramEncStr = "stringval:" + EncString(paramStr);
ViewBag.result = EncString(paramStr);
}
else
{
errChk = true;
ViewBag.result = getOkCertErrMsg(rsltCd);
}
break;
}
//ViewBag.reason = reason;
if (errChk)
{
ViewBag.result = getOkCertErrMsg(rsltCd);
}
else
{
ViewBag.result = HttpUtility.UrlEncode(ViewBag.result);
Dao.Save("sys.okcert3.setEnccd", new Hashtable { { "enccd", ViewBag.result }, { "no", okCert3item.no } });
}
}
catch (Exception e)
{
ViewBag.result = "er." + e.Message.Replace("\\r", "").Replace("\\n", "");
}
return View();
}
#endregion #endregion
/// <summary> /// <summary>

View File

@ -34,11 +34,16 @@ namespace NP.FO.Controllers
} }
else else
{ {
if (Request.IsSecureConnection && //if (Request.IsSecureConnection &&
(Request.Url.AbsolutePath.ToUpper().StartsWith("/CROOM/") || // (Request.Url.AbsolutePath.ToUpper().StartsWith("/CROOM/") ||
Request.Url.AbsolutePath.ToUpper() == "/CROOM" || // Request.Url.AbsolutePath.ToUpper() == "/CROOM" ||
Request.Url.AbsolutePath.ToUpper().StartsWith("/CDMS/")) && // Request.Url.AbsolutePath.ToUpper().StartsWith("/CDMS/")) &&
Request.Url.AbsolutePath.ToUpper() != "/CDMS/HTTPS") // Request.Url.AbsolutePath.ToUpper() != "/CDMS/HTTPS")
if (
Request.IsSecureConnection &&
Request.Url.AbsolutePath.ToUpper().StartsWith("/CDMS/") &&
Request.Url.AbsolutePath.ToUpper() != "/CDMS/HTTPS"
)
{ {
//Response.Redirect("http://" + Request.Url.Host + Request.Url.PathAndQuery, true); //Response.Redirect("http://" + Request.Url.Host + Request.Url.PathAndQuery, true);
filterContext.Result = new RedirectResult("http://" + Request.Url.Host + Request.Url.PathAndQuery); filterContext.Result = new RedirectResult("http://" + Request.Url.Host + Request.Url.PathAndQuery);

View File

@ -64,6 +64,9 @@
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath> <HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NPDao, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="NPDao, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\References\NPDao.dll</HintPath> <HintPath>..\References\NPDao.dll</HintPath>
@ -167,9 +170,6 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ApplicationInsights"> <Reference Include="Microsoft.ApplicationInsights">
<HintPath>..\packages\Microsoft.ApplicationInsights.2.2.0\lib\net45\Microsoft.ApplicationInsights.dll</HintPath> <HintPath>..\packages\Microsoft.ApplicationInsights.2.2.0\lib\net45\Microsoft.ApplicationInsights.dll</HintPath>
</Reference> </Reference>
@ -740,6 +740,8 @@
<Content Include="Views\Course\ApplyEdu_2301대체용.cshtml" /> <Content Include="Views\Course\ApplyEdu_2301대체용.cshtml" />
<Content Include="Views\Course\ApplyAgree.cshtml" /> <Content Include="Views\Course\ApplyAgree.cshtml" />
<Content Include="Views\Course\ApplyPay.cshtml" /> <Content Include="Views\Course\ApplyPay.cshtml" />
<Content Include="Views\Account\CertOk3IPIN2.cshtml" />
<Content Include="Views\Account\CertOk3MOBI2.cshtml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Base\Base.csproj"> <ProjectReference Include="..\Base\Base.csproj">

View File

@ -0,0 +1,16 @@
@using NP.Model.ENUM
@{
Layout = null;
}
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script>
$(function () {
if ("@ViewBag.formUrl" != "") {
window.opener.$('#frm').attr("action", "@ViewBag.formUrl");
}
opener.parent.certRslt("@ViewBag.result");
self.close();
})
</script>

View File

@ -65,9 +65,9 @@
$(opener.document).find("#mform").find("#mobile").val("@(TEL_NO)".replaceAll("-", "")); $(opener.document).find("#mform").find("#mobile").val("@(TEL_NO)".replaceAll("-", ""));
$(opener.document).find("#mform").find("#mobile").prop("readonly", true); $(opener.document).find("#mform").find("#mobile").prop("readonly", true);
$(opener.document).find("#mform").find("#mobilestr").text("@(TEL_NO)".replaceAll("-", "")); $(opener.document).find("#mform").find("#mobilestr").text("@(TEL_NO)".replaceAll("-", ""));
try { try {
$(opener.document).find("#mform").find("#txtbirthday").text(moment("@(RSLT_BIRTHDAY)").format('YYYY.MM.DD')); $(opener.document).find("#mform").find("#txtbirthday").text(moment("@(RSLT_BIRTHDAY)").format('YYYY.MM.DD'));
} catch (error) { } catch (error) {
} }
alert("인증완료"); alert("인증완료");
} else { } else {

View File

@ -0,0 +1,16 @@
@using NP.Model.ENUM
@{
Layout = null;
}
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script>
$(function () {
if ("@ViewBag.formUrl" != "") {
window.opener.$('#frm').attr("action", "@ViewBag.formUrl");
}
opener.parent.certRslt("@ViewBag.result");
self.close();
})
</script>

View File

@ -0,0 +1,88 @@
@using NP.Model.ENUM
@{
Layout = null;
var CP_CD = (ViewBag.result ?? "").Split(':')[0];
var TX_SEQ_NO = (ViewBag.result ?? "").Split(':')[1];
var RSLT_CD = (ViewBag.result ?? "").Split(':')[2];
var RSLT_MSG = (ViewBag.result ?? "").Split(':')[3];
var RSLT_NAME = (ViewBag.result ?? "").Split(':')[4];
var RSLT_BIRTHDAY = (ViewBag.result ?? "").Split(':')[5];
var RSLT_SEX_CD = (ViewBag.result ?? "").Split(':')[6];
var RSLT_NTV_FRNR_CD = (ViewBag.result ?? "").Split(':')[7];
var DI = (ViewBag.result ?? "").Split(':')[8];
var CI = (ViewBag.result ?? "").Split(':')[9];
var CI_UPDATE = (ViewBag.result ?? "").Split(':')[10];
var TEL_COM_CD = (ViewBag.result ?? "").Split(':')[11];
var TEL_NO = (ViewBag.result ?? "").Split(':')[12];
var RETURN_MSG = (ViewBag.result ?? "").Split(':')[13];
}
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script src="~/js/moment.js"></script>
<div>
</div>
<script type="text/javascript">
$(document).ready(function () {
if ('@(ViewBag.ret)' == '0') {
if ('@(RSLT_CD)' == 'B000') {
@if (ViewBag.reason == "Join") {
<text>
$(opener.document).find("#mform").find("#User_username").val("@(RSLT_NAME)");
$(opener.document).find("#mform").find("#User_birthday").val("@(RSLT_BIRTHDAY)");
$(opener.document).find("#mform").find("#User_mobile").val("@(TEL_NO)");
$(opener.document).find("#mform").find("#User_di").val("@(DI)");
$(opener.document).find("#mform").find("#User_ci").val("@(CI)");
$(opener.document).find("#mform").find("#intval2").val(1);
$(opener.document).find("#mform").find("#User_jointype").val(0);
$(opener.document).find("#mform").find("#User_authplatform").val("@(AuthPlatform.Mobile.GetHashCode())");
$(opener.document).find("#mform").attr("action", "/Account/Join");
$(opener.document).find("#mform").submit();
self.close();
</text>
} else if (ViewBag.reason == "MobileNumberChange") {
<text>
if ("@(RSLT_NAME)" == $(opener.document).find("#mform").find("#username").val()) {
$(opener.document).find("#mform").find("#mobile").val("@(TEL_NO)".replaceAll("-", ""));
$(opener.document).find("#mform").find("#mobilestr").text("@(TEL_NO)".replaceAll("-", ""));
alert("인증완료");
} else {
$(opener.document).find("#mform").find("#mobile").val("");
$(opener.document).find("#mform").find("#mobilestr").text("");
alert("입력한 정보와 일치하지 않습니다.\n 재인증해주세요.");
}
self.close();
</text>
} else if (ViewBag.reason == "AuthPlatformChange") {
<text>
if ("@(RSLT_NAME)" == $(opener.document).find("#mform").find("#username").val()) {
$(opener.document).find("#mform").find("#authplatform").val("@(AuthPlatform.Mobile.GetHashCode())");
$(opener.document).find("#mform").find("#authPlatform_IPIN").hide();
$(opener.document).find("#mform").find("#authPlatform_Mobile").show();
$(opener.document).find("#mform").find("#authPlatform_Mobile_Name").text("휴대폰 인증");
$(opener.document).find("#mform").find("#birthday").val("@(RSLT_BIRTHDAY)");
$(opener.document).find("#mform").find("#di").val("@(DI)");
$(opener.document).find("#mform").find("#ci").val("@(CI)");
$(opener.document).find("#mform").find("#mobile").val("@(TEL_NO)".replaceAll("-", ""));
$(opener.document).find("#mform").find("#mobile").prop("readonly", true);
$(opener.document).find("#mform").find("#mobilestr").text("@(TEL_NO)".replaceAll("-", ""));
try {
$(opener.document).find("#mform").find("#txtbirthday").text(moment("@(RSLT_BIRTHDAY)").format('YYYY.MM.DD'));
} catch (error) {
}
alert("인증완료");
} else {
alert("입력한 정보와 일치하지 않습니다.\n 재인증해주세요.");
}
self.close();
</text>
}
} else {
alert("인증요청 실패 : " + "@(RSLT_MSG)");
self.close();
}
} else {
alert("인증결과 요청 실패 :" + "@(ViewBag.ret)");
self.close();
}
});
</script>

View File

@ -31,7 +31,6 @@ else
<li class="current"><div><div><span>2. 신청서 작성</span></div></div></li> <li class="current"><div><div><span>2. 신청서 작성</span></div></div></li>
<li><div><div><span>3. 회원가입완료</span></div></div></li> <li><div><div><span>3. 회원가입완료</span></div></div></li>
</ul> </ul>
<form action="/Account/Join" id="mform" method="post"> <form action="/Account/Join" id="mform" method="post">
@Html.HiddenFor(w => w.User.birthday) @Html.HiddenFor(w => w.User.birthday)
@Html.HiddenFor(w => w.User.username) @Html.HiddenFor(w => w.User.username)
@ -132,6 +131,7 @@ else
</div> </div>
<a href="#" class="joinBtn" onclick="save()">동의 후 가입</a> <a href="#" class="joinBtn" onclick="save()">동의 후 가입</a>
</div> </div>
<input type="hidden" id="zstring0" name="zstring0" value="@Model.stringval" />
</form> </form>
@Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" }, { "isjoin", 1 } }) @Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" }, { "isjoin", 1 } })
<div id="postlayer" class="daumpost"><a href="#" class="btn btn-xxs btn-select closedaumpost" onclick="closeDaumPostcode();">close</a></div> <div id="postlayer" class="daumpost"><a href="#" class="btn btn-xxs btn-select closedaumpost" onclick="closeDaumPostcode();">close</a></div>

View File

@ -7,31 +7,31 @@
<div class="jnSel"> <div class="jnSel">
<form id="mform" action="" method="post"> <form id="mform" action="" method="post">
@Html.HiddenFor(w=>w.User.birthday) @Html.HiddenFor(w => w.User.birthday)
@Html.HiddenFor(w=>w.User.username) @Html.HiddenFor(w => w.User.username)
@Html.HiddenFor(w=>w.User.mobile) @Html.HiddenFor(w => w.User.mobile)
@Html.HiddenFor(w=>w.User.vssn) @Html.HiddenFor(w => w.User.vssn)
@Html.HiddenFor(w=>w.User.di) @Html.HiddenFor(w => w.User.di)
@Html.HiddenFor(w=>w.User.ci) @Html.HiddenFor(w => w.User.ci)
@Html.HiddenFor(w=>w.intval2) @Html.HiddenFor(w => w.intval2)
@Html.HiddenFor(w=>w.User.jointype) @Html.HiddenFor(w => w.User.jointype)
@Html.HiddenFor(w=>w.User.authplatform) @Html.HiddenFor(w => w.User.authplatform)
</form> </form>
<div> <div>
<div class="jnsCont"> <div class="jnsCont">
<img src="../img/common/join_select01.png" alt="i-PIN 인증"> <img src="../img/common/join_select01.png" alt="i-PIN 인증">
<p>i-PIN 인증</p> <p>i-PIN 인증</p>
<a href="#" onclick="certok3reqview('IPIN', 'Join');">인증하기</a> <a href="#" onclick="certok3request('IPIN', 'Join');">인증하기</a>
</div>
</div> </div>
<div> </div>
<div class="jnsCont"> <div>
<img src="../img/common/join_select02.png" alt="휴대폰 본인인증"> <div class="jnsCont">
<p>휴대폰 본인인증</p> <img src="../img/common/join_select02.png" alt="휴대폰 본인인증">
<a href="#" onclick="certok3reqview('MOBI', 'Join');">인증하기</a> <p>휴대폰 본인인증</p>
</div> <a href="#" onclick="certok3request('MOBI', 'Join');">인증하기</a>
</div> </div>
@*<div> </div>
@*<div>
<div class="jnsCont"> <div class="jnsCont">
<img src="../img/common/join_select03.png" alt="카드인증"> <img src="../img/common/join_select03.png" alt="카드인증">
<p>카드인증</p> <p>카드인증</p>
@ -40,4 +40,33 @@
</div>*@ </div>*@
</div> </div>
@Html.Partial("./Partial/OkCert3", null, new ViewDataDictionary { }) @Html.Partial("./Partial/OkCert3", null, new ViewDataDictionary { })
<p class="subDsc mt20">본인 인증 시 제공되는 정보는 해당 인증기관에서 직접 수집하며, 인증 이외의 용도로 이용 또는 저장하지 않습니다.</p> <p class="subDsc mt20">본인 인증 시 제공되는 정보는 해당 인증기관에서 직접 수집하며, 인증 이외의 용도로 이용 또는 저장하지 않습니다.</p>
<form id="frm" method="post" action="@ViewBag.result">
<input type="hidden" id="stringval" name="stringval" value="" />
</form>
<script>
function certRslt(val) {
$("#frm #stringval").val(val)
if (val.indexOf("er.") == -1) {
$("#frm").submit();
}
else {
msg(val.replace("er.",""))
}
}
</script>
@*@{
string errMsg = "";
if (ViewBag.rsltCd != "")
{
errMsg = ((string)ViewBag.rsltCd).Replace("er.", "");
<script>
$(function () {
msg("@errMsg")
})
</script>
}
}*@

View File

@ -24,14 +24,14 @@
</ul> </ul>
<input type="hidden" name="username" id="username" value="@u.username" /> <input type="hidden" name="username" id="username" value="@u.username" />
<input type="hidden" name="birthday" id="birthday" value="@u.birthday" /> <input type="hidden" name="birthday" id="birthday" value="@u.birthday" />
<input type="hidden" name="di" id="di" value="@(u.di)" /> <input type="hidden" name="di" id="di" value="@(u.di)" />
<input type="hidden" name="ci" id="ci" value="@(u.ci)" /> <input type="hidden" name="ci" id="ci" value="@(u.ci)" />
<input type="hidden" name="vssn" id="vssn" value="@(u.vssn)" /> <input type="hidden" name="vssn" id="vssn" value="@(u.vssn)" />
<input type="hidden" name="authplatform" id="authplatform" value="@(u.authplatform.GetHashCode())" /> <input type="hidden" name="authplatform" id="authplatform" value="@(u.authplatform.GetHashCode())" />
<table class="clsTable"> <table class="clsTable">
<tbody> <tbody>
<tr><th>ID</th><td><p>@u.userid</p></td></tr> <tr><th>ID</th><td><p>@u.userid</p></td></tr>
<tr><th>이름(한글)</th><td><p>@u.username</p></td></tr> <tr><th>이름(한글)</th><td><p id="username">@u.username</p></td></tr>
<tr><th>비밀번호</th><td><input type="password" class="min230" id="userpass" name="userpass" /></td></tr> <tr><th>비밀번호</th><td><input type="password" class="min230" id="userpass" name="userpass" /></td></tr>
<tr><th>비밀번호 확인</th><td><input type="password" class="min230" id="userpass2" /></td></tr> <tr><th>비밀번호 확인</th><td><input type="password" class="min230" id="userpass2" /></td></tr>
<tr> <tr>
@ -83,67 +83,60 @@
<th>생년월일</th> <th>생년월일</th>
<td> <td>
<p id="txtbirthday"> <p id="txtbirthday">
@if (!string.IsNullOrEmpty(u.birthday)) @if (!string.IsNullOrEmpty(u.birthday))
{ {
@(u.birthday.Replace("-", ".")) @(u.birthday.Replace("-", "."))
} }
</p> </p>
</td> </td>
</tr> </tr>
<tr > <tr>
<th>학습인증수단</th> <th>학습인증수단</th>
<td> <td>
<div class="mdfyBirth" id="authPlatform_IPIN" @(u.authplatform == AuthPlatform.Mobile ? "style=display:none;" : "") @(u.authplatform == AuthPlatform.None ? "style=padding-bottom:5px;" : "")> <div class="mdfyBirth" id="authPlatform_IPIN" @(u.authplatform == AuthPlatform.Mobile ? "style=display:none;" : "") @(u.authplatform == AuthPlatform.None ? "style=padding-bottom:5px;" : "")>
<p id="authPlatform_IPIN_Name">@(u.authplatform == AuthPlatform.None ? "-" : "I-PIN 인증")</p> <p id="authPlatform_IPIN_Name">@(u.authplatform == AuthPlatform.None ? "-" : "I-PIN 인증")</p>
<a href="#" onclick="certok3reqview('MOBI', 'AuthPlatformChange');" style="width:150px;">휴대폰 인증으로 변경</a> <a href="#" onclick="certok3request('MOBI', 'AuthPlatformChange');" style="width:150px;">휴대폰 인증으로 변경</a>
</div> </div>
<div class="mdfyBirth" id="authPlatform_Mobile" @(u.authplatform == AuthPlatform.IPIN ? "style=display:none;" : "")> <div class="mdfyBirth" id="authPlatform_Mobile" @(u.authplatform == AuthPlatform.IPIN ? "style=display:none;" : "")>
<p id="authPlatform_Mobile_Name">@(u.authplatform == AuthPlatform.None ? "-" : "휴대폰 인증")</p> <p id="authPlatform_Mobile_Name">@(u.authplatform == AuthPlatform.None ? "-" : "휴대폰 인증")</p>
<a href="#" onclick="certok3reqview('IPIN', 'AuthPlatformChange');" style="width:150px;">I-PIN 인증으로 변경</a> <a href="#" onclick="certok3request('IPIN', 'AuthPlatformChange');" style="width:150px;">I-PIN 인증으로 변경</a>
</div> </div>
<br /> <br />
※ 인증수단 변경 시 추가 인증을 진행해야 합니다. ※ 인증수단 변경 시 추가 인증을 진행해야 합니다.
<br /> <br />
※ 추가 인증 후 하단의 [저장] 버튼을 클릭해야 변경이 완료됩니다. ※ 추가 인증 후 하단의 [저장] 버튼을 클릭해야 변경이 완료됩니다.
</td> </td>
</tr> </tr>
<tr> <tr>
<th>연락처</th> <th>연락처</th>
<td> <td>
<div class="mdfyBirth"> <div class="mdfyBirth">
@if(u.authplatform == AuthPlatform.Mobile) <input type="hidden" name="mobile" id="mobile" value="@(u.mobile)" />
{ <p id="mobilestr">@(u.mobile)</p><a href="#" onclick="certok3reqview('MOBI', 'MobileNumberChange');">수정</a>
<input type="hidden" name="mobile" id="mobile" value="@(u.mobile)" />
<p id="mobilestr">@(u.mobile)</p><a href="#" onclick="certok3reqview('MOBI', 'MobileNumberChange');">수정</a>
}
else
{
<input type="text" id="mobile" class="int nocomma" name="mobile" maxlength="13" placeholder="휴대전화번호" value="@(u.mobile)" >
}
</div> </div>
</td> </td>
</tr> </tr>
<input type="hidden" id="asno" name="asno" value="@u.asno" /> <input type="hidden" id="asno" name="asno" value="@u.asno" />
@*<tr> @*<tr>
<th>소속</th> <th>소속</th>
<td> <td>
<ul class="sctyRadio"> <ul class="sctyRadio">
<li><input type="radio" name="isCompany" value="0" id="isCompany0" @(u.asno == null ? "checked" : "")><label for="isCompany0">개인</label></li> <li><input type="radio" name="isCompany" value="0" id="isCompany0" @(u.asno == null ? "checked" : "")><label for="isCompany0">개인</label></li>
<li><input type="radio" name="isCompany" value="1" id="isCompany1" @(u.asno == null ? "" : "checked")><label for="isCompany1">업체</label></li> <li><input type="radio" name="isCompany" value="1" id="isCompany1" @(u.asno == null ? "" : "checked")><label for="isCompany1">업체</label></li>
</ul> </ul>
</td> </td>
</tr>*@ </tr>*@
@*<tr> @*<tr>
<th>직장</th> <th>직장</th>
<td> <td>
<div class="mdfyBirth"> <div class="mdfyBirth">
<input type="hidden" id="asno" name="asno" value="@u.asno" /> <input type="hidden" id="asno" name="asno" value="@u.asno" />
<p id="asname">@(u.asname ?? "-")</p> <p id="asname">@(u.asname ?? "-")</p>
<a href="#" id="btnassign" onclick="chkassign();" style="background-color:@(u.asno == null ? "#ddd;" : "#fff;")">수정</a> <a href="#" id="btnassign" onclick="chkassign();" style="background-color:@(u.asno == null ? "#ddd;" : "#fff;")">수정</a>
</div> </div>
</td> </td>
</tr>*@ </tr>*@
<tr> <tr>
<th>학력</th> <th>학력</th>
<td> <td>
@ -195,6 +188,9 @@
</li> </li>
</ul> </ul>
</div> </div>
<input type="hidden" id="okcert3no" name="zstring0" />
<input type="hidden" id="okcert3sn" name="zstring1" />
<input type="hidden" id="okcert3gb" name="zstring2" />
</form> </form>
@Html.Partial("./Partial/OkCert3", null, new ViewDataDictionary { }) @Html.Partial("./Partial/OkCert3", null, new ViewDataDictionary { })
<ul class="lctBtn"> <ul class="lctBtn">
@ -219,16 +215,22 @@
<dd>문의 : 1544-7660</dd> <dd>문의 : 1544-7660</dd>
</dl> </dl>
@*<h5>탈퇴사유</h5> @*<h5>탈퇴사유</h5>
<textarea id="exitreason" maxlength="400" cols="30" rows="10" style="padding: 20px;"></textarea> <textarea id="exitreason" maxlength="400" cols="30" rows="10" style="padding: 20px;"></textarea>
<ul class="odrPopBtn col1"> <ul class="odrPopBtn col1">
<li><a href="#" class="bk" onclick="save(-1)">탈퇴하기</a></li> <li><a href="#" class="bk" onclick="save(-1)">탈퇴하기</a></li>
</ul>*@ </ul>*@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<form id="frm" method="post" action="@ViewBag.result">
<input type="hidden" id="stringval" name="stringval" value="" />
</form>
@Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" } }) @Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" } })
@section scriptsHeader{ @section scriptsHeader{
@Html.Partial("./Partial/ScriptPost") @Html.Partial("./Partial/ScriptPost")
@ -249,7 +251,7 @@
var referrer = document.referrer; var referrer = document.referrer;
if (referrer.toLowerCase().indexOf('myinfocheck') > 0 || referrer.toLowerCase().indexOf('snslinkcallback') > 0) { if (referrer.toLowerCase().indexOf('myinfocheck') > 0 || referrer.toLowerCase().indexOf('snslinkcallback') > 0) {
selectTab("sns"); selectTab("sns");
} }
$("input:radio[name='isCompany']").on("click", function () { $("input:radio[name='isCompany']").on("click", function () {
@ -266,10 +268,10 @@
} }
}); });
$("#userpno2").on("keyup", function () { $("#userpno2").on("keyup", function () {
setbirthday(val("userpno1") + val("userpno2")); setbirthday(val("userpno1") + val("userpno2"));
}); });
}); });
function chkassign() { function chkassign() {
var isCompany = $("input:radio[name='isCompany']:checked").val(); var isCompany = $("input:radio[name='isCompany']:checked").val();
if (isCompany == "1") { if (isCompany == "1") {
@ -277,9 +279,9 @@
} }
} }
function setbirthday(userpno) { function setbirthday(userpno) {
var birthday = ""; var birthday = "";
if (userpno.length == 13 && moment(userpno.substr(0, 6), 'YYMMDD', true).isValid() && userpno.substr(6, 1) > 0) if (userpno.length == 13 && moment(userpno.substr(0, 6), 'YYMMDD', true).isValid() && userpno.substr(6, 1) > 0)
{ {
switch (userpno.substr(6, 1)) switch (userpno.substr(6, 1))
{ {
case "1": case "1":
@ -310,7 +312,7 @@
break; break;
} }
birthday += userpno.substr(0, 2) + "-" + userpno.substr(2, 2) + "-" + userpno.substr(4, 2); birthday += userpno.substr(0, 2) + "-" + userpno.substr(2, 2) + "-" + userpno.substr(4, 2);
} }
if (val("birthday") == "" && birthday != "") { if (val("birthday") == "" && birthday != "") {
$("#txtbirthday").text(birthday.replace(/-/gi, ".")); $("#txtbirthday").text(birthday.replace(/-/gi, "."));
@ -348,12 +350,23 @@
else if (val("userpass") != "" && !ispassword(val("userpass"))) { focus("userpass"); msg("(8자 이상, 영문/숫자/특수기호 포함) 규칙으로 비밀번호를 입력해주세요."); } else if (val("userpass") != "" && !ispassword(val("userpass"))) { focus("userpass"); msg("(8자 이상, 영문/숫자/특수기호 포함) 규칙으로 비밀번호를 입력해주세요."); }
else if (isRepeatedString(val("userpass"))) { focus("userpass"); msg("반복되는 문자/숫자를 사용할 수 없습니다."); } else if (isRepeatedString(val("userpass"))) { focus("userpass"); msg("반복되는 문자/숫자를 사용할 수 없습니다."); }
else if (val("userpass") != "" && val("userpass") != val("userpass2")) { focus("userpass2"); msg("비밀번호 확인이 다릅니다."); } else if (val("userpass") != "" && val("userpass") != val("userpass2")) { focus("userpass2"); msg("비밀번호 확인이 다릅니다."); }
else if (check("mobile", null, "휴대전화번호를 입력해주세요.")) { }
else if (!ismobilenumber(val("mobile"))) { focus("mobile"); msg("휴대전화번호를 확인해주세요."); } // else if (check("mobile", null, "휴대전화번호를 입력해주세요.")) { }
// else if (!ismobilenumber(val("mobile"))) { focus("mobile"); msg("휴대전화번호를 확인해주세요."); }
else if (!isemail(val("email"))) { focus("email1"); msg("올바른 이메일주소를 입력해주세요."); } else if (!isemail(val("email"))) { focus("email1"); msg("올바른 이메일주소를 입력해주세요."); }
//else if ($("input:radio[name='isCompany']:checked").val() == "1" && check("asno", "btnassign", "직장을 선택해주세요.")) { } //else if ($("input:radio[name='isCompany']:checked").val() == "1" && check("asno", "btnassign", "직장을 선택해주세요.")) { }
else { else {
cap("/fcommon/UserPassCheck", "mform", "save2"); if ($("#authPlatform_IPIN").css("display") == "block") {
cap("/fcommon/UserPassCheck", "mform", "save2");
}
else {
if (check("mobile", null, "휴대전화번호를 입력해주세요.")) { }
else if (!ismobilenumber(val("mobile"))) { focus("mobile"); msg("휴대전화번호를 확인해주세요."); }
else {
cap("/fcommon/UserPassCheck", "mform", "save2");
}
}
} }
} else if (idx == 0) { } else if (idx == 0) {
$('html, body').addClass('lock'); $('html, body').addClass('lock');
@ -366,6 +379,8 @@
function save2() { function save2() {
if (capResult.obj == 0) { if (capResult.obj == 0) {
cap("/fcommon/usersave", "mform", "cbsave"); cap("/fcommon/usersave", "mform", "cbsave");
}else if (capResult.obj == -1) {
msg("입력된 정보와 인증정보가 일치하지 않습니다.");
} }
else { else {
msg("이미 사용된 비밀번호는 사용할 수 없습니다."); msg("이미 사용된 비밀번호는 사용할 수 없습니다.");
@ -385,6 +400,9 @@
function cbsave() { function cbsave() {
if (capResult.code == 1000) { if (capResult.code == 1000) {
msg("저장되었습니다."); msg("저장되었습니다.");
cap("/fcommon/userGetMyinfo", "mform", "cbsave2");
} else if (capResult.obj == -1) {
msg("입력된 정보와 인증정보가 일치하지 않습니다.");
} else if (capResult.obj == -2) { } else if (capResult.obj == -2) {
msg("이미 사용중인 이메일주소입니다. 다른 이메일주소를 사용해주세요."); msg("이미 사용중인 이메일주소입니다. 다른 이메일주소를 사용해주세요.");
} else { } else {
@ -392,6 +410,36 @@
} }
} }
function cbsave2() {
if (capResult.code == 1000) {
$("#mobile").val(capResult.obj.mobile)
$("#mobilestr").text(capResult.obj.MobileFormat)
if (capResult.obj.authplatform == 1) {
$("#authPlatform_IPIN").css("display", "")
$("#authPlatform_Mobile").css("display", "none")
}
else if (capResult.obj.authplatform == 2) {
$("#authPlatform_IPIN").css("display", "none")
$("#authPlatform_Mobile").css("display", "")
}
else {
$("#authPlatform_IPIN").css("display", "")
$("#authPlatform_Mobile").css("display", "")
}
$("#authplatform").val(capResult.obj.authplatform)
$("#post").val(capResult.obj.post)
$("#address1").val(capResult.obj.address1)
$("#address2").val(capResult.obj.address2)
msg("저장되었습니다.");
}
else {
msg("사용자 정보를 불러오는데 실패하였습니다.")
}
}
function selectTab(type) { function selectTab(type) {
if (type == "user") { if (type == "user") {
$("#liSnsTab").removeClass("current"); $("#liSnsTab").removeClass("current");
@ -469,7 +517,7 @@
msg("구글 아이디로 로그인에 실패했습니다."); msg("구글 아이디로 로그인에 실패했습니다.");
return; return;
}); });
} }
function loginWithNaver() { function loginWithNaver() {
$("#naverIdLogin_loginButton > img").trigger("click"); $("#naverIdLogin_loginButton > img").trigger("click");
@ -479,6 +527,46 @@
naverLogin.init(); naverLogin.init();
Kakao.init("@kakaoClientId"); Kakao.init("@kakaoClientId");
} }
function certRslt(val) {
if (val.indexOf("er.") == -1) {
$("#frm #stringval").val(val)
var data = $("#frm").serialize()
capp("/focommon/GetOkCert3Rslt", data, "certOkRslt");
}
else {
msg(val.replace("er.", ""))
}
}
function certOkRslt() {
//console.log(capResult.obj);
if (capResult.obj.username == $("#username").val().trim()) {
$("#okcert3no").val(capResult.obj.no);
$("#okcert3sn").val(capResult.obj.sn);
$("#okcert3gb").val(capResult.obj.gubn);
if (capResult.obj.gubn == "MOBI") {
$("#mobilestr").text(capResult.obj.mobile)
$("#mobile").val(capResult.obj.mobile.replace(/-/gi, ""))
}
if (capResult.obj.gubn == "IPIN") {
$("#authPlatform_IPIN").css("display", "")
$("#authPlatform_Mobile").css("display", "none")
}else if (capResult.obj.gubn == "MOBI") {
$("#authPlatform_IPIN").css("display", "none")
$("#authPlatform_Mobile").css("display", "")
}
else {
$("#authPlatform_IPIN").css("display", "")
$("#authPlatform_Mobile").css("display", "")
}
}
else {
msg("입력된 정보와 인증정보가 일치하지 않습니다.")
}
}
</script> </script>
<script src="https://apis.google.com/js/platform.js?onload=googleInit" async defer></script> @*header가 아니라 하단에 위치해야 읽어올수있음*@ <script src="https://apis.google.com/js/platform.js?onload=googleInit" async defer></script> @*header가 아니라 하단에 위치해야 읽어올수있음*@
} }

View File

@ -25,4 +25,13 @@
popupWindow.focus(); popupWindow.focus();
} }
} }
function certok3request(sel, reason, param1, param2) {
var popupWindow = window.open("/Account/CertOk3Req2?sel=" + sel + "&reason=" + reason + (param1 ? "&param1=" + param1 : "") + (param2 ? "&param2=" + param2 : ""), "auth_popup", "width=450,height=640,scrollbar=yes,resizable=no");
if (popupWindow == null) {
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
} else {
popupWindow.focus();
}
}
</script> </script>

View File

@ -173,7 +173,7 @@
<error statusCode="403" redirect="~/Account/Error403" /> <error statusCode="403" redirect="~/Account/Error403" />
<error statusCode="500" redirect="~/Account/Error500" /> <error statusCode="500" redirect="~/Account/Error500" />
</customErrors>--> </customErrors>-->
<customErrors mode="Off" > <customErrors mode="Off">
</customErrors> </customErrors>
<compilation debug="true" targetFramework="4.6" /> <compilation debug="true" targetFramework="4.6" />
<!--<compilation debug="false" targetFramework="4.6" />product--> <!--<compilation debug="false" targetFramework="4.6" />product-->
@ -191,7 +191,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />

View File

@ -30,7 +30,7 @@
<package id="Microsoft.Net.Compilers" version="2.1.0" targetFramework="net46" developmentDependency="true" /> <package id="Microsoft.Net.Compilers" version="2.1.0" targetFramework="net46" developmentDependency="true" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" /> <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
<package id="Modernizr" version="2.6.2" targetFramework="net461" /> <package id="Modernizr" version="2.6.2" targetFramework="net461" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net461" /> <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net46" />
<package id="Respond" version="1.2.0" targetFramework="net461" /> <package id="Respond" version="1.2.0" targetFramework="net461" />
<package id="Select.HtmlToPdf" version="17.3.0" targetFramework="net46" /> <package id="Select.HtmlToPdf" version="17.3.0" targetFramework="net46" />
<package id="Spring.Aop" version="2.0.1" targetFramework="net45" /> <package id="Spring.Aop" version="2.0.1" targetFramework="net45" />

View File

@ -111,4 +111,68 @@ namespace NP.Model.ENUM
/// </summary> /// </summary>
Mobile Mobile
} }
public enum CertOkReason
{
/// <summary>
/// 회원가입
/// </summary>
Join,
/// <summary>
/// 인증정보변경
/// </summary>
AuthPlatformChange,
/// <summary>
/// 핸드폰 번호 변경
/// </summary>
MobileNumberChange
}
public enum CertOkRslt
{
/// <summary>
/// 정상
/// </summary>
Ok,
/// <summary>
/// (휴대폰 본인인증) 사용시 중복 핸드폰 번호
/// </summary>
DoubleMember,
/// <summary>
/// 인증정보 사용중인 중복회원
/// </summary>
DoubleCert,
/// <summary>
/// 인증결과의 회원정보가 일치하지 않음
/// </summary>
CertError,
/// <summary>
/// 회원정보를 찾을 수 없음
/// </summary>
NoMember,
/// <summary>
/// (휴대폰 본인인증) 입력된 핸드폰 번호 없음
/// </summary>
NoPhone,
/// <summary>
/// 인증 실패
/// </summary>
NoCert,
/// <summary>
/// (아이핀) 이미 해당 ipin으로 등록된 회원이 존재합니다.
/// </summary>
DoubleiPinMember,
/// <summary>
/// (아이핀) ipin 번호 오류
/// </summary>
iPinError,
/// <summary>
/// cmino 에러
/// </summary>
CmiNo,
/// <summary>
/// cmino 에러
/// </summary>
LectNo,
}
} }

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text;
namespace NP.Model namespace NP.Model
{ {
@ -612,4 +611,29 @@ namespace NP.Model
public int? pno { get; set; } public int? pno { get; set; }
public String loginfo { get; set; } public String loginfo { get; set; }
} }
public class OkCert3Item
{
public long no { get; set; }
public string gubn { get; set; }
public string retVal { get; set; }
public int reasonNo { get; set; }
public string sn { get; set; }
public string rsltCd { get; set; }
public string rslt { get; set; }
}
public class OkCert3Result {
public long no { get; set; }
public string gubn { get; set; }
public int reasonNo { get; set; }
public string sn { get; set; }
public string rsltCd { get; set; }
public string ci { get; set; }
public string di { get; set; }
public string vssn { get; set; }
public string birthday { get; set; }
public string username { get; set; }
public string mobile { get; set; }
}
} }