【仿某公司前台】 asp安全查询系统
service.htm
代码
1 <div id="safe">
2 <form action="Checksafe.Asp" method="post" name="Login" onSubmit="return CheckForm()">
3 <div>
4 <input name="SiteUrl" type="hetongNo" maxlength="20" style="font-family: 黑体;"/>
5 </div>
6 <div class="clear"><input type="button" name="Reset" onclick="reset();return false;" value="清除"/>
7 </div>
8 <div class="enter"><input type="Submit" name="Submit" value="查询"/>
9 </div>
10
11 </form>
12 </div>
2 <form action="Checksafe.Asp" method="post" name="Login" onSubmit="return CheckForm()">
3 <div>
4 <input name="SiteUrl" type="hetongNo" maxlength="20" style="font-family: 黑体;"/>
5 </div>
6 <div class="clear"><input type="button" name="Reset" onclick="reset();return false;" value="清除"/>
7 </div>
8 <div class="enter"><input type="Submit" name="Submit" value="查询"/>
9 </div>
10
11 </form>
12 </div>
checkA.asp
代码
1 <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <!--#include file="Include/Const.Asp"-->
5 <!--#include file="Include/ConnSiteData.Asp"-->
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7 <title>xxxxxx公司</title>
8 <meta content="xxx公司” name="keywords">
9 <meta content="xxxx公司" name="description">
10 <link rel="stylesheet" type="text/css" href="images/css.css"/></head>
11 <body>
12 <%
13 '=================
14
15 %>
16 <%
17 Dim rs, sql
18 Set rs = server.CreateObject("adodb.recordset")
19 sql ="select * from Howia_Safe where SiteUrl like '%"& request.Form("SiteUrl") &"%'"
20 rs.Open sql, conn, 1, 3
21 ifnot rs.eof andnot rs.bof then'如果数据库无结果
22 SiteName=request.Form("SiteName")
23 SiteUrl=request.Form("SiteUrl")
24 Ishole=rs("Ishole")
25 if SiteUrl=""then'如果网址为空
26 response.Write("请输入网站再查询!")
27 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
28 else
29 if Ishole =0then'如果处理条件为0,0未处理,-1处理
30 response.Write("未处理,请等待。。")
31 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
32 else
33 response.Write(rs("SiteUrl")) & vbcrlf
34 response.Write(rs("SiteName")) & vbcrlf
35 response.Write(rs("content")) & vbcrlf
36 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
37 Endif
38 endif
39 else
40
41 '====================
42
43 response.Write ("<script language='javascript'>alert('您的网站还没有检查,请填写下列内容!');</script>")
44 response.Write "请您认真填写,以便我们为您的网站检测!!!"
45 response.Write "<form action=""checkservice.asp"" method=""post"" name=""save"">"
46 response.Write "企业名称:<input name=""SiteName"" type=""text"" />"& vbcrlf
47 response.Write "网站地址:<input name=""Siteurl"" type=""text"" />"& vbcrlf
48 response.Write "站长说明:<textarea name=""Sitesm"" cols=""30"" rows=""3""></textarea>"& vbcrlf
49 response.Write "<input type=""button"" name=""Reset"" onclick=""reset();return false;"" value=""清除""/>"& vbcrlf
50 response.Write "<input type=""Submit"" name=""Submit"" value=""提交"" onclick=""location.href='checkservice.asp'""/>"
51 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
52 response.Write "</form>"
53
54 endif
55
56 rs.Close
57 Set rs =Nothing
58 'SafeLog表=============新增=========
59 Set rs = server.CreateObject("adodb.recordset")
60 sql ="select * from Howia_SafeLog"
61 rs.Open sql, conn, 1, 3
62 rs.addnew
63 rs("SiteName")=request.Form("SiteName")
64 rs("SiteUrl")=request.Form("SiteUrl")
65 rs("Time")=Now()
66 rs.update
67 rs.Close
68
69 %>
70
71
72 </body>
73 </html>
74
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <!--#include file="Include/Const.Asp"-->
5 <!--#include file="Include/ConnSiteData.Asp"-->
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7 <title>xxxxxx公司</title>
8 <meta content="xxx公司” name="keywords">
9 <meta content="xxxx公司" name="description">
10 <link rel="stylesheet" type="text/css" href="images/css.css"/></head>
11 <body>
12 <%
13 '=================
14
15 %>
16 <%
17 Dim rs, sql
18 Set rs = server.CreateObject("adodb.recordset")
19 sql ="select * from Howia_Safe where SiteUrl like '%"& request.Form("SiteUrl") &"%'"
20 rs.Open sql, conn, 1, 3
21 ifnot rs.eof andnot rs.bof then'如果数据库无结果
22 SiteName=request.Form("SiteName")
23 SiteUrl=request.Form("SiteUrl")
24 Ishole=rs("Ishole")
25 if SiteUrl=""then'如果网址为空
26 response.Write("请输入网站再查询!")
27 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
28 else
29 if Ishole =0then'如果处理条件为0,0未处理,-1处理
30 response.Write("未处理,请等待。。")
31 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
32 else
33 response.Write(rs("SiteUrl")) & vbcrlf
34 response.Write(rs("SiteName")) & vbcrlf
35 response.Write(rs("content")) & vbcrlf
36 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
37 Endif
38 endif
39 else
40
41 '====================
42
43 response.Write ("<script language='javascript'>alert('您的网站还没有检查,请填写下列内容!');</script>")
44 response.Write "请您认真填写,以便我们为您的网站检测!!!"
45 response.Write "<form action=""checkservice.asp"" method=""post"" name=""save"">"
46 response.Write "企业名称:<input name=""SiteName"" type=""text"" />"& vbcrlf
47 response.Write "网站地址:<input name=""Siteurl"" type=""text"" />"& vbcrlf
48 response.Write "站长说明:<textarea name=""Sitesm"" cols=""30"" rows=""3""></textarea>"& vbcrlf
49 response.Write "<input type=""button"" name=""Reset"" onclick=""reset();return false;"" value=""清除""/>"& vbcrlf
50 response.Write "<input type=""Submit"" name=""Submit"" value=""提交"" onclick=""location.href='checkservice.asp'""/>"
51 response.Write "<input type=""button"" name=""tz"" value=""返回"" onclick=""location.href='service.htm'""/>"
52 response.Write "</form>"
53
54 endif
55
56 rs.Close
57 Set rs =Nothing
58 'SafeLog表=============新增=========
59 Set rs = server.CreateObject("adodb.recordset")
60 sql ="select * from Howia_SafeLog"
61 rs.Open sql, conn, 1, 3
62 rs.addnew
63 rs("SiteName")=request.Form("SiteName")
64 rs("SiteUrl")=request.Form("SiteUrl")
65 rs("Time")=Now()
66 rs.update
67 rs.Close
68
69 %>
70
71
72 </body>
73 </html>
74
checkB.asp
代码
1 <%
2 Set rs = server.CreateObject("adodb.recordset")
3 sql ="select * from Howia_Safe "
4 rs.Open sql, conn, 1, 3
5 rs.addnew
6 rs("SiteName") =Trim(Request.Form("SiteName"))
7 rs("Ishole") =0
8 rs("SiteUrl") =Trim(Request.Form("SiteUrl"))
9 rs("Sitesm") =RTrim(Request.Form("Sitesm"))
10 rs("Safelevel") =1
11 rs("Time") =Now()
12 rs("content") ="请尽快处理!"
13 rs.update
14 rs.Close
15 set rs=Nothing
16 response.Write ("<script language='javascript'>alert('您的信息已提交!请等待我们处理!');</script>")
17 response.Write ("<script language='javascript'>location.href='service.htm';</script>")
18
19 %>
2 Set rs = server.CreateObject("adodb.recordset")
3 sql ="select * from Howia_Safe "
4 rs.Open sql, conn, 1, 3
5 rs.addnew
6 rs("SiteName") =Trim(Request.Form("SiteName"))
7 rs("Ishole") =0
8 rs("SiteUrl") =Trim(Request.Form("SiteUrl"))
9 rs("Sitesm") =RTrim(Request.Form("Sitesm"))
10 rs("Safelevel") =1
11 rs("Time") =Now()
12 rs("content") ="请尽快处理!"
13 rs.update
14 rs.Close
15 set rs=Nothing
16 response.Write ("<script language='javascript'>alert('您的信息已提交!请等待我们处理!');</script>")
17 response.Write ("<script language='javascript'>location.href='service.htm';</script>")
18
19 %>