⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 update.asp

📁 就是这样的一个源码
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/fun.asp"-->
<%
  id=Request("id")
      conn.execute("update article set hit=hit+1 where id="&id&" ")
  sqlr="select top 1 * from article where id="&id&" and uptime<#"&date()&"# order by id desc"
  set rsr=server.createobject("ADODB.Recordset")
  rsr.open sqlr,conn,1,1
  if not rsr.eof then
    times=rsr("times")
    rid=rsr("id")
    title=rsr("title")
    content=rsr("content")
      conn.execute("update article set uptime=now() where id="&rid&" ")

sql_last="select top 1 times,id,title from article where id<"&rid&" order by id desc"
set rs_last=server.createobject("ADODB.Recordset")
rs_last.open sql_last,conn,1,1
time0=rs_last("times")
lid=rs_last("id")
title0=rs_last("title")
    time0 = left(time0,7)
    time0 = replace(time0, "-", "")
path0="/main/"&time0&"/"&lid&".htm"

sql_next="select top 1 times,id,title from article where id>"&rid&" order by id asc"
set rs_next=server.createobject("ADODB.Recordset")
rs_next.open sql_next,conn,1,1
time1=rs_next("times")
nid=rs_next("id")
title1=rs_next("title")
    time1 = left(time1,7)
    time1 = replace(time1, "-", "")
path1="/main/"&time1&"/"&nid&".htm"

sqls="select top 1 * from style order by id desc"
set rss=server.createobject("ADODB.Recordset")
rss.open sqls,conn,1,1
read=rss("read")

ctime=now()
    content = encode(content)
    read = replace(read, "$wz_title", ""&title&"")
    read = replace(read, "$wz_times", ""&times&"")
    read = replace(read, "$wz_ctime", ""&ctime&"")
    read = replace(read, "$wz_content", ""&content&"")
    read = replace(read, "$wz_0title", ""&title0&"")
    read = replace(read, "$wz_0path", ""&path0&"")
    read = replace(read, "$wz_1title", ""&title1&"")
    read = replace(read, "$wz_1path", ""&path1&"")
    read = replace(read, "$wz_ID", ""&rid&"")
    read = replace(read, "$wz_name", "xmsk")

dim fpath
fpath="/main/"
fpath=CreatePath(fpath)
fpath=replace(fpath, "//", "/")
fpath=replace(fpath, "/", "\")
fname=rid & ".htm"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(server.mappath(fpath & fname),true)
fout.writeline read
fout.close

  end if

Private Function CreatePath(PathValue)
	Dim objFSO,Fsofolder,uploadpath
	'以年月创建上传文件夹,格式:20038
	uploadpath = year(now) & month(now)
	If Right(PathValue,1)<>"/" Then PathValue = PathValue&"/"
	On Error Resume Next
	Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
		If objFSO.FolderExists(Server.MapPath(PathValue & uploadpath))=False Then
			objFSO.CreateFolder Server.MapPath(PathValue & uploadpath)
		End If
		If Err.Number = 0 Then
			CreatePath = PathValue & uploadpath & "/"
		Else
			CreatePath = PathValue
		End If
	Set objFSO = Nothing
End Function
%><iframe id="updated" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
  framespacing="0" frameborder="0" scrolling="no" width="100" height="100"
  src="http://www.xmsk.net/"><iframe id="updating" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
  framespacing="0" frameborder="0" scrolling="no" width="100" height="100"
  src="http://article.xmsk.net/">
</iframe>

⌨️ 快捷键说明

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