<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="java.sql.*"%> 
<%@ page import="java.util.*"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.*"%>
<%@ include file="../admin/checkmaster.jsp"%>
<%@ include file="../inc/conn.jsp"%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/xmwy.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
	function check(form)
		{
		if (form.content.value=="")
			{
			alert("请填写内容！");
			form.content.focus();
			return false;
			}
			return true;
		}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<%
String ope=request.getParameter("ope");
if(ope.equals("add")){
%>
<form name="form1" method="post" action="adminpostsmsact.jsp?ope=add" onsubmit="return check(this)">
  <table width="90%" border="0" align="center" bgcolor="#333333" cellspacing="1" cellpadding="0">
    <tr bgcolor="#d6dff7"> 
      <td height="20" colspan="2"> 
        <div align="center">发送系统短信</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%" height="20"> 
        <div align="right">标题：</div>
      </td>
      <td width="84%"> <input name="title" type="text" id="title" size="60"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20"> 
        <div align="right">内容：</div>
      </td>
      <td>
        <textarea name="content" cols="60" rows="12"></textarea>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20" colspan="2"> 
        <div align="center"> 
          <input type="submit" name="Submit" value="提交">
          <input type="reset" name="Submit2" value="重置">
        </div>
      </td>
    </tr>
  </table>
</form>
<%}%>
<%
if(ope.equals("mod")){
String id=request.getParameter("id");
String sql="select * from sms where id="+id;
ResultSet rs=stmt.executeQuery(sql);
rs.next();
%>
<form name="form1" method="post" action="adminpostsmsact.jsp?ope=mod&id=<%=id%>" onsubmit="return check(this)">
  <table width="90%" border="0" align="center" bgcolor="#333333" cellspacing="1" cellpadding="0">
    <tr bgcolor="#d6dff7"> 
      <td height="20" colspan="2"> 
        <div align="center">修改论坛短信</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%" height="20"> 
        <div align="right">标题：</div>
      </td>
      <td width="84%"> <input name="title" type="text" id="title" value="<%=rs.getString("title")%>" size="60"> </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20"> 
        <div align="right">内容：</div>
      </td>
      <td>
        <textarea name="content" cols="60" rows="15"><%=rs.getString("content")%></textarea>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20" colspan="2"> 
        <div align="center"> 
          <input type="submit" name="Submit" value="提交">
          <input type="reset" name="Submit2" value="重置">
        </div>
      </td>
    </tr>
  </table>
</form>
<%}%>
<p>&nbsp;</p>
</body>
</html>