Files
ls-2019-source/DB/20181018LoginIPChange/playUrl.asp
T
2026-11-07 13:30:45 +07:00

235 lines
5.5 KiB
Plaintext

<% OPTION EXPLICIT %>
<!-- #include file = "createKey.asp" -->
<%
Response.Expires = 0
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache, no-store, must-revalidate"
Response.AddHeader "Expires", "-1"
Dim db, dbcon, sql, rs
Dim userID, accountIDX, zoneType, zoneName, gameServerID, userIP
Dim useKey, fixKey
Dim oEncryptor, encodeID, encodeKey, encodeIP, encodeIPKey, sendKeyString, prevKey, exeTime, chgKeyTime
userID = session("userID")
zoneType = Request.Form("zoneType")
useKey = ""
chgKeyTime = 5
userIP = Request.Servervariables("REMOTE_HOST")
Select Case zoneType
Case 1 :
zoneName = "QA_ZONE"
%><!-- #include file = "cnn_game_qa.asp" --><%
Case 3 :
zoneName = "DEV_ZONE"
%><!-- #include file = "cnn_game_dev.asp" --><%
Case Else
zoneName = "DEV_ZONE"
%><!-- #include file = "cnn_game_dev.asp" --><%
End Select
If userID = "" or isNull(userID) or Len(userID) = 0 Then
db.close
Set db=Nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert("You can play after login.");
top.location.replace("/default.asp");
//-->
</SCRIPT>
<%
Response.End
End If
'세션 accountIDX 값이 싱글존으로 되어 있어서 다른존과 accountIDX 불일치. 때문에 accountIDX 가져오는 구문 추가
sql = "EXEC web_get_accountIDX '" & userID & "'"
Set rs = db.Execute(sql)
If rs.eof and rs.bof Then
rs.close
Set rs=Nothing
db.close
Set db=Nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert("Membership was not successful.");
history.back();
//-->
</SCRIPT>
<%
Response.End
End If
accountIDX = rs("accountIDX")
sql = "EXEC web_game_server_get_data_top1"
Set rs = db.Execute(sql)
If rs.eof and rs.bof Then
rs.close
Set rs=Nothing
db.close
Set db=Nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert("No servers are running.");
history.back();
//-->
</SCRIPT>
<%
Response.End
Else
gameServerID = rs("serverID")
End If
useKey = CreateEncodeKey()
sql = "EXEC web_user_login_count '" & userID & "'"
Set rs=db.Execute(sql)
If rs(0) = 0 Then
rs.close
Set rs=Nothing
db.close
Set db=Nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert("No sign in information. \ N \ nPlease contact your administrator.");
top.location.replace("/default.asp");
//-->
</SCRIPT>
<%
Response.End
End If
sql = "EXEC web_user_login_enkey_get_data '" & accountIDX & "'"
Set rs = db.Execute(sql)
If rs.eof and rs.bof Then
rs.close
Set rs=Nothing
db.close
Set db=Nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert("존별로 유저인덱스가 틀려 접속 <%=zoneName%>에는 접속할 수 없습니다");
history.back();
//-->
</SCRIPT>
<%
Response.End
End If
prevKey = rs("encodeKey")
exeTime = rs("connDate")
If DateDiff("n",exeTime,Now()) < chgKeyTime Then
useKey = prevKey
Else
sql = "EXEC web_user_login_enkey_update '" & userID & "', '" & useKey & "', '" & userIP & "'"
db.Execute(sql)
End If
sql = "EXEC web_fixkey_get_data"
Set rs=db.Execute(sql)
fixKey = rs(0)
Set oEncryptor = Server.CreateObject("IoEncrypt.Encrypt")
encodeID = oEncryptor.Encode15 (userID,fixKey)
encodeKey = oEncryptor.Encode15 (useKey,useKey)
encodeIP = oEncryptor.Encode15 (userIP,fixKey)
encodeIPKey = oEncryptor.Encode15 (useKey,fixKey)
Set oEncryptor = Nothing
Dim strSenKeyString
strSenKeyString = encodeKey & encodeID
Dim strSenIPKeyString
strSenIPKeyString = encodeIPKey & encodeIP
rs.close
Set rs=Nothing
db.close
Set db=Nothing
'response.write(zoneName)
'response.end
'------------------------------------------------------------------------------------------------------------
' 프로토콜 설정
'------------------------------------------------------------------------------------------------------------
Dim strProtocol
strProtocol = "LostSagaQA"
%><!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head>
<title>로스트사가 게임 실행 중입니다. | 로스트사가</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="expires" content="-1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="util.js"></script>
<script type="text/javascript" src="protocolcheck.js"></script>
<script type="text/javascript">
$(function ()
{
protocolCheck($("#playgame").attr("href"),
function () {
goUrl("webmanager.asp");
},
function () {
goUrl("default.asp");
}
);
});
</script>
</head>
<body class="playing">
<a id="playgame" style="display:;" href="<%=strProtocol%>://<%=strSenKeyString%>,<%=strSenIPKeyString%>,<%=gameServerID%>"></a>
<input type="hidden" id="loginKey" value="<%=strSenKeyString%>" />
<h2 class="blind">게임 실행</h2>
<div class="btnArea">
<button type="button" class="btnImg btnGameRe" title="게임 재실행하기" onclick="goUrl('playUrl.asp')">게임 재실행하기</button>
</div>
<div class="loadingPop">
<div class="loading">
<p>로딩중입니다. 잠시만 기다려주세요. 최초 실행 시 로스트사가 웹매니저 설치 페이지로 이동합니다</p>
</div>
<div id="bgDark"></div>
</div>
</body>
</html>