📄 saveedit.asp
字号:
<%@ codepage ="936" %><%OPTION EXPLICIT%><!--#include FILE="upload.inc"--><!--#include file="../../conn/dbconn2.asp" --><%function changechr(str) changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ") changechr=replace(replace(replace(replace(changechr,"[sayyes]","<img src="),"[b]","<b>"),"[red]","<font color=CC0000>"),"[big]","<font size=7>") changechr=replace(replace(replace(replace(changechr,"[/sayyes]","></img>"),"[/b]","</b>"),"[/red]","</font>"),"[/big]","</font>") end function%><html><body><%dim upload,file,formName,formPath,iCount,title,typeid,tjnews,content,selectpic,from,picurl,rs,imgsdim newsid,sqlset upload=new upload_5xSoftformPath=upload.form("filepath")if right(formPath,1)<>"/" then formPath=formPath&"/" newsid=upload.form("newsid")title=upload.form("title")if upload.form("checkbox1")="1" thentjnews=1elsetjnews=0end ifcontent=changechr(upload.form("content"))from=upload.form("from")if upload.form("checkbox3")="1" thenselectpic=1elseselectpic=0end ifiCount=0set file=upload.file("file") ''生成一个文件对象if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据thename=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&right(file.filename,4)file.filename=thenamefile.SaveAs Server.mappath(formPath&file.FileName)imgs=File.FileNameelseresponse.write "未找到文件 <A HREF=javascript:history.back(1)>返回</A>"response.endend ifset rs=server.createobject("adodb.recordset")sql="select * from hyxx where newsid="&cstr(newsid)rs.open sql,conn,1,3rs("title")=titlers("content")=contentrs("nfrom")=fromrs("selectpic")=selectpicrs("tjnews")=tjnewsif imgs<>"" thenrs("picurl")=imgsend ifrs.updaters.close set rs=nothing conn.close set conn=nothing set upload=nothingresponse.redirect "default.asp"sub HtmEnd(Msg)set upload=nothingresponse.write "<br>"&Msg&" [<a href=""javascript:history.back();"">返回</a>]</body></html>"response.endend sub%></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -