<!--#include file="../main.asp" -->
<!--#include file="../IsLogin.asp" -->
<%
m_UserID = Request.Cookies("aspxnet")("CurUserID")
if Request.QueryString("action") = "read" then
  m_Sql = "SELECT * FROM BM_Bookmark WHERE F_userID="&m_UserID&" and F_ID="&Request.QueryString("ID")
  Set rs = conn.Execute(m_Sql)
  if Not rs.Eof then
    m_ID = Request.QueryString("ID")
    'm_UserID = rs("F_UserID")
	m_WebSiteName = rs("F_WebSiteName")
    m_URL = rs("F_URL")
     end if
end if

If Request.ServerVariables("REQUEST_METHOD")="POST" then
  'Read Reuest
  m_ID = Request.Form("hidID")
  m_WebSiteName = checkStr(Trim(Request.Form("txtWebSiteName")))
  m_URL = checkStr(Trim(Request.Form("txtURL")))
  'Insert 
  m_Sql = "Update BM_Bookmark set"
  m_Sql = m_Sql + " F_WebSiteName='"&m_WebSiteName&"',"
  m_Sql = m_Sql + " F_URL='"&m_URL&"'"
  m_Sql = m_Sql + " Where F_ID="&m_ID
  conn.Execute(m_Sql)
  Call CloseDataBase()
  Response.Write "<script language=""javascript"">opener.location.reload();window.close()</script>"
end if
%>
<html>
<head>
<title>修改记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../include/Style.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
function CheckData()
{
  if (document.form1.txtWebSiteName.value=="")
  {
    alert("对不起，网站名称不能为空，请输入！");
	document.form1.txtWebSiteName.focus();
	return false;
   }

  if (document.form1.txtURL.value=="")
  {
    alert("对不起，网址不能为空，请输入！");
	document.form1.txtURL.focus();
	return false;
   }

}
//-->
</script>
<style type="text/css">
<!--
.STYLE2 {font-size: 10pt}
-->
</style>
</head>

<body bgcolor="#CCCCCC" leftmargin="0" topmargin="0">
<table width="280" border="0" cellpadding="0" cellspacing="1">
  <tr>
    <form name="form1" method="post" action="BM_Update.asp" onSubmit="return CheckData()">
      <td valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="f2f2f2">
          <tr align="center"> 
            <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td align="center" background="../images/mmTo.gif"><span class="STYLE2" style="CURSOR: hand; FILTER: dropshadow(color=#FFFFFF, offx=1, offy=1, positive=1);  WIDTH: 100%"><strong>修改记录</strong></span><span class="STYLE2"><strong> 
                    </strong></span></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td width="21%" height="16" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="79%" bgcolor="#FFFFFF"> 
			
              <input name="hidID" type="hidden" value="<%=m_ID%>"> </td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF"><span class="STYLE2">网站：</span></td>
            <td bgcolor="#FFFFFF">
			<input name="txtWebSiteName" type="text" class="text" value="<%=m_WebSiteName%>" size="28" maxlength="50"> 
            </td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF"><span class="STYLE2">网址：</span></td>
            <td bgcolor="#FFFFFF"><input name="txtURL" type="text" class="text" value="<%=m_URL%>" size="28"></td>
          </tr>
          <tr> 
            <td height="16" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="35" bgcolor="#FFFFFF"><input type="submit" name="Submit" value="提交"> 
              <input type="reset" name="Submit2" value="取消"> <input type="button" name="Submit22" value="关闭" onClick="javascript:window.close()"></td>
          </tr>
        </table></td>
    </form>
  </tr>
</table>
</body>
</html>
