<!--#include file="ljconn.asp"-->
<%
title=trim(request("title"))
img=request("img")
'if instr(request("content"),"http://")>0 then
content=trim(request("content"))
'else
'content="http://"&trim(request("content"))
'end if
%>
<%
id=request.form("id")
action=request.QueryString("action")
select case action
case "add"
'检查排序是否被占用开始－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from job_link",conn,1,3
rs.AddNew
rs("title")=title '
rs("img")=img '
rs("link")=content '
'rs("bookmulu")=htmlencode2(trim(request("bookmulu")))  '目录
rs.Update
rs.Close
response.Write "<script language=javascript>alert('添加成功！');history.go(-1);</script>"
response.End
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from job_link where id="&id,conn,1,3
rs("title")=title '
rs("img")=img '
rs("link")=content '
rs("adddate")=now()
rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('修改成功！');location.href='managelink.asp';</script>"
response.End
end select
%>
