article.asp

来自「三鸟个人网站源码。」· ASP 代码 · 共 245 行

ASP
245
字号
<%@ LANGUAGE = VBScript.Encode %>
<!--#include file="adovbs.inc" -->

<!--#include file="conn.asp" -->
<%'on error resume next
   id=trim(request("id"))
   classid=request("classid")
  sp=request("sp")
   
 if id="" or classid=""  then 
     response.write "<br><center><font size=3 color=#cc3366><b>你没有选择标题!</b></font></center>"
     iterror=1     '定义一个标志性的变量
     response.end
 else
    id=clng(id)
 end if

if iterror<>1 then 
 set rs=server.createobject("adodb.recordset")
 rs.cursortype=adopenstatic

    if sp="" then'判断是否来自下一或上一篇
         rs.open "select * from article where id="&id&" order by id desc" ,conn

    else'如果是来自下一或上一则执行下面的操作
       rs.open "select * from article where lanmuid="&classid&" order by id desc",conn

         mylocate=0
          do while not rs.eof 
           mylocate=mylocate+1
            if rs("id")=id then
             mybookmark=rs.bookmark
            
            exit do
            end if         
         rs.movenext   
          loop

           rs.bookmark=mybookmark
         if ucase(sp)="NEXT" and mylocate<rs.recordcount then
               rs.movenext 
                 id=clng(rs("id"))
               elseif ucase(sp)="PREV" and mylocate>1 then
                  rs.moveprevious
                  id=clng(rs("id"))
              elseif mylocate=rs.recordcount or mylocate=1 then
              ' 已经到了最前或最后一条记录
              else
               warnword="NETXIN警告提示:操作错误!"
                'response.write warnword
           end if
      end if
           
     

times=clng(rs("count"))
times=times+1
conn.execute("update article set count="&times&" where id="&id&"")

%> 
<html>
<head>
<title>3鸟设社网站评测--<%=rs("title")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="link.css">
<script language="JavaScript">
<!--

var position = 0; 
function scroller() {
if (position!=1600 ){ 
	position++; 
	scroll(0,position); 
	clearTimeout(timer); 
	var timer = setTimeout("scroller()",50); 
	timer;
	}
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#FFFFFF">
<div align="right">
 

<!--#include file="top.htm" -->

  <table width="764" border="0" cellspacing="2" cellpadding="0" align="center" class="9p">
    <tr> 
      <td width="164" valign="top" bgcolor="#EDB7D1"> 
        <table width="100%" border="0" class="9p" cellpadding="0" cellspacing="0" align="center">
          <tr> 
            <td bgcolor="#CC3366" height="22"> 
              <div align="center"><font color="#FFFFFF">类 型 分 类</font></div>
            </td>
          </tr>
          <tr> 
            <td> 
              <table width="90%" border="0" cellspacing="1" cellpadding="2" class="9p" align="center">
                <tr> 
                  <td> 
                    <div align="left"><img src="image/j1.gif" width="9" height="10"> 
                      <a href="listtype.asp?type=1">电脑网络</a></div>
                  </td>
                  <td><img src="image/j1.gif" width="9" height="10"> <a href="listtype.asp?type=12">综合网站</a></td>
                </tr>
                <tr> 
                  <td> 
                    <div align="left"><img src="image/j1.gif" width="9" height="10"> 
                      <a href="listtype.asp?type=2">免费资源</a></div>
                  </td>
                  <td><img src="image/j1.gif" width="9" height="10"> <a href="listtype.asp?type=11">社会公益</a></td>
                </tr>
                <tr> 
                  <td> 
                    <div align="left"><img src="image/j1.gif" width="9" height="10"> 
                      <a href="listtype.asp?type=3">休闲娱乐</a></div>
                  </td>
                  <td><img src="image/j1.gif" width="9" height="10"> <a href="listtype.asp?type=10">科技咨讯</a></td>
                </tr>
                <tr> 
                  <td> 
                    <div align="left"><img src="image/j1.gif" width="9" height="10"> 
                      <a href="listtype.asp?type=4">文学艺术</a></div>
                  </td>
                  <td><img src="image/j1.gif" width="9" height="10"> <a href="listtype.asp?type=9">商贸金融</a></td>
                </tr>
                <tr> 
                  <td> 
                    <div align="left"><img src="image/j1.gif" width="9" height="10"> 
                      <a href="listtype.asp?type=5">游戏世界</a></div>
                  </td>
                  <td><img src="image/j1.gif" width="9" height="10"> <a href="listtype.asp?type=8">程序设计</a></td>
                </tr>
                <tr> 
                  <td> 
                    <div align="left"><img src="image/j1.gif" width="9" height="10"> 
                      <a href="listtype.asp?type=6">音乐天堂</a></div>
                  </td>
                  <td><img src="image/j1.gif" width="9" height="10"> <a href="listtype.asp?type=7">体育生活</a></td>
                </tr>
                <tr> 
                  <td> 
                    <div align="left"></div>
                  </td>
                  <td>&nbsp;</td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
      <td width="594" valign="top"> 
        <table width="594" border="0" cellspacing="1" cellpadding="2" bgcolor="#CC3366" align="center">
          <tr>
            <td height="20"><font color="#FFFFFF">·</font><font color="#FFFFFF">3鸟设社网站评测&gt;&gt; 
              <%=rs("lanmu")%>&gt;&gt; 
              <%=rs("title")%></font></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">
              <table width="590" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td height="270"> 
                    <div align="right"></div>
                    <table width=100% border=0 cellspacing=0 cellpadding=0 height="4" align="center" bgcolor="#FFFFFF">
                      <tr valign=top> 
                        <td valign=top height="77" width="100%"> 
                          <center>
                            <br>
                            <font color="#cc3366">
                            <%title=rs("title")
    if chwebaddr<>"" then
    title=replace(title,"<","&lt;")
    title=replace(title,">","&gt;")
    title=replace(title,vbCrlf,"<br>") 
    end if%>
                            <b><%=title%></b></font><br>
                            <font color="#999999">加入时间:<%=rs("date")%> </font> 
                            <hr width=90% align="center" size=1>
                            <br>
                            <br>
                          </center>
                          <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
                            <tr> 
                              <td height="20"> 
                                <%if rs("picurl")<>"" and rs("picurl")<>" " then
flag=INSTR(1,rs("picurl"),"http://",1)
picurl=rs("picurl")
if flag=0 then
  picurl="noteimages/"&picurl
end if
        response.write  "<img src="&picurl&" align=left>"
         end if%>
                                <%=rs("content") %> </td>
                            </tr>
                          </table>
                          <br>
                        </td>
                      </tr>
                      <tr valign=top> 
                        <td width=100% valign=top> 
                          <div align="center"> <font color="#FFFFFF"><br>
                            </font> 
                            <hr width=90% align="center" size=1>
                          </div>
                        </td>
                      </tr>
                      <tr valign=top> 
                        <td width=100% valign=top height="11"> 
                          <table width=98% border=0 cellspacing=1 cellpadding=0>
                            <tr> 
                              <td class=x14> 
                                <div align="right"><font size=2>&nbsp;&nbsp;&nbsp;&nbsp; 
                                  </font> 浏览次数=<%=rs("count")%> <a href=article.asp?id=<%=id%>&sp=PREV&classid=<%=classid%> class=shenqin>上一篇</a> <a href=article.asp?id=<%=id%>&sp=next&classid=<%=classid%> class=shenqin>下一篇</a> 【<a href="javascript:window.close()" class=shenqin>关闭窗口</a>】 
                                </div>
                              </td>
                            </tr>
                            <tr> 
                              <td class=x14> 
                                <div align="center"><br>
                                  本站有部分文章来自网上,如果您觉得我们侵犯了您的权益,请告诉我们<br>
                                  我们会去掉您认为侵权的文章,谢谢支持! </div>
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                    <%end if 
rs.close
%>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        
      </td>
    </tr>
  </table>
  <!--#include file="bottom.htm" -->
</div>
</body></html>

⌨️ 快捷键说明

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