<!--#include file="conn.asp"--><!--#include file="inc/CHAR.INC"-->
<%set rs=server.createobject("adodb.recordset")
%>
<%if request("act")="save" then
title=request.form("title")
yy=request.form("yy")
jx=request.form("jx")
jx1=request.form("jx1")
jx2=request.form("jx2")
jx3=request.form("jx3")
content=request.form("content")
jcy=request.form("jcy")
cgy=request.form("cgy")
rjgx=request.form("rjgx")
xg=request.form("xg")
if title="" then
sql="select * from sancai"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
else
sql="select * from sancai where title='"&title&"'"
rs.open sql,conn,1,3
end if
rs("yy")=yy
rs("jx")=jx
rs("jx1")=jx1
rs("jx2")=jx2
rs("jx3")=jx3
rs("content")=htmlencode2(trim(content))
rs("jcy")=htmlencode2(trim(jcy))
rs("cgy")=htmlencode2(trim(cgy))
rs("rjgx")=htmlencode2(trim(rjgx))
rs("xg")=htmlencode2(trim(xg))
rs.update
rs.close
set rs=nothing 
if title="" then
response.write("<script>alert('成功：新建成功!继续增加');location='sc_add.asp?act=add'</script>")
else
response.write("<script>alert('成功：修改成功!现在返回管理');location='sc.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
num=request("num")
set rs=server.createobject("adodb.recordset")
sql="select * from sancai where title='"&num&"'"
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="title" type="text" id=title value="<%=htmlencode3(rs("title"))%>" size="30">      </td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">意义：</div></td>
      <td><input name="yy" type="text" id=yy value="<%=rs("yy")%>" size="60"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">吉凶：</div></td>
      <td><input name="jx" type="text" id=jx value="<%=rs("jx")%>" size="10"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">详细：</div></td>
      <td><textarea name="content" cols="60" rows="10" id="content"><%=htmlencode1(trim(rs("content")))%></textarea></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">基础运：</div></td>
      <td> <p>
        <textarea name="jcy" cols="80" rows="4" id="jcy"><%=htmlencode1(trim(rs("jcy")))%></textarea>
</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">吉凶：</div></td>
      <td><input name="jx1" type="text" id=jx1 value="<%=rs("jx1")%>" size="10"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">成功运：</div></td>
      <td> <p>
        <textarea name="cgy" cols="80" rows="4" id="cgy"><%=htmlencode1(trim(rs("cgy")))%></textarea>
</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">吉凶：</div></td>
      <td><input name="jx2" type="text" id=jx2 value="<%=rs("jx2")%>" size="10"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">人际关系：</div></td>
      <td> <p>
        <textarea name="rjgx" cols="80" rows="4" id="rjgx"><%=htmlencode1(trim(rs("rjgx")))%></textarea>
</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">吉凶：</div></td>
      <td><input name="jx3" type="text" id=jx3 value="<%=rs("jx3")%>" size="10"></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td> <div align="right">性格：</div></td>
      <td> <p>
        <textarea name="xg" cols="80" rows="4" id="xg"><%=htmlencode1(trim(rs("xg")))%></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>



