📄 article.asp
字号:
<!--#include file=blogdata.asp-->
<!--#include file=function.asp-->
<!--#include file=top.asp-->
<%
if not isnumeric(request("id")) then
Response.Redirect"index.asp"
response.end
end if
%>
<%
if request("id")=0 then
Response.Redirect"index.asp"
response.end
end if
%>
<%
dim sql,rs1
set rss = server.createobject("adodb.recordset")
sql="select * from article where id="&request("id")&" order by id desc"
rss.open sql,conn,1,1
if rss.eof and rss.bof then
response.write"<script language=javascript>history.go(-1);</script>"
end if
%>
<SCRIPT type=text/javascript>
function sendForm(obj)
{
if( obj.username.value=="" )
{
alert("用户名不能为空");
obj.username.focus();
return false;
}
if( obj.cont.value=="")
{
alert("评论内容不能为空");
obj.content.focus();
return false;
}
obj.submit();
return true;
}
</SCRIPT>
<HTML>
<HEAD>
<TITLE>查看日志</TITLE>
<META http-equiv=content-type content="text/html; charset=gb2312">
<LINK href="images/lx.css" type=text/css rel=stylesheet>
<A name=top></A>
<TABLE class=columns>
<TBODY>
<TR>
<TD class=left>
<DIV class=box>
<H5> 日志分类 </H5>
<DIV class=body>
<TABLE class="content odd" width="99%" id="table1">
<TBODY>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from class" ,conn,1,1
if rs.eof and rs.bof then
response.write"暂无分类"
end if
do while not rs.eof
%>
<TR>
<td style="letter-spacing:2px;line-height:20px; font-family:Tahoma; font-size:9pt" valign="top">
<img src="images/document_icon.gif"><a href="class.asp?id=<%=rs("id")%>"><%=rs("class")%></font></a></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</TBODY></TABLE></DIV></DIV>
<DIV class=box>
<H5> 最新日志</H5>
<DIV class=body>
<TABLE class="content odd" width="99%">
<TBODY>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select top 10 * from article" ,conn,1,1
if rs.eof and rs.bof then
response.write"暂无日志"
end if
do while not rs.eof
%>
<TR>
<TD><img src="images/document_icon.gif"><a href="article.asp?id=<%=rs("id")%>"><%
dim text
text=rs("title")
response.write left(text,15)
%>...</a></TD></TR>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</TBODY></TABLE></DIV></DIV> <TD class=main vAlign=top><BR>
<TABLE cellSpacing=0 cellPadding=0 width="715" border=1 bordercolor="#8CACBB" style="border-collapse: collapse">
<TBODY>
<TR>
<TD style="PADDING-LEFT: 10px" width="397" height=15 bgcolor="#DEE7EC">标题:<%=rss("title")%></TD>
<TD style="PADDING-LEFT: 10px" width="98" height=15 bgcolor="#DEE7EC">分类:
<%
dim id,rs2
id=rss("class")
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from class where id="&id ,conn,1,1
if rs2.eof and rs2.bof then
response.write"暂时没有信息!"
end if
%>
<%=rs2("class")%>
</TD>
<TD style="PADDING-LEFT: 10px" width="109" height=15 bgcolor="#DEE7EC">时间:<%if rss("time")=date() then%>
<%=year(rss("time"))%>-<%=month(rss("time"))%>- <%=day(rss("time"))%>
<%else%>
<%=year(rss("time"))%>-<%=month(rss("time"))%>-<%=day(rss("time"))%>
<%end if%></TD>
<TD style="PADDING-LEFT: 10px" width="63" height=15 bgcolor="#DEE7EC" valign="middle"><a href="admin.asp?article=del&id=<%=rss("id")%>">删除</a>
<font color="#436976">/</font><a href="edit_article.asp?id=<%=rss("id")%>">编辑</a></TD>
</TR>
<TR>
<TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 160%" width="703"
height=28 % colspan="4"?>
<div align="center">
<table cellpadding="0" cellspacing="0" width="692" height="20">
<tr>
<%=Checkstr(rss("cont"))%><td height="20">
</td>
</tr>
</table>
</div></TD></TR>
<TR>
<TD style="BORDER-TOP: #cccccc 1px solid" align=right width=713
height=15 colspan="4">
<p align="left"> </TD></TR>
<TR>
<TD style="BORDER-TOP: #cccccc 1px solid" align=middle height=26 colspan="4">
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0 height="208">
<FORM name=commentForm action=ok.asp?id=<%=request("id")%> method=post>
<INPUT type=hidden value=1 name=channelid> <INPUT type=hidden value=39 name=catid> <INPUT type=hidden value=article name=item>
<TBODY>
<TR>
<TD>网名: <INPUT id=username size=10 name=name>
</TD></TR>
<TR>
<TD>内容:(不支持HTML,不支持UBB,所以请不要跨站,文明用语)</TD></TR>
<TR>
<TD>
<TEXTAREA id=content style="WIDTH: 80%; HEIGHT: 100px" name=cont rows=4 cols=75></TEXTAREA><INPUT onclick=sendForm(this.form); type=button value="发 布" name=go>
</FORM>
<hr color="#8CACBB" size="0">
<%
dim rs3
set rs3 = server.createobject("adodb.recordset")
rs3.open "select * from pl where id="&request("id")&" order by id desc",conn,1,1
if rs3.eof and rs3.bof then
response.write""
end if
do while not rs3.eof
%>
<table cellpadding="0" cellspacing="0" width="708" border="1" bordercolor="#8CACBB" style="border-collapse: collapse">
<tr>
<td height="12" valign="top" bgcolor="#DEE7EC" width="615"> <%=rs3("name")%>:</td>
<td height="12" valign="top" bgcolor="#DEE7EC" width="87"> <a href="admin.asp?pl=del&id=<%=rs3("id")%>">删除</a></td>
</tr>
<tr>
<td height="30" valign="top" width="706" colspan="2">
<div align="center">
<table cellpadding="0" cellspacing="0" width="700" height="27">
<tr>
<td height="27"><%=rs3("cont")%></td>
</tr>
</table>
</div></td>
</tr>
</table>
<hr color="#8CACBB" size="0">
<%
rs3.movenext
loop
rs3.close
set rs3=nothing
%>
</TD></TR></TBODY></TABLE></TD></TR>
</TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file=Bottom.asp-->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -