index_sdl.asp
来自「修正的自由领域投票系统2.0 支持文件上传」· ASP 代码 · 共 37 行
ASP
37 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="const.asp"-->
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户登录中......</title>
</head>
<% sname=trim(request.Form("sname"))
sname=replace(sname,"'","")
sname=replace(sname,"?","")
sname=replace(sname,"<","")
sname=replace(sname,">","")
sid=trim(request.Form("sid"))
sid=replace(sid,"?","")
sid=replace(sid,"'","")
sid=replace(sid,"<","")
sid=replace(sid,">","")
set rs=conn.execute("select * from ec where sname='"&sname&"' and sid='"&sid&"'")
if rs.eof or rs.bof then
response.Write("<script>window.alert('姓名或学号错误!');history.go(-1)</script>")
set rs=nothing
set conn=nothing
response.End()
else
response.Cookies("tfot_tp")("sname")=sname
response.Cookies("tfot_tp")("sid")=rs("sid")
set rs=nothing
set conn=nothing
response.Redirect("index.asp")
end if
%>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?