<!--#include file="conn.asp"--><!--#include file="inc/CHAR.INC"-->
<%set rs=server.createobject("adodb.recordset")
%>
<%if request("act")="save" then
wh=request.form("wh")
tnwh=request.form("tnwh")
ynwh=request.form("ynwh")
skzhyj=request.form("skzhyj")
whzx=request.form("whzx")
szwh=request.form("szwh")
hyhw=request.form("hyhw")
if wh="" then
sql="select * from wh"
rs.open sql,conn,1,3
rs.addnew
rs("wh")=wh
else
sql="select * from wh where wh='"&wh&"'"
rs.open sql,conn,1,3
end if
rs("tnwh")=tnwh
rs("ynwh")=ynwh
rs("skzhyj")=htmlencode2(trim(skzhyj))
rs("whzx")=htmlencode2(trim(whzx))
rs("szwh")=htmlencode2(trim(szwh))
rs("hyhw")=htmlencode2(trim(hyhw))
rs.update
rs.close
set rs=nothing 
if wh="" then
response.write("<script>alert('成功：新建成功!继续增加');location='rgwh_add.asp?act=add'</script>")
else
response.write("<script>alert('成功：修改成功!现在返回管理');location='rgwh.asp'</script>")
end if
response.end
end if%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="images/style.css" 
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<BODY style="FONT-SIZE: 12px; v-text-align: center" leftMargin=0 topMargin=3 
align="center" marginheight="0" marginwidth="0">
<%if request("act")="edit" then
ninfo="修改" 
else
ninfo="添加" 
end if
%>
<%
if request("act")="edit" then
wh=request("wh")
set rs=server.createobject("adodb.recordset")
sql="select * from wh where wh='"&wh&"'"
rs.open sql,conn,1,1
end if
%>
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
   <form name="form1" method="post" action="?act=save">
 <tr bgcolor="3972B4"> 
      <td colspan="3" bgcolor="e7e7e7"> <div align="center"><strong><font color="#000000"><%=ninfo%></font></strong></div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="17%"> <div align="right">五行：</div></td>
      <td width="83%"><input name="wh" type="text" id=wh value="<%=rs("wh")%>" size="30">      </td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">同类：</div></td>
      <td><input name="tnwh" type="text" id=tnwh value="<%=rs("tnwh")%>" size="20"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">异类：</div></td>
      <td><input name="ynwh" type="text" id=ynwh value="<%=rs("ynwh")%>" size="20"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">五行生克制化宜忌：</div></td>
      <td><textarea name="skzhyj" cols="60" rows="10" id="skzhyj"><%=htmlencode1(trim(rs("skzhyj")))%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">五行之性：</div></td>
      <td> <p>
        <textarea name="whzx" cols="80" rows="4" id="whzx"><%=htmlencode1(trim(rs("whzx")))%></textarea>
</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">四柱五行生克中对应需补脏腑和部位：</div></td>
      <td> <p>
        <textarea name="szwh" cols="80" rows="4" id="szwh"><%=htmlencode1(trim(rs("szwh")))%></textarea>
</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">宜从事行业与方位：</div></td>
      <td> <p>
        <textarea name="hyhw" cols="80" rows="4" id="hyhw"><%=htmlencode1(trim(rs("hyhw")))%></textarea>
</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">旺：</div></td>
      <td> <p>
        <textarea name="whw" cols="80" rows="4" id="hyhw"><%=htmlencode1(trim(rs("whw")))%></textarea>
</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">缺：</div></td>
      <td> <p>
        <textarea name="whq" cols="80" rows="4" id="hyhw"><%=htmlencode1(trim(rs("whq")))%></textarea>
</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="3"> <div align="center"> 
          <input type="submit" name="Submit" class="Submit" value="确认<%=ninfo%>">
        </div></td>
    </tr></form>
</table>
</BODY></HTML>

<script language="JavaScript" type="text/JavaScript">
function SwitchNewsType(NewsType)
{
	switch (NewsType)
	{
	case "PicNews":
		document.getElementById('PicNews').style.display='';
	break;

	}
}

</script>



