⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.asp

📁 使用Asp+Access+FSO+Jmail+Servu开发
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="online.asp"-->
<%
on error resume next
'定义全局变量
dim site,siteurl,siteemail,adminname,logourl,bannerurl,smtpserver
dim emailsuport,sitetitle,ifreg,usedays,dayreg,maxreg,regtime,ifupload
set rs2=server.createobject("adodb.recordset")
sql2="select * from config" 
rs2.open sql2,conn,1,1
vesion=rs2("vesion")
site=rs2("site")
siteurl=rs2("siteurl")
sitetitle=rs2("sitetitle")
logourl=rs2("logourl")
bannerurl=rs2("bannerurl")
siteemail=rs2("siteemail")
ftphost=rs2("ftphost")
servuini=rs2("servuini")
filters=rs2("filters")
badip=rs2("badip")
regtime=rs2("regtime")
mailtype=rs2("mailtype")
smtpserver=rs2("smtpserver")
smtpname=rs2("smtpname")
smtppass=rs2("smtppass")
subject=rs2("subject")
point=rs2("point")
if Request.ServerVariables("HTTP_X_FORWARDED_FOR")=empty then
remoteaddr=Request.ServerVariables("REMOTE_ADDR")
else
remoteaddr=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
end if
if rs2("state")=False then
response.redirect("error.asp?error=state")
response.End
end if
if badip<>"" then
badip=split(badip,"|")
for i = 0 to ubound(badip)
	if LCase(remoteaddr)=badip(i) then
		response.redirect "error.asp?error=badip"
		erro=true
		exit for
	end if
next
end if

set rs3=server.createobject("adodb.recordset")
sql3="select * from [user] where state=1" 
rs3.open sql3,conn,1,1
users=rs3.recordcount
set rs4=server.createobject("adodb.recordset")
sql4="select * from [user] where regdate='"&Date()&"'"
rs4.open sql4,conn,1,1
todayreg=rs4.recordcount
%>
<%
sub showuserlogin()
if Request.Cookies("username")<>"" then
set rslogin=server.createobject("adodb.recordset")
sqllogin="select * from [user] where username='"&Request.Cookies("username")&"' and state=1"
rslogin.open sqllogin,conn,1,1
if rslogin.eof and rslogin.bof then   
response.write"对不起<br>您的帐号已经被锁定或删除<br>请<a href=login.asp>重新登录</a>!"
Response.Cookies("username")=""
end if
groups=rslogin("groups")
set rshost=server.createobject("adodb.recordset")
sqlhost="select * from [host] where id="&cint(groups)
rshost.open sqlhost,conn,1,1
spacetype=rshost("type")
if rshost("type")="free" then usertype="免费用户"
if rshost("type")="vip" then usertype="付费用户"
strLogin= "<table width=90% border=0 align=center cellpadding=2 cellspacing=0>"
strLogin=strLogin & "<tr align=center><td colspan=2>欢迎<font color=#FF0000><strong>"&Request.Cookies("username")&"</strong></font>的光临!</td>"
strLogin=strLogin & "</tr><tr><td width=84>用户类型:</td><td width=83>"&usertype&"</td>"
strLogin=strLogin & "</tr><tr><td>登录次数:</td><td width=83>"&rslogin("logins")&"</td>"
strLogin=strLogin & "</tr><tr><td>帐户余额:</td><td>¥"&rslogin("money")&"元</td></tr><tr>"
strLogin=strLogin & "</tr><td>帐户积分:</td><td>"&rslogin("point")&"</td></tr><tr>"
strLogin=strLogin & "<td height=20 colspan=2 align=center><a href=member.asp>管理中心</a> <a href=login.asp?action=loginout onclick=""return confirm('确定要退出吗?');"">退出管理</a></td></table>"
response.write strLogin
else
%>
<script language="javascript">
<!--
function check_input()  
{  
	if (frm.username.value=="")
	{   alert("请输入用户名!");
		frm.username.focus();
		return false;
	}
	if (frm.password.value=="")
	{   alert("请输入密码!");
		frm.password.focus();
		return false;
	}
	if (frm.code.value=="")
	{   alert("请输入验证码!");
		frm.code.focus();
		return false;
	}
    return true;
}
//-->
</script>
<%
strLogin= "<table width=90%  border=0 cellspacing=2 cellpadding=0>"
strLogin=strLogin & "<form name=frm method=post action=chk_login.asp target=_top>"
strLogin=strLogin & "<tbody><tr><td width=42% align=right >用户名:</td>"
strLogin=strLogin & "<td colspan=2><input name=username class=input type=text size=12></td></tr><tr>"
strLogin=strLogin & "<td align=right>密 码:</td><td colspan=2><input name=password class=input type=password size=12></td></tr>"                  
strLogin=strLogin & "<tr><td align=right>验证码: </td><td width=43> <input name=code type=text class=input size=4 ONKEYPRESS='event.returnValue=IsDigit();' maxlength=4></td><td><img src=inc/getcode.asp></td></tr>"                    
strLogin=strLogin & "<tr><td height=25 colspan=3 align=center> <input name=submit type=image src=images/login.gif onClick='return check_input();'> <a href=reg.asp><img src=images/reg.gif border=0></a></td></tr></form>"                  
strLogin=strLogin & "<tr><td height=20 colspan=3 align=center><a href=getpass.asp style='cursor:help'>忘记密码?</a></td></tr></table>" 
response.write strLogin
end if
end sub
sub mb(byval txt,byval url,byval go)
  response.write "<script language=Javascript>alert('"&txt&"');"
  if go<>1 then
    response.write "history.go(-1);"
  else
    response.write "document.location.href='"&url&"';"
  end if
  response.write "</script>"
  response.end
end sub
sub alert(byval txt,byval url,byval go)
  response.write "<script language=Javascript>window.opener.location.reload();alert('"&txt&"');"
  if go<>1 then
    response.write "history.go(-1);"
  else
    response.write "document.location.href='"&url&"';"
  end if
  response.write "</script>"
  response.end
end sub
sub showvote()
	dim sqlvote,rs,i
	sqlvote="select top 1 * from vote where isselected=1"
	set rs= server.CreateObject("ADODB.Recordset")
	rs.open sqlvote,conn,1,1
	if rs.bof and rs.eof then 
		response.Write "<center>目前暂无信息!</center>"
	else
		response.write("<table border=0 cellspacing=0 cellpadding=2>")
		response.write "<form action='vote.asp?action=vote' method=post target='vote_view'>"
		response.write("<tr><td align=center height=25><font color=#CC3300><b>"&rs("Title")&"</b></font></td></tr>")
		if rs("voteType")="single" then
			for i=1 to 8
				if trim(rs("select"&i)&"")="" then exit for
				response.Write "<tr><td><input type='radio' name='voteOption' value='"&i&"'>"&rs("select"&i)&"</td></tr>"
			next
		else
			for i=1 to 8
				if trim(rs("select"&i)&"")="" then exit for
				response.Write "<tr><td><input type='checkbox' name='voteOption' value='"&i&"'>"&rs("select"&i)&"</td></tr>"
			next
		end if
		response.write "<input name='voteType' type='hidden' value='"&rs("voteType")&"'>"
		response.write "<input name='id' type='hidden' value='"&rs("id")&"'>"
		response.write "<tr><td align=center height=25><input name=submit type=image src=images/votesubmit.gif onclick=javascript:open_win('','vote_view',520,280,'no');>"
		response.write "&nbsp;&nbsp;<a href=#none onClick=javascript:open_win('vote.asp?action=view','vote_view',520,280,'no');><img src=images/voteview.gif border=0></a></td></tr>"
		response.write "</form></table>"
	end if
	rs.close
	set rs=nothing
end sub
sub WriteErrMsg()
	dim strErr
	strErr=strErr & "<html><head><title>错误信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
	strErr=strErr & "<link href='style.css' rel='stylesheet' type='text/css'></head><body><br><br>" & vbcrlf
	strErr=strErr & "<table cellpadding=2 cellspacing=1 border=0 width=400 class='border' align=center>" & vbcrlf
	strErr=strErr & "  <tr align='center' class='title'><td height='22'><strong>错误信息</strong></td></tr>" & vbcrlf
	strErr=strErr & "  <tr class='tdbg'><td height='100' valign='top'><b>产生错误的可能原因:</b>" & errmsg &"</td></tr>" & vbcrlf
	strErr=strErr & "  <tr align='center' class='tdbg'><td class=td2><a href='javascript:history.go(-1)'>&lt;&lt; 返回上一页</a></td></tr>" & vbcrlf
	strErr=strErr & "</table>" & vbcrlf
	strErr=strErr & "</body></html>" & vbcrlf
	response.write strErr
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -