<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
title=trim(request("title"))
link=trim(request("link"))
action=trim(request("action"))
picid=int(request("id"))
if title="" then
response.write("<p align='center'><font size=18>错误信息</font><br>标题不能为空，请<a href='javascript:history.back();'>返回</a>重新添加。</p>")
else
if link="" then
response.write("<p align='center'><font size=18>错误信息</font><br>连接地址不能为空，请<a href='javascript:history.back();'>返回</a>重新添加。</p>")
else
if action="add" then
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from tbl_picarticle order by picid desc"
rs.open sql,conn,1,3
rs("pictitle")=title
rs("link")=link
rs("updatetime")=now()
rs.update
rs.close
set rs=nothing
response.redirect("picarticlelist.asp")
elseif action="modi" then
set rs=server.createobject("adodb.recordset")
sql="select * from tbl_picarticle where picid="&picid
rs.open sql,conn,1,3
rs("pictitle")=title
rs("link")=link
rs("updatetime")=now()
rs.update
rs.close
response.redirect("picarticlelist.asp")
end if
end if
end if
%>