<!--#include file="Connection.asp" -->
<%
Dim act
act = request.QueryString("action")

Select Case act
	Case "go"
		Call EditLinks()
End Select

Function EditLinks()
	Dim objRs
	Dim strSql
	Set objRs = server.createObject("ADODB.Recordset")
	strSql = "Select * From info_Links where 1=0"
	objRs.open strSql,objConn,1,3
	
	If Request.Form("Title")<>"" And  Request.Form("LinkUrl")<>"" Then
		objRs.AddNew
		objRs("Title")    = Request.Form("Title")
		objRs("LinkUrl")  = Request.Form("LinkUrl")
		objRs("Note")     = Request.Form("Note")
		objRs.Update
	End If
	objRs.close
	Set objRs = nothing

	Response.Write("<script>alert('ɹ');</script>")
	Response.Write("<script>parent.location.href='linkreg.asp';</script>")
End function

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<style type="text/css">
<!--
body { margin:0px; }
#linkscontent td { font-size:12px; color:#333333; padding:5px; line-height:23px; }
#linkscontent td a { text-decoration:none; color:#333333; }
#linkscontent td a:hover { text-decoration:underline; }
-->
</style>
<script type="text/javascript" language="javascript">
<!--
function checkform()
{
if (form1.Title.value=="")
{
	form1.Title.focus();
	return false;
}
if (form1.LinkUrl.value=="")
{
	form1.LinkUrl.focus();
	return false;
}
}
-->
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="linkreg.asp?action=go" onsubmit="return checkform()">
<table width="300" border="0" cellspacing="0" cellpadding="0" id="linkscontent">
  <tr>
    <td><strong></strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td></td>
    <td>
      <input name="Title" type="text" id="Title" />    </td>
  </tr>
  <tr>
    <td>Title</td>
    <td><input name="Note" type="text" id="Note" /></td>
  </tr>
  <tr>
    <td>ӵַ</td>
    <td><input name="LinkUrl" type="text" id="LinkUrl" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="Submit" value="ύ" />
      <input type="button" name="Submit2" value="ر" onclick="window.close();" />
      <input name="linktype" type="hidden" id="linktype" value="1" /> 
	  <input name="linkcate" type="hidden" id="linkcate" value="" /></td>
  </tr>
</table>
</form>
</body>
</html>
