<!--#include file="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<%
If Request.QueryString("action")="update" then
id=request.form("id")
titel=Trim(request.form("name"))
note=Trim(request.form("note"))
linked=Trim(request.form("link"))
If Request.Form("update")="修改" Then
If titel="" Then
Response.Write("<script language=""JavaScript"">alert(""错误：您没输入网站名称，请返回检查！！"");history.go(-1);</script>")
response.end
end if

If note="" Then
Response.Write("<script language=""JavaScript"">alert(""错误：您没输入图标连接，请返回检查！！"");history.go(-1);</script>")
response.end
end if

If linked="" or link="http://" Then
Response.Write("<script language=""JavaScript"">alert(""错误：您没有输入超连接，请返回检查！！"");history.go(-1);</script>")
response.end
end if
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open ("Select * From [Link] Where ID="&id),Conn,1,3
rs("Name")=titel
rs("Note")=note
rs("Link")=linked
rs.Update
rs.Close
Set rs=Nothing
Set Conn=Nothing
Response.Redirect "Link.asp"
End if
End if
%>
<html>
<head>
<titel></titel>
<LINK href="admin/admin.css" type=text/css rel=stylesheet>
</head>
<body>
<br>
<%Set rs=Conn.Execute("Select * From Link Where ID ="&Clng(Request("id")))%>
<form name="form2" method="post" action="Link_Update.asp?action=update">       
  <table width="550" border="0" align="center" cellpadding="2" cellspacing="0" class=tableBorder>
    <tr> 
            <td height="25" colspan="2" background="admin/admin_bg_1.gif"> <div align="center"><strong><font color="#FFFFFF">添加友情链接</font></strong></div></td>
          </tr>
          <tr> 
            <td width="121"> 网站名称<br> </td>
            <td width="427"><input name="name" type="text" value="<%=rs("Name")%>" size="35" maxlength="40"></td>
          </tr>
          <tr> 
            <td>网站说明</td>
            <td><input name="note" type="text" value="<%=rs("Note")%>" size="50" maxlength="120"></td>
          </tr>
          <tr> 
            <td>连接地址</td>
            <td><input type="text" name="link" size="40" maxlength="50" value="<%=rs("Link")%>"></td>
           <input name="id" type="hidden" value="<%=rs("ID")%>">
          </tr>
          <tr> 
            <td colspan="2"> <div align="center"> 
                <input name="update" type="submit" id="update" value="修改">
                <input type="reset" name="Submit2" value="重置">
              </div></td>
          </tr>
        </table>
      </form> 
</body>
</html>
<%rs.Close%>