📄 writerinfo.asp
字号:
<%
name=request.querystring("name")
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("mymdb/news.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
set rs=server.createobject("adodb.recordset")
set rs=conn.execute("Select * from admin Where username='"&name&"'")
%>
<%Session.Contents("username")=name
Session.Contents("pwa")=pwa
%>
<!--#include file="const.asp"-->
<head>
<style type=text/css><!-- -->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title>查看<%=rs("username")%>的详细资料</title>
<link rel="stylesheet" href="images/new.css">
</head>
<script language="javascript">
function popwin2(id,path)
{ window.open("list.asp?id="+id+"");
}
</script>
<body >
<div align="center"><b><%=rs("username")%>的详细资料</b><br>
<br>
</div>
<table cellSpacing=0 cellPadding=2 width="750" border=1 bordercolorlight="#666666" bordercolordark="#FFFFFF" align="center">
<tr>
<td width="75" align="center" bgcolor="#F7FDF8">姓 名</td>
<td width="214" align="center"><%=rs("username")%></td>
<td width="101" align="center" bgColor="#F7FDF8">性 别</td>
<td width="126" align="center"><%=rs("sex")%></td>
<td align="center" valign="middle" rowspan="5">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" > <img border="0" src="photo/displayphoto.asp?id=<%=rs("id")%>" width="150" height="130" align="top">
<br>
<%=rs("username")%>的照片 </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="75" align="center" bgcolor="#F7FDF8">电子邮件</td>
<td width="214" align="center"><a href="mailto:<%=rs("email")%>"><%=rs("email")%></a></td>
<td width="101" align="center" bgColor="#F7FDF8">添加文章</td>
<td width="126" align="center"><%=rs("wzs")%>篇</td>
</tr>
<tr>
<td width="75" align="center" bgcolor="#F7FDF8">申请日期</td>
<td width="214" align="center"><%=rs("addtime")%></td>
<td width="101" align="center" bgColor="#F7FDF8">站内段位</td>
<td width="126" height="29" align="center"> <%
if rs("wzs")>= 0 and rs("wzs")<10 then response.write("初段")
if rs("wzs")>=10 and rs("wzs")<20 then response.write("六段")
if rs("wzs")>=20 and rs("wzs")<40 then response.write("七段")
if rs("wzs")>=40 and rs("wzs")<80 then response.write("八段")
if rs("wzs")>=80 and rs("wzs")<160 then response.write("九段")
if rs("wzs")>=160 then response.write("天元")
%> </td>
</tr>
<tr>
<td align="center" colspan="4" bgColor="#F7FDF8"> <b>个 人 简 介 </b></td>
</tr>
<tr>
<td colspan="4"><%=rs("intro")%></td>
</tr>
<tr>
<td colspan="5">
<div align="center">
<table border="0" cellpadding="1" cellspacing="1" width="700">
<tr bgcolor="#F7FDF8">
<td width="40" align="center"> 序号 </td>
<td colspan="2" align="center"> 标题 </td>
<td width="45" align="center">
<p align="center" >阅读
</td>
<td width="40" align="center"> 评价 </td>
<td width="103" align="center"> 发表时间 </td>
</tr>
<%
sql="select * from article "
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%> <%dim Curpage,pageno,rs
whotop=request.querystring("pageno")
If Request.QueryString("CurPage") = "" then
Curpage=1
Else
Curpage=cint(Request.QueryString("CurPage"))
End if
dim sql
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("mymdb/news.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
set rs=server.createobject("adodb.recordset")
sql="Select * from article where writer='"&request("name")&"' and daifa=1 order by articleid desc"
rs.open sql,conn,1,1
RS.PageSize=20
if CurPage>RS.Pagecount then
CurPage=RS.Pagecount
end if
RS.AbsolutePage=CurPage
rs.CacheSize = RS.PageSize
%> <% i=1
do while not rs.eof and (i<RS.PageSize)
if i mod 2 <>0 then
response.write("<tr bgcolor=#FAF0E2>")
else
response.write("<tr>")
end if%>
<tr>
<td width="40" align="center"><%=rs("articleid")%></td>
<td colspan="2"><a href="javascript:popwin2(<%=rs("articleid")%>)"><font color="#000080"><%=rs("title")%></font></a></td>
<td width="45" align="center"><%=rs("hits")%></td>
<td width="40" align="center"><%=rs("reviewcount")%></td>
<td width="103" align="center"><%=rs("dateandtime")%></td>
</tr>
<% rs.movenext
i=i+1
loop
%>
<tr> 用户<b><%=name%></b>正式发表了<font color=red><%=INT(RS.recordcount)%></font>篇文章,页次:(<%=CurPage%>/<%=rs.PageCount%>)
<%if CurPage-1>=1 then%> <a href="writerinfo.asp?name=<%=Session.Contents("username")%>&pageno=<%=request.querystring("pageno")%>&CurPage=<%=CurPage-1%>"><<上一页</a>
<%end if%> <%if CurPage+1<=RS.Pagecount then%> <a href="writerinfo.asp?name=<%=Session.Contents("username")%>&pageno=<%=request.querystring("pageno")%>&CurPage=<%=CurPage+1%>">下一页>></a>
<% end if%> </tr>
</table>
</div>
<%
rs.Close
set rs=Nothing
conn.Close
set conn=Nothing
%> </td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -