<!--#include file="conn.asp" -->
<% adm_power_page="1" %>
<!--#include file="admin_dn.asp" -->

<%
msg=""
msg1=""

if Trim(Request.QueryString("w"))="add" then
 if Trim(Request.Form("matter"))="" then msg="<li>代理名称为空.</li>"
 if instr("12345",Trim(Request.Form("class")))=0 then msg=msg&"<li>代理级别只能为12345中的数字</li>"
 
 for i=1 to len(Trim(Request.Form("je")))
 if instr("0123456789",mid(Trim(Request.Form("je")),i,1))=0 then msg1="<li>预交金额只能为0123456789的组合</li>"
 next
 
 msg=msg&trim(msg1)
 
 if trim(msg)="" then
  sql="update matter set matter='"&Trim(Request.Form("matter"))&"',je="&Request.Form("je")&",bak='"&Trim(Request.Form("bak"))&"' where id="&request("id")
 'sql="insert into matter (matter,class,je,bak) values ('"&Trim(Request.Form("title"))&"',"&Request.Form("class")&","&Request.Form("je")&",'"&Trim(Request.Form("bak"))&")'"
 conn.execute(sql)
 msg="修改成功..."
 else
 msg="</b>修改失败!!!</b><ul>"&msg&"</ul>"
 end if
 
 end if
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>:::管理页面:::</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="4" topmargin="4">
<p>代理相关 级别修改</p>
<% 
id=request("id")
sql="select * from matter where id="&id
rs.open sql,conn,1,1
if not rs.eof then
 %>
<form name="form2" method="post" action="matter_edit.asp?w=add">
  <table width="70%" height="182" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr bgcolor="#000066"> 
      <td height="17" colspan="2"><font color="#FFFFFF"><strong>代理级别新增</strong></font></td>
    </tr>
    <tr bgcolor="#EEEEFF"> 
      <td width="24%" height="21"><div align="center">代理名称:</div></td>
      <td width="76%"> <input name="matter" type="text" id="matter" value="<%=rs("matter")%>">
        <font color="#FF0000">*
        <input name="id" type="hidden" id="id" value="<%=rs("id")%>">
        </font></td>
    </tr>
    <tr bgcolor="#EEEEFF"> 
      <td height="27"><div align="center">代理级别:</div></td>
      <td> <font color="#FF0000"><strong> 　<%= rs("class") %></strong></font>　这里不能更改<font color="#FF0000">&nbsp;</font></td>
    </tr>
    <tr bgcolor="#EEEEFF"> 
      <td><div align="center">需预交金额:</div></td>
      <td> <input name="je" type="text" id="je" value="<%=rs("je")%>" size="6">
        只能为数字 <font color="#FF0000">*</font></td>
    </tr>
    <tr bgcolor="#EEEEFF"> 
      <td><div align="center">其它说明:</div></td>
      <td> <textarea name="bak" cols="30" rows="4" id="bak"><%=rs("bak")%></textarea></td>
    </tr>
    <tr bgcolor="#000066"> 
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="-确定新增-"></td>
    </tr>
  </table>
</form>
<% else
Response.Write("参数不正确")
end if %>
<table width="55%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><font color="#FF0000" size="2"><%= msg %></font></td>
  </tr>
</table>
<p align="center"><a href="matter.asp">返回代理级别管理页 &gt;&gt;</a></p>
</body>
</html>
