按ID号发布文章(精)

 更新时间:2007年02月15日 00:00:00   作者:  

今天终于把按文章ID生成静态文章搞定了,相信许多朋友应该需要,为发布文章节约不少时间.


图片点击可在新窗口打开查看此主题相关图片如下:
图片点击可在新窗口打开查看

第一步:在Admin\Include\refreshhtml.asp文件的第90行下面插入下面代码

Response.Write "  <form action=""RefreshHtmlSave.asp?Types=Content&RefreshFlag=AID&ChannelID=" & ChannelID & """ method=""post"" name=""IDForm"">"
  Response.Write "    <tr class='tdbg'>"
  Response.Write "      <td height=""35"" align=""center"">按ID发布</td>"
  Response.Write "      <td height=""35""> 从"
  Response.Write "        <input name=""StartID"" type=""text"" id=""StartID"">"
  Response.Write "        到"
  Response.Write "        <input name=""EndID"" type=""text"" id=""EndID"">"
  Response.Write "        <input name=""SubmitID"" type=""submit"" id=""SubmitID"" value="" 发 布 &gt;&gt;"" border=""0"">"
  Response.Write "      </td>"
  Response.Write "    </tr>"
  Response.Write "  </form>"

第二步:在Admin\Include\refreshhtmlsave.asp文件的第258行定义StartID\和EndID变量

第三步:在Admin\Include\refreshhtmlsave.asp文件的第286行下面插入下面代码:

   Case "AID" '按ID生成
     StartID = Request("StartID")
     EndID = Request("EndID")

    If startID<>"" and EndID ="" then
     RefreshSql = "Select top 1 * from KS_Article where Verific=1 and  DelTF=0 And ID = " & StartID & " Order By ID Desc"
     RefreshTotalNum =1
    Elseif startID<>"" and EndID <> "" then

     RefreshSql = "Select top 1 * from KS_Article where Verific=1 and  DelTF=0 And ID>= " & StartID & " And  ID <=" & EndID & " Order By ID Desc"

     Set TotalRS = Server.CreateObject("Adodb.RecordSet")
     TotalRS.Open "Select count(*) from KS_Article where Verific=1 and  DelTF=0 And ID >=" & StartID & " And  ID <=" & EndID, Conn, 1, 1
     RefreshTotalNum = TotalRS(0)
     TotalRS.Close
      Set TotalRS = Nothing

    End If

三步搞定.

相关文章

最新评论