-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.asp
88 lines (66 loc) · 2.54 KB
/
start.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include file="adovbs.inc"-->
<% Response.Buffer = True
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="Provider=SQLOLEDB;User ID=sa;Password=Kt6261;Initial Catalog=warpspire"
objConn.Open
Dim strSQL
Dim objRS
Dim strUserName
Dim strPassword
Dim IP, LoginTime
IP = Request.Servervariables("REMOTE_ADDR")
LoginTime = Now()
strUserName = Request.Form("UserName")
strPassword = Request.Form("Password")
If strUserName = "" Then
strUserName = Request.Cookies("NightFire")("UserName")
strPassword = Request.Cookies("NightFire")("Password")
End If
Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM Users WHERE UserName = '" & strUserName & "' AND Password = '" & strPassword & "'"
objRS.Open strSQL, objConn, adOpenStatic, adLockPessimistic
%>
<HTML>
<HEAD>
<TITLE>NightFire</TITLE>
<link rel=stylesheet href="game.css" type="text/css">
<%
IF objRS.EOF = True THEN
%>
</HEAD>
<DIV>
</DIV><BR><BR>
<BODY BGCOLOR='#000000' text='#ffffff' link='#ffffff' vlink='#ffffff' alink='ffcc33' MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 BOTTOMMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0><div><CENTER><div class = "normal">Sorry, but your request to login failed. Please try again.</div><FORM ACTION='start.asp' METHOD='POST'><table><tr><td><div>Username: </div></td><td><INPUT MAXLENGTH='25' NAME='UserName'SIZE='20' TYPE='TEXT' class = 'numbar'></td></tr><tr><td><div>Password: </div></td><td><INPUT MAXLENGTH='25' NAME='Password' SIZE='20' TYPE='PASSWORD' class = 'numbar'></td></tr><tr><td align='center' colspan='2'><INPUT TYPE='submit' VALUE='Login' class = 'button'></td></tr></table></body>
<%
ELSE
Response.Cookies("NightFire")("UserName") = strUserName
Response.Cookies("NIghtFire")("Password") = strPassword
Response.Cookies("NightFire").Expires = DateAdd("h", 2, Now())
objRS("IP") = IP
objRS("LoginTIme") = LoginTime
objRS.Update
Dim RS
Set RS = objConn.Execute("SELECT UserName, SystemNumber FROM GENERALINFO WHERE UserName = '"&strUserName&"'")
Dim SystemNumber
SystemNumber = RS("SystemNumber")
RS.Close
Response.Cookies("NightFire")("SelectedSystem") = SystemNumber
%>
<frameset cols='150, *' border=0 bordercolor='#000000'>
<frame src='side.asp' name='sidebar'>
<frame src='main.asp' name='main'>
</frameset>
<noframes>
Your browser must support frames to play this game.
</noframes>
<%
END IF
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
%>
</HTML>