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

📄 mail_option.jsp

📁 一个做得非常好的电子政务系统
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.ijipin.tool.*" %>
<%@ page import="com.ijipin.database.*" %>
<%@ page import="com.ijipin.property.*" %>
<%@ include file="/userinfor.jsp" %>
<%@ include file="/share/page/page_request.jsp"%>
<%
    ////////////////////////////列表页面所必须有的公共变量
    final String strSkin  = "../../" + userInfor_session.getPFLJ();  //皮肤路径
    final String strLevel = "../../../";  //本页所在的层次
    final String strLink  = "";
    final int iModuleID = 37;

    DataConn dataConn = new DataConn();
    Statement stmt = null;
    ResultSet rs = null;
    DataList dataList = null;
    //获取本模块信息
    Module module = new Module(dataConn);
    moduleInfor_session = (ModuleInfor)module.getInfor(iModuleID);
%>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Message.COMPANY_NAME%></title>
<link href="<%=strSkin%>css.css" rel="stylesheet" type="text/css">
</head>
<%@ include file="/share/page/bar_top.jsp"%>
<%
try {
    stmt = dataConn.getConnection().createStatement();
    dataList = new DataList(stmt);

    String sTable = "";
    String sField = "";
    String sCond  = "";
    sTable = "OA_YJSZ";
    sField = "SZZY,SZSD,SZYD,SZHF,SZHFID,SZHFRY,SZHFDZ,SZBC";
    sCond  = "SZRY="+userInfor_session.getYGID();
    rs = dataList.getResultSet(sTable, sField, sCond);

    String importance = "";
    int reach = 0;
    int read = 0;
    int reply = 0;
    int replyid = 0;
    String replyto = "";
    String replyto2 = "";
    int saveto = 0;
    boolean flag = false;
    try {
        if (rs.next()) {
            importance = Convert.toUnicode(rs.getString("SZZY"));
            reach = rs.getInt("SZSD");
            read = rs.getInt("SZYD");
            reply = rs.getInt("SZHF");
            replyid = rs.getInt("SZHFID");
            replyto = Convert.toUnicode(rs.getString("SZHFRY"));
            replyto2 = Convert.toUnicode(rs.getString("SZHFDZ"));
            saveto = rs.getInt("SZBC");
            flag = true;
        }
    }
    catch(Exception e) {
    }

    if (!flag) {
        importance = "普通";
        reach = 0;
        read = 0;
        reply = 1;
        replyid = userInfor_session.getYGID();
        replyto = userInfor_session.getYGXM();
        replyto2 = "";
        saveto = 2;
    }

%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form name="formButton1">
  <tr class="toptr2">
    <td>
      <table width="100%" border=0 cellpadding=3 cellspacing=1 >
          <tr>
            <td width="5%"><input type="button" name="subSave" value="" class="buttonSave" onClick="SubSave(formSave);"></td>
            <td width="5%"><input type="button" name="btnAdd3" value="" class="buttonReset" onClick="document.location.href='mail_option.jsp'"></td>
            <td width="87%">&nbsp;</td>
          </tr>
       </table>
    </td>
  </tr>
  </form>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
  <form name="formSave" method="post" action="mail_optionok.jsp">
              <tr><td colspan="3">邮件设置</td></tr>
              <tr><td width="50">&nbsp;</td>
                  <td align="left" colspan=2>重要性:&nbsp;&nbsp;
                    <select name="importance" class="drpdwn">
                      <option value="低" <% if (importance.equals("低")) {%>selected<% } %>>低&nbsp;</option>
                      <option value="普通" <% if (importance.equals("普通")) {%>selected<% } %>>普通&nbsp;</option>
                      <option value="高" <% if (importance.equals("高")) {%>selected<% } %>>高&nbsp;</option>
                    </select>
                  </td>
              </tr>
              <tr><td colspan="3">跟踪选项</td></tr>
              <tr><td width="50">&nbsp;</td>
                  <td align="left" colspan=2>
                    <input type="checkbox" name="reach" value="1" <%if (reach==1) {%> checked <%}%>>给出“送达”邮件(外部邮件)
                  </td>
              </tr>
              <tr><td width="50">&nbsp;</td>
                  <td align="left" colspan=2>
                    <input type="checkbox" name="read" value="1" <%if (read==1) {%> checked <%}%>>给出“已读”邮件
                  </td>
              </tr>
              <tr><td colspan="2">传递选项</td></tr>
              <tr><td width="50">&nbsp;</td>
                  <td align="left"><input type="checkbox" name="reply" value="1" onClick="ReplyTo();"  <%if (reply==1) {%> checked <%}%>>使回复发送到内部:</td>
                  <td><input type="hidden" name="replyto" size="30" value="<%=replyid%>">
                      <input type="text" name="replyName" size="30" readonly value="<%=replyto%>">
                      <input type="button" name="btnName" size="30" value="请选择...." class="sbttn" onClick="winOpen();" <%if (reply==0) {%>disabled="true"<%}%>><font color="red">(注意:只能选一个人)</font>
                  </td>
              </tr>
              <tr><td width="50">&nbsp;</td>
                  <td align="left">&nbsp;&nbsp;&nbsp;使回复发送到外部:</td>
                  <td><input type="text" name="replyto2" size="30" value="<%=replyto2%>"></td>
              </tr>
              <tr><td width="50">&nbsp;</td>
                  <td align="left"><input type="checkbox" name="folder" value="1" <%if (saveto>0) {%> checked <%}%>>已发送邮件保存于:</td>
                  <td>
                      <%
                          sTable = "OA_YJWJJ";
                          sField = "WJID,WJMC";
                          sCond  = "WJRY=0 OR WJRY="+userInfor_session.getYGID();
                          rs = dataList.getResultSet(sTable, sField, sCond);
                      %>
                      <select name="saveto" class="drpdwn">
                      <%
                          int id = 0;
                          String name = "";
                          while (rs.next()) {
                              id = rs.getInt("WJID");
                              name = Convert.toUnicode(rs.getString("WJMC"));
                      %>
                        <option value="<%=id%>" <%if (id==saveto) {%>selected<%}%>><%=name%>&nbsp;</option>
                      <%
                          }
                      %>
                      </select>
                  </td>
              </tr>
  </form>
</table>
<br>
<br>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <form name="formButton2">
  <tr class="toptr2">
    <td>
      <table width="100%" border=0 cellpadding=3 cellspacing=1 >
          <tr>
            <td width="5%"><input type="button" name="subSave" value="" class="buttonSave" onClick="SubSave(formSave);"></td>
            <td width="5%"><input type="button" name="btnAdd3" value="" class="buttonReset" onClick="document.location.href='mail_option.jsp'"></td>
            <td width="87%">&nbsp;</td>
          </tr>
       </table>
    </td>
  </tr>
  </form>
</table>
<Script Language="javaScript" src="<%=strLevel%>share/js/util.js"></Script>
<script language="JavaScript" type="text/JavaScript">
    //选中回复到
    function ReplyTo() {
        if (document.formSave.reply.checked == true) {
            document.formSave.replyName.readonly = false;
            document.formSave.replyto2.readonly = false;
            document.formSave.btnName.disabled = false;
        }
        else {
            document.formSave.replyName.readonly = true;
            document.formSave.replyto2.readonly = true;
            document.formSave.btnName.disabled = true;
        }
    }
</script>
<script language="JavaScript" type="text/JavaScript">
    function SubSave(form) {
        var replyId = document.formSave.replyto.value;
        if (replyId.indexOf(",") > 0 ) {
          alert("使回复发送到内部只能选一个人!");
          return false;
        }
        DisableAll(formButton1);
        DisableAll(formButton2);
        form.action="mail_optionok.jsp";
        form.submit();
    }
</script>

<script language="javascript">
    function winOpen() {
        var obj_id = "document.formSave.replyto";
        var obj_name = "document.formSave.replyName";
        openWin=window.open('<%=strLevel%>share/select/win_user.jsp?obj_id='+obj_id+'&obj_name='+obj_name,'','left=400,top=200,scrollbars=no,resizable=no,status=no,width=350,height=400');
    }
</script> 
<%
    }
    catch(Exception e) {
        System.out.println("异常="+e);
    }
    finally {
        if (stmt != null) {
            stmt.close();
        }
        if (dataConn != null) {
            dataConn.close();
        }
    }
%>
</body>

⌨️ 快捷键说明

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