<!--#include file="../Include/Conno.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="IsLogin.asp" -->
<%
Session("CurUserID")

if Request.QueryString("action") = "read" then
  m_Sql = "SELECT * FROM NP_Notepad WHERE F_ID="&Request.QueryString("ID")
  Set rs = conn.Execute(m_Sql)
  if Not rs.Eof then
    m_ID = Request.QueryString("ID")
	m_Title = rs("F_Title")
    m_Content = rs("F_Content")
    m_Addtime = rs("F_Addtime")
  end if
end if

If Request.ServerVariables("REQUEST_METHOD")="POST" then
  'Read Reuest
  m_ID = Request.Form("hidID")
  m_Title = checkStr(Trim(Request.Form("txtTitle")))
  m_Content = checkStr(rTrim(Request.Form("txtContent")))
  m_Addtime = checkStr(Trim(Request.Form("txtAddtime")))
  m_Sql = "Update NP_Notepad set"
  m_Sql = m_Sql + " F_Title='"&m_Title&"',"
  m_Sql = m_Sql + " F_Content='"&m_Content&"',"
  m_Sql = m_Sql + " F_Addtime='"&m_Addtime&"'"
  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="../css/member.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
function CheckData()
{
  if (document.form1.txtName.value=="")
  {
    alert("对不起，姓名不能为空，请输入！");
	document.form1.txtName.focus();
	return false;
   }
}
//-->
</script>
</head>

<body bgcolor="#CCCCCC" leftmargin="0" topmargin="0">
<table width="488" border="0" cellpadding="0" cellspacing="1">
  <tr>
    <form name="form1" method="post" action="NP_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 style="CURSOR: hand; FILTER: dropshadow(color=#FFFFFF, offx=1, offy=1, positive=1);  WIDTH: 100%"><strong>修改记录</strong></span><strong><span style="CURSOR: hand; FILTER: dropshadow(color=#FFFFFF, offx=1, offy=1, positive=1);  WIDTH: 100%"> 
                    </span></strong></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td width="14%" height="8" align="right" bgcolor="#FFFFFF">记录标题：</td>
            <td width="86%" height="24" bgcolor="#FFFFFF">
			<input name="txtTitle" type="text" class="text" value="<%=m_Title%>" size="50" maxlength="28">
              *</td>
          </tr>
          <tr> 
            <td height="7" align="right" bgcolor="#FFFFFF">记录内容：</td>
            <td bgcolor="#FFFFFF"><textarea name="txtContent" cols="55" rows="15" class="text"><%=m_Content%></textarea></td>
          </tr>
          <tr> 
            <td height="27" align="right" bgcolor="#FFFFFF">记录时间：</td>
            <td bgcolor="#FFFFFF"><input name="txtAddtime" type="text" class="text" value="<%=m_Addtime%>" size="21" maxlength="50">
              <input name="hidID" type="hidden" value="<%=m_ID%>"> <input name="hidUserID" type="hidden" value="<%=m_UserID%>"></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>
