| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <%Session.CodePage=65001%>
- <!--#include file="../bdcommx/connxyz.asp"-->
- <%
- Function chgenter(str)
- t1=""
- for i=1 to len(str)
- h=mid(str,i,1)
- if asc(h)=10 then h="<br>"
- if asc(h)=13 then h=""
- t1=t1+h
- next
- str=t1
- chgenter=str
- End Function
- %>
- <%
- call log_chk()
- dim title,picpath,Bid,Sid,Bname,Sname,tj,d_content,note,tlink,odr
- title=trim(request("title"))
- picpath=request("picpath")
- Bid=request("Bid")
- Sid=request("Sid")
- Bname=request("Bname")
- Sname=request("Sname")
- tlink=request("tlink")
- note=request("note")
- dt=request("select_date")
- dianji=request("dianji")
- tj=request("tj")
- odr=request("odr")
- d_content=request("d_content")
- if title="" then
- call backurl("标题不能为空!")
- else
- Set rs=Server.Createobject("Adodb.Recordset")
- sql="select * from bdnews order by nws_id desc"
- rs.open sql,conn,1,3
- rs.addnew
- rs("nws_title")=title
- rs("Fileurl")=picpath
- rs("nb_id")=Bid
- if Sid<>"" then
- rs("ns_id")=Sid
- end if
- if tj<>"" then
- rs("nws_tj")=tj
- end if
- if odr<>"" then
- rs("nws_order")=odr
- end if
- rs("nws_cont")=d_content
- rs("nws_note")=chgenter(note)
- rs("nws_click")=dianji
- rs("nws_link")=tlink
- rs("nws_Author")=session("adminxxx")
- if dt<>"" then
- rs("nws_time")=dt
- else
- rs("nws_time")=now()
- end if
- rs.update
- rs.close
- set rs=nothing
- call GoUrl("Nadd.asp?Bid="&Bid&"&Sid="&Sid&"&Bname="&Bname&"&Sname="&Sname&"","添加成功")
- end if
- %>
|