今天終于把按文章ID生成靜態(tài)文章搞定了,相信許多朋友應(yīng)該需要,為發(fā)布文章節(jié)約不少時間.
此主題相關(guān)圖片如下:
第一步:在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發(fā)布</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="" 發(fā) 布 >>"" 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
三步搞定.