<!--#include file="../Include/Conno.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="IsLogin.asp" -->
<%
m_UserID = Session("CurUserID")
If Request.ServerVariables("REQUEST_METHOD")="POST" then
  'Read Reuest
  m_Name = checkStr(Trim(Request.Form("txtName")))
  m_Sex = checkStr(Trim(Request.Form("radSex")))
  m_Tel = checkStr(Trim(Request.Form("txtTel")))
  m_CategoryID = Request.Form("selCategoryID")
  m_Mobile = checkStr(Trim(Request.Form("txtMobile")))
  m_Zipcode = checkStr(Trim(Request.Form("txtZipcode")))
  m_Address = checkStr(Trim(Request.Form("txtAddress")))
  m_WebSite = checkStr(Trim(Request.Form("txtWebSite")))
  m_QQ = checkStr(Trim(Request.Form("txtQQ")))
  m_Memo = checkStr(Trim(Request.Form("txtMemo")))
  m_Email = checkStr(Trim(Request.Form("txtEmail")))
  'Insert 
  m_Sql = "Insert Into AL_AddressList(F_UserID,F_Name,F_CategoryID,F_Sex,F_Tel,F_Mobile,F_Email,F_WebSite,F_QQ,F_Address,F_Zipcode,F_Memo)"
  m_Sql =  m_Sql + " Values("&m_UserID&",'"&m_Name&"',"&m_CategoryID&",'"&m_Sex&"','"&m_Tel&"','"&m_Mobile&"','"&m_Email&"','"&m_WebSite&"','"&m_QQ&"','"&m_Address&"','"&m_Zipcode&"','"&m_Memo&"')"
  conn.Execute(m_Sql)
  Response.Write "<script language=""javascript"">opener.location.reload()</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="100%"  height="218" border="0" cellpadding="0" cellspacing="1">
  <tr>
    <form name="form1" method="post" action="AL_AddNew.asp" onSubmit="return CheckData()">
      <td width="100%" 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="21%" height="8" align="right" bgcolor="#FFFFFF">姓名：</td>
            <td width="79%" height="24" bgcolor="#FFFFFF"><input name="txtName" type="text" class="text" size="18" maxlength="28">
              *</td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">性名：</td>
            <td bgcolor="#FFFFFF"><input name="radSex" type="radio" value="男" checked>
              男 
              <input type="radio" name="radSex" value="女">
              女</td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">类别：</td>
            <td bgcolor="#FFFFFF"> <select size="1" name="selCategoryID">
                <%
		                  mSql = "Select F_ID,F_Value From Al_Category where F_UserID=" & m_UserID &" order by F_ID asc"
		                  Set rs = conn.Execute(mSql)
		                  do while not rs.eof
                            Response.Write "<option value='"&rs("F_ID")&"'>"&rs("F_Value")&"</option>"
                            rs.movenext
	 	                  loop
						  rs.Close
		                 %>
              </select>
              *</td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">电话：</td>
            <td bgcolor="#FFFFFF"><input name="txtTel" type="text" class="text" size="21" maxlength="50">
            </td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">手机：</td>
            <td bgcolor="#FFFFFF"><input name="txtMobile" type="text" class="text" size="21"></td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">地址：</td>
            <td bgcolor="#FFFFFF"><input name="txtAddress" type="text" class="text" size="18">
              邮编： 
              <input name="txtZipcode" type="text" class="text" size="5" maxlength="6"></td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">OICQ：</td>
            <td bgcolor="#FFFFFF"><input name="txtQQ" type="text" class="text" size="21"></td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">Email：</td>
            <td bgcolor="#FFFFFF"><input name="txtEmail" type="text" class="text" size="21" maxlength="50"></td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">网址：</td>
            <td bgcolor="#FFFFFF"><input name="txtWebSite" type="text" class="text" size="21" maxlength="50"></td>
          </tr>
          <tr> 
            <td height="16" align="right" bgcolor="#FFFFFF">备注：</td>
            <td bgcolor="#FFFFFF"><textarea name="txtMemo" cols="30" rows="4" class="text"></textarea></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>
