📄 welcome.asp
字号:
<%
set conn=server.createObject("ADODB.Connection")
dbpath=server.mappath("club.mdb")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath
set rs=server.createobject("ADODB.Recordset")
set rs1=server.createobject("adodb.recordset")
sqltext="select newregtime,articlenum,logonnum,lives from user_info where username='"&session("username")&"' "
rs.open sqltext,conn
set rs2=server.createobject("ADODB.RecordSet")
sql1="select top 20 m.id,m.guestname,m.title,m.whattime,m.[textsize],m.clicknum,m.renum,m.feeling,m.boardid,b.boardname from mainboard m,board_info b where m.fatherid=0 and m.boardid=b.boardid order by m.clicknum desc"
rs2.open sql1,conn
sql="select geter from mails where geter='"&session("username")&"' and chek=0"
'response.write sql
'response.end
rs1.open sql,conn
if rs.bof and rs.eof then
response.write "Can't find you!"
response.end
end if
%>
<!-- and datediff('d',datevalue(m.whattime),now)<7-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css">
<!--
.12{font-size:14px;font-family:宋体,sans-serif}
.red { font-size: 12px; color: #FF0000}
-->
</style>
<title>你好</title>
<link rel="stylesheet" href="club.css">
</head>
<body bgcolor="#FFFFF8" leftmargin="16" marginwidth="3">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2" height="1" bgcolor="006600"></td>
</tr>
<tr>
<td width="9%"> </td>
<td width="91%">您好!〖<%=session("username")%>〗;
<%
if rs1.bof and rs1.eof then
response.write "您没有新邮件"
else
response.write "<a href='inbox.asp?geter="&session("username")&"'><span class='red'>您有新邮件,请查收!</span></a>"
end if%><br>
登录时间是:<font color="#FF8080"><%=rs("newregtime")%></font>,发表了<font color="#FF0000"><%=rs("articlenum")%></font>篇文章,登录了<font color="#FF0000"><%=rs("logonnum")%></font>次,您的积分为:<strong><font color="#0000FF"><%=rs("lives")%></font></strong>
<br>
最近热门文章:</td>
</tr>
<tr>
<td colspan="2" height="1" bgcolor="006600"></td>
</tr>
</table>
<br>
<table border="1" width="100%" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#FFEBA5" align="right">
<tr bgcolor="#FEDFA7">
<td width="10%">版 面</td>
<td width="45%">主题</td>
<td width="10%" align="center">发言人</td>
<td width="5%">回复</td>
<td width="25%" align="center">发言时间</td>
<td width="5%">人气</td>
</tr>
<%
if rs2.eof and rs2.bof then
response.write "<tr><td colspan='6'>没有新文章</td></tr>"
response.end
end if
for j=1 to 20
if len(trim(rs2("title")))>16 then
title=left(rs2("title"),16)&"..."
else
title=rs2("title")
end if
%>
<tr bgcolor="#FFEAA2">
<td width="10%">
<div align="center"><%=rs2("boardname")%></div>
</td>
<td width="45%">
<div align="left"><img src="browimage\<%=trim(rs2("feeling"))%>.gif"><a href="comment.asp?id=<%=rs2("id")%>&boardname=<%=rs2("boardname")%>"><%=title%></a>(<%=rs2("textsize")%>)<a href="userdet.asp?username=<%=rs2("guestname")%>"></a></div>
</td>
<td width="10%">
<div align="center"><font color="#FF6666"><a href="userdet.asp?username=<%=rs2("guestname")%><font color=" #000000"><%=rs2("guestname")%></a></font></div>
</td>
<td width="5%">
<div align="center"><font color="#3300CC"><%=rs2("renum")%></font></div>
</td>
<td width="25%">
<div align="center"><font color="#FF6666"><%=rs2("whattime")%></font></div>
</td>
<td width="5%">
<div align="center"><font color="#0000CC"><%=rs2("clicknum")%></font></div>
</td>
</tr>
<% Rs2.MoveNext
if rs2.eof then
exit for
end if
next
rs2.close
set rs2=nothing
%>
</table>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -