www.gusucode.com > 维六酷博客管理系统 1.1源码程序 > conn.asp

    <!--#include file="inc/function.asp"-->
<%
'On Error Resume Next
dbpath = "App_Data/!#9@2%designV7.asp"
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.Mappath(dbpath)
Set conn=Server.CreateObject("ADODB.Connection")
conn.open ConnStr
If Err.Number <> 0 Then
   Response.write "数据库链接出错!文件:inc/conn.asp!"
   Response.End()
end if
%>
<%
Set rs=conn.Execute("select top 1 * From WebBasicInfo")
	siteName=rs("W_WebSiteName")
	keywords=rs("W_WebSiteKeyword")
	descripton=rs("W_WebSiteIntr")
	question=rs("W_StatMastEmail")
	jhDate=rs("W_WebSiteCopyInfo")
	siteIsComment=rs("W_BBsCataShowClose")
Set rs=Nothing

If RequestFormStr("action")="CHECKPASSWORD" Then
	password=RequestFormStr("password")
	If password="" Then
		Call MessageBox("请输入答案!","")
		Response.End
	End If
	Set rs=conn.Execute("select * From WebBasicInfo Where W_StatMastQQ='"& password &"'")
	If rs.bof And rs.eof Then
		Call MessageBox("答案不正确!","")
		Response.End
	Else
		Session("password")=rs("W_StatMastQQ")
		session.timeOut=600
	End If
	Set rs=nothing
Else


If question<>"" Then
	If Session("password")="" then
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=siteName%></title>
<META NAME="Keywords" CONTENT="<%=keywords%>">
<META NAME="Description" CONTENT="<%=descripton%>">
<style type="text/css">
<!--
body {
	color:#FFFFFF;
	background-color: #000000;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor='#000000' >
<table align="center">
<tr><td height="250"></td></tr>
<tr><td>
<form name="form1" action="" method="post">
<input type="hidden" name="action" value="CHECKPASSWORD" >
问题:<%=question%><br>
答案:<input type="text" name="password" size="15" class="css">
		<input type="submit" name="submit" value="查看" class="css">
		</form>
	</td></tr></table>
</body>
</html>
<%
	Response.End
	End If
	
End If
End If
%>