📄 index.asp
字号:
<%
user=request("user")
p=request("page")
session("adminuser")=""
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<%
session("root")="http://blueyr.com/"
set conn=server.createobject("ADODB.CONNECTION")
conn.open "DBQ="+server.mappath("pfcr1015.asp")+";DRIVER={Microsoft Access Driver (*.mdb)};"
set rs1=server.createobject("adodb.recordset")
sql1="SELECT * from admin"
rs1.open sql1,conn,1,1
if user="" then user=rs1("name")
see=-1
set rs2=server.createobject("adodb.recordset")
sql2="SELECT * from user where user='"&user&"'"
rs2.open sql2,conn,1,1
if not rs2.eof then
url=rs2("url")
mail=rs2("mail")
see=rs2("see")
logo=rs2("logo")
end if
if logo="" or isnull(logo) then logo="images/girl.gif"
if session("user")<>user then
sql2="update user set see=see+1 WHERE user='"&user&"'"
conn.execute(sql2)
session("user")=user
end if
set rs=server.createobject("adodb.recordset")
sql="SELECT * from txt where 用户='"&user&"' order by 年*10000+月*100+日 desc"
rs.open sql,conn,1,1
%>
<title><%=user%>的日记本</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style>
BODY {BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url('<%=logo%>'); BACKGROUND-POSITION: center; BACKGROUND-REPEAT: no-repeat;scrollbar-track-color:#ffffff; SCROLLBAR-FACE-COLOR: #ffffff; FONT-SIZE: 9pt; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #dddddd; SCROLLBAR-3DLIGHT-COLOR: #dddddd; SCROLLBAR-ARROW-COLOR: #dddddd; FONT-FAMILY: "Verdana"; SCROLLBAR-DARKSHADOW-COLOR: #ffffff
}
select, input{font-size:8pt; color:#666666;}
textarea{font-size:14; color:#666666}
A {
COLOR: #333333; TEXT-DECORATION: none ;border-bottom:1px dotted
}
A:hover {
COLOR: #333333; background-color:#C0FFFF;
}
td {
FONT-SIZE: 9pt; FONT-FAMILY: "Verdana"; color:#3333333;letter-spacing : 1pt ;line-height :14pt}
</style>
</head>
<body topmargin="3" leftmargin="0" bgcolor="#FFFFFF">
<div align="center">
<center>
<img src="images/dia-b-title.gif" width="417" height="200">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table border="0" width="49%" cellspacing="0" cellpadding="0">
<tr>
<td nowrap><img border="0" src="images/08.gif" width="11" height="10">
<%=user%>的日记本</td>
<td align="right" nowrap> |<a href="calendar.asp?user=<%=user%>" title=按日历选择查看日记内容> 日历 </a>|<a href="pass.asp?user=<%=user%>" title=日记的修改、增加、删除、配置> 管理 </a>|<a href="<%=url%>" title=返回主页<%=url%>> 主页 </a>|<a href="list.asp?user=<%=user%>" title=看看其他人的日记> 列表 </a>|<a href="reg.asp" title=申请你自己的日记本> 申请 </a>|</td>
</tr>
</table>
<br>
<table width="55%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/t-h_p-s.gif"><img src="images/t-h_p-s.gif" width="26" height="12"></td>
</tr>
</table>
</center>
</div>
<center>
<%if see<0 then
response.write "<p><a href=reg.asp>还没有申请不能使用,您可以点这里立刻申请日记本!</a></p>"
end if%>
<%if rs.eof and rs.bof then
response.write "<p>还 没 有 一 则 日 记</p>"
else%>
<%
cc=1
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs.PageSize=rs1("page")
rs.AbsolutePage=pagecount
For iPage = 1 To rs.PageSize
If rs.EOF Then Exit For
%>
<table width="50%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><img src="images/dia-b-icon.gif" width="21" height="21"> <%=rs("年")%>年<%=rs("月")%>月<%=rs("日")%>日
<%if DateDiff("d",rs("addtime"),date())<1 then%>
<%end if%>
<%=rs("天气")%> <img src='<%=rs("心情")%>' border=0></td>
</tr>
<tr>
<td><img src=images/icon.gif height=8 width=24 border=0 hspace=0>
<%if rs("保密")<>"y" then%>
<%=rs("日记内容")%>
<%else%>
本则日记保密.......
<%end if%>
</td>
</tr>
</table>
<br>
<table width="55%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/t-h_p-s.gif"><img src="images/t-h_p-s.gif" width="26" height="12"></td>
</tr>
</table>
<br>
<%
cc=cc+1
rs.movenext
Next
Response.Write "<p>共"&rs.recordcount&"则日记,每页"
Response.Write rs1("page")
Response.Write "则,共"
Response.Write int(rs.recordcount/rs1("page")+.999999)
Response.Write "页,这是第"
Response.Write PageCount
Response.Write "页 "
if rs.PageCount>1 Then
If pagecount<>1 Then
Response.Write "<A HREF=index.asp?user="&rs2("user")&">首页</A> "
Response.Write "<A HREF=index.asp?Page="&(pagecount-1)&"&user="&rs2("user")&">前页</A> "
End If
If pagecount<>rs.PageCount Then
Response.Write "<A HREF=index.asp?Page="&(pagecount+1)&"&user="&rs2("user")&">后页</A> "
Response.Write "<A HREF=index.asp?Page="&rs.PageCount&"&user="&rs2("user")&">尾页</A>"
End If
End If
end if
%>
<font color="888888" face="Arial">[访问<%=see%>次]</font><br>
<br>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/t-h_p-s.gif"><img src="images/t-h_p-s.gif" width="26" height="12"></td>
</tr>
</table>
<table class=td2 width="50%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td nowrap align="center">网站设计:<a href="http://285224767.qzone.qq.com">谭娅玲</a>
袁华.t</td>
</tr>
</table>
</center>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%><br>
<NOSCRIPT><IFRAME SRC=index.asp></IFRAME></NOSCRIPT>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -