<!--#include file="conn.asp"--><!--#include file="inc/CHAR.INC"-->
<%set rs=server.createobject("adodb.recordset")
%>
<%if request("act")="save" then
id=request.form("id")
rgz=request.form("rgz")
rgxx=request.form("rgxx")
rgcz=request.form("rgcz")
rgzfx=request.form("rgzfx")
xgfx=request.form("xgfx")
aqfx=request.form("aqfx")
syfx=request.form("syfx")
cyfx=request.form("cyfx")
jkfx=request.form("jkfx")
if id="" then
sql="select * from rgnm"
rs.open sql,conn,1,3
rs.addnew
rs("rgz")=rgz
else
sql="select * from rgnm where id="&id
rs.open sql,conn,1,3
end if
rs("rgxx")=htmlencode2(trim(rgxx))
rs("rgcz")=htmlencode2(trim(rgcz))
rs("rgzfx")=htmlencode2(trim(rgzfx))
rs("xgfx")=htmlencode2(trim(xgfx))
rs("aqfx")=htmlencode2(trim(aqfx))
rs("syfx")=htmlencode2(trim(syfx))
rs("cyfx")=htmlencode2(trim(cyfx))
rs("jkfx")=htmlencode2(trim(jkfx))
rs.update
rs.close
set rs=nothing 
if id="" then
response.write("<script>alert('成功：新建成功!继续增加');location='rgnm.asp'</script>")
else
response.write("<script>alert('成功：修改成功!现在返回管理');location='rgnm.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
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from rgnm where id="&id
rs.open sql,conn,1,1
rgz=rs("rgz")
rgz=rs("rgz")
rgxx=rs("rgxx")
rgcz=rs("rgcz")
rgzfx=rs("rgzfx")
xgfx=rs("xgfx")
aqfx=rs("aqfx")
syfx=rs("syfx")
cyfx=rs("cyfx")
jkfx=rs("jkfx")
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="rgz" type="text" id=rgz value="<%=rgz%>" size="30"><input name="id" type="hidden" id=id value="<%=id%>" size="30"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">日干心性：</div></td>
      <td><textarea name="rgxx" cols="80" rows="2" id="rgxx"><%=htmlencode1(rgxx)%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">日干层次：</div></td>
      <td><textarea name="rgcz" cols="80" rows="2" id="rgcz"><%=htmlencode1(rgcz)%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">日干支分析：</div></td>
      <td><textarea name="rgzfx" cols="80" rows="4" id="rgcz"><%=htmlencode1(rgzfx)%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">性格分析：</div></td>
      <td><textarea name="xgfx" cols="80" rows="4" id="xgfx"><%=htmlencode1(xgfx)%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">爱情分析：</div></td>
      <td><textarea name="aqfx" cols="80" rows="4" id="aqfx"><%=htmlencode1(aqfx)%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">事业分析：</div></td>
      <td><textarea name="syfx" cols="80" rows="4" id="syfx"><%=htmlencode1(syfx)%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">财运分析：</div></td>
      <td><textarea name="cyfx" cols="80" rows="4" id="cyfx"><%=htmlencode1(cyfx)%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">健康分析：</div></td>
      <td><textarea name="jkfx" cols="80" rows="4" id="jkfx"><%=htmlencode1(jkfx)%></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>



