readdate.asp

来自「个人备忘系统一个不错的备忘软件.专供刚学ASP的人学习. 代码简单易懂 m」· ASP 代码 · 共 59 行

ASP
59
字号
<!--#include file="conn.asp"-->
<!--#include file="html.asp"-->
<%
if session("user")="" or session("group")="" then
response.write("<script>alert('您还没有登陆或登陆超时');window.location.href('index.asp')</script>")
response.end
end if
%>

<%
id=session("id")
set rs=server.CreateObject("adodb.recordset")
cmd="select * from riji where id="&id
rs.open cmd,conn,1,1
if rs.eof then
response.write("<script>alert('无此日记!');window.location.href('writedate.asp')</script>")
response.end
end if
%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-size: 12px;
}
.style3 {
	font-size: 14px;
	color: #000000;
}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="700" border="0" align="center" bgcolor="#6699cc">
    <tr>
      <td><span class="style1">标题:</span>
        <span class="style1">
        <% =rs("title")%>
        </span>        <span class="style1">,该日记写于:</span>
        <span class="style1">
        <%=rs("time")  %>
        </span></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><span class="style3">
        <% =ubbcode(rs("all"))%>
      &nbsp;</span></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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