按ID号发布文章(精)
今天终于把按文章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="" 发 布 >>"" 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
三步搞定.