<!--#include file="dbinc/dbpath.asp" -->
<%
if request.servervariables("REQUEST_METHOD")<>"POST" then
  response.redirect "index.asp"
  response.end
end if

Dim rs
set rs=server.createobject("adodb.recordset")
rs.open "Select * from zkpicksys where picksysuser='"&Trim(request.form("sysuser"))&"' and picksyspwd='"&Trim(request.form("syspwd"))&"'",conn
if rs.bof and rs.eof then
  rs.close
  set rs=nothing
  conn.close
  set conn=nothing
  response.redirect "index.asp"
  response.end
else
  if rs("picksysdo")<>"admin" then
    rs.close
    set rs=nothing
    conn.close
    set conn=nothing
    response.redirect "index.asp"
    response.end
  end if
end if

session("zkpicksysuser")=rs("picksysdo")
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "syslist.asp"
response.end
%>
