This commit is contained in:
ykh
2024-12-30 23:04:30 +09:00
parent c01051f024
commit 8f89991a09
45 changed files with 7567 additions and 1033 deletions

View File

@@ -87,6 +87,7 @@
Private Sub login()
Prj.Admin = False
Dim servertime As String = Format(Now, "yyyy-MM-dd HH:mm:ss")
Dim UseriNfo As ArinLogin.ArinLOgin.User_Info
If tb_id.Text.StartsWith("guest") Then
UseriNfo = New ArinLogin.ArinLOgin.User_Info()
@@ -99,6 +100,8 @@
Else
Work_msg("서버 응답을 기다리는중")
Dim L As New ArinLogin.ArinLOgin
servertime = L.Get_ServerTime()
pLog.Add(String.Format("Login Try ID = {0}", tb_id.Text))
UseriNfo = L.Check_user("eco_user", Me.tb_id.Text, Me.tb_pw.Text)
Work_msg("")
@@ -108,8 +111,11 @@
End If
End If
Dim authtype As String = UseriNfo.authtype
If authtype.StartsWith("BOTH_C_") Then authtype = "BOTH"
Select Case UseriNfo.authtype
Select Case authtype
Case "IP"
If Me.tb_id.Text.ToLower() <> "guest" AndAlso Not Me.tb_id.Text.ToLower().StartsWith("user") Then
If Prj.CUrIP.ToUpper <> UseriNfo.authip.ToUpper AndAlso UseriNfo.authip <> "0.0.0.0" Then
@@ -164,15 +170,30 @@
pLog.Add(String.Format("Login OK ID={0}", Me.tb_id.Text))
Prj.LoginTime = Format(Now, "yyyy-MM-dd HH:mi:ss")
Prj.LoginTime = servertime '/ Format(Now, "yyyy-MM-dd HH:mi:ss")
Prj.UserId = Me.tb_id.Text
Prj.UserPass = Me.tb_pw.Text
If Me.tb_id.Text.ToLower() = "guest" Then
Prj.UserAuthType = "BOTH0"
Prj.UserAuthType_Real = "BOTH0"
ElseIf Me.tb_id.Text.ToLower().StartsWith("user") Then
Prj.UserAuthType = "BOTH"
Prj.UserAuthType_Real = "BOTH"
Else
Prj.UserAuthType = UseriNfo.authtype
If Prj.UserAuthType.StartsWith("BOTH_C_") Then
Prj.UserAuthType = "BOTH"
'//server time
Dim stime As String = Prj.LoginTime.Substring(0, 7).Replace("-", "").Trim()
Dim ctime As String = UseriNfo.authtype.Substring(7).Trim()
If String.Compare(ctime, stime) < 0 Then
MsgBox("사용기간이 경과되어 로그인이 불가합니다", MsgBoxStyle.Critical, "확인")
Return
End If
End If
Prj.UserAuthType_Real = UseriNfo.authtype
End If
Save_SEtting()