home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
221.214.14.186
/
221.214.14.186.tar
/
221.214.14.186
/
jn
/
ls
/
SCHQ
/
DATA
/
admins.inc.asp
next >
Wrap
Text File
|
2003-10-31
|
870b
|
30 lines
<%
function check(username,password)
dim con , sql,rs
set con=server.CreateObject("ADODB.connection")
con.open constr
sql="select * from TAdmins where username='" & userName & "'"
set rs=con.execute (sql)
if not rs.eof then
if rs("password")=password then
session("AdminsID")=rs("AdminsID")
session("power")=rs("power")
session("homepage")=rs("homepage")
check=rs("power")
'session("username")=username
'session("password")=password
session("allname")=rs("allname")
session("lastDate")=rs("lastDate")
session("counts")=rs("counts")
sql="update TAdmins set counts=counts+1 ,lastdate='"& Now() &"'"
sql=sql & ",hostip='"& Request.ServerVariables("REMOTE_ADDR") &"' where AdminsID=" & session("AdminsID")
con.execute sql
else
check=0
end if
else
check=0
end if
con.close
end function
%>