⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 replysms.jsp

📁 本论坛开发环境:jdk1.5+Tomcat5.5.17+sql server2000+Windows 2000 1、支持HTML内容编辑,支持网络贴图与附件上传等,支持多种版面风格. 2、论坛
💻 JSP
字号:
<%@ 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="../inc/conn.jsp"%>
<%@ include file="checkbbsuser.jsp"%>
<%
String sql,username,accepter,title,content;
String touser = new String(request.getParameter("touser").getBytes("iso-8859-1"));
String act = request.getParameter("act");
String id = request.getParameter("id");
if(act!=null)
{
accepter=touser;
title=new String(request.getParameter("title").getBytes("iso-8859-1"));
content=new String(request.getParameter("content").getBytes("iso-8859-1"));

sql="insert into sms(title,content,username,accepter) values('"+title+"','"+content+"','"+username+"','"+accepter+"')";
stmt.executeUpdate(sql);
sql="update sms set replysign=1 where id='"+id+"'";
stmt.executeUpdate(sql);
out.print("<script language='javascript'>");
out.print("alert('发送成功!');");
out.print("history.go(-2);");
out.print("</script>");
out.close();
stmt.close(); 
conn.close();
}
else
{
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript src="../inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="main0"+stylecook+".css";
strstyle="<link href=\"../css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
<title>论坛短信系统</title>
</head>
<script language="javascript">
<!--
	function check(form)
	{
    if (form.title.value=="")
    	{
    		alert("请填写标题!");
    		form.title.focus();
    		return false;
  	}
    if (form.content.value=="")
    	{
    		alert("请填写内容!");
    		form.content.focus();
    		return false;
  	}
return true;
	}
//-->
</script>
<body topmargin="5">
<div align="center">
  <TABLE align=center class="maintbbg" border=0 cellPadding=0 cellSpacing=0 width="99%">
    <TR> 
      <TD height=25 class="f14"> <div align="center"><font color="#FFFFFF"><strong>欢迎<font color="#CC3300"><%=username%></font>网友回复短信</strong></font></div></TD>
    </TR>
  </TABLE>
  <TABLE align="center" class="td004" border=0 cellPadding=0 cellSpacing=0 width="99%">
    <TBODY>
      <TR class="table001"> 
        <TD height="28" vAlign=middle class="maintbtr1"> 
          <div align="center">回复短信</div></TD>
      </TR>
    </TBODY>
  </TABLE>
  <TABLE width="99%" border=0 align="center" cellPadding=0 cellSpacing=0 bgColor="#FFFFFF">
    <TBODY>
      <TR bgColor=#f2f8ff> 
        <TD vAlign=middle bgColor=#f6f6f6 class=font10_5><div align="center">
            <form name="form2" method="post" action="" style="MARGIN-BOTTOM: 0px" onsubmit="return check(this)">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="17%" height="30" class="f12"> <div align="right">标题:</div></td>
                  <td width="83%"><input name="title" type="text" id="title" size="50"></td>
                </tr>
                <tr> 
                  <td height="25" class="f12"><div align="right">内容:</div></td>
                  <td><textarea name="content" cols="70" rows="20" id="content"></textarea></td>
                </tr>
                <tr> 
                  <td height="30"><div align="right"></div></td>
                  <td><input type="submit" name="Submit2" value="发送"> <input name="cannel" type="reset" id="cannel" value="重置"> 
                    <input name="act" type="hidden" id="act" value="y"> <input name="id" type="hidden" id="id" value="<%=id%>">
                    <input name="touser" type="hidden" id="touser" value="<%=touser%>"> 
                  </td>
                </tr>
              </table>
            </form>
          </div></TD>
      </TR>
    </TBODY>
  </TABLE>
<%@ include file="../inc/bbstail.jsp"%>
</div>
</body>
</html>
<%}%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -