EditVote.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:7k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int intVoteID = m_request.GetInt("ID");
  7. int iSysDirID = m_request.GetInt("SysDirID");
  8. if(intVoteID<1)
  9. {
  10. %>
  11. <script language="JavaScript" type="text/JavaScript">
  12. alert("请选择正确的在线投票,修改失败!");
  13. history.back();
  14. </script>
  15. <%
  16. }
  17. else
  18. {
  19. Vector vt = VoteManager.getRecordByID(intVoteID);
  20. if(vt.size()==1)
  21. {
  22. if(("," + iSysDirID + ",").indexOf("," + ((Vector)vt.get(0)).get(5).toString() + ",")>=0)
  23. {
  24. %>
  25. <html>
  26. <head>
  27. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  28. <title>在线投票管理-- GForce OA 2.0</title>
  29. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  30. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  31. <script language="JavaScript" type="text/javascript">
  32. function checkEditVote()
  33. {
  34.     if(document.editvote.VoteName.value=="")
  35.     {
  36.         alert("请输入投票名称!");
  37.         document.editvote.VoteName.focus();
  38.         return false;
  39.     }
  40.     if(document.editvote.StartTime.value!="")
  41.     {
  42.       if(!isDate(document.editvote.StartTime.value))
  43.       {
  44.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  45.           document.editvote.StartTime.focus();
  46.           return false;
  47.       }
  48.     }
  49.     if(document.editvote.EndTime.value!="")
  50.     {
  51.       if(!isDate(document.editvote.EndTime.value))
  52.       {
  53.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  54.           document.editvote.EndTime.focus();
  55.           return false;
  56.       }
  57.     }
  58. }
  59. </script>
  60. </head>
  61. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  62. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  63.     <tr>
  64.         <td align="center" valign="top"><p>&nbsp;</p>
  65.           <table width="90%" border="0" cellpadding="0" cellspacing="0">
  66.                 <tr align="center" valign="middle">
  67.                 <th nowrap colspan=2 align="center"><font color="#000000">投&nbsp;票&nbsp;信&nbsp;息&nbsp;修&nbsp;改</font></th>
  68.               </tr>
  69.                <tr><td>&nbsp;</td>
  70.                 </tr>
  71.               </table>
  72.             <form name="editvote" action="EditVoteAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkEditVote();">
  73.             <table  border="1" cellpadding="1" cellspacing="1" width="70%">
  74.                 <tr>
  75.                     <td align="right" valign="middle"><font color="#0A0A0A">投&nbsp;票&nbsp;名&nbsp;称:&nbsp;</font></td>
  76.                     <td align="left" valign="middle" nowrap>
  77.                         <input name="ID" type="hidden" value="<%=intVoteID%>">
  78.                         &nbsp;<input name="VoteName" type="text" maxlength="60" size="37" Value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  79.                     </td>
  80.                 </tr>
  81.                  <tr>
  82.                     <td align="right" valign="middle"><font color="#0A0A0A">开&nbsp;始&nbsp;时&nbsp;间:&nbsp;</font></td>
  83.                     <td align="left" valign="middle" nowrap>
  84.                         &nbsp;<input name="StartTime" type="text" Value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  85.                    </td>
  86.                 </tr>
  87.                 <tr>
  88.                     <td align="right" valign="middle"><font color="#0A0A0A">结&nbsp;束&nbsp;时&nbsp;间:&nbsp;</font></td>
  89.                     <td align="left" valign="middle" nowrap>
  90.                         &nbsp;<input name="EndTime" type="text" Value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  91.                    </td>
  92.                 </tr>
  93.                 <tr>
  94.                     <td align="right" valign="middle"><font color="#0A0A0A">是&nbsp;否&nbsp;单&nbsp;选:&nbsp;</font></td>
  95.                     <td align="left" valign="middle" nowrap>&nbsp;
  96. <%
  97.  String t_IsRadio = ((Vector)vt.get(0)).get(4).toString();
  98.  String t_IsRadioTrue = "";
  99.  String t_IsRadioFalse = "";
  100.     if (t_IsRadio.equalsIgnoreCase("true"))  t_IsRadioTrue = "checked";
  101.        else t_IsRadioFalse = "checked";
  102. %>
  103.                        <font color="#0A0A0A"><input name="IsRadio" type="radio" value="1" <%=t_IsRadioTrue%>>单选&nbsp; <input name="IsRadio" type="radio" value="0" <%=t_IsRadioFalse%>>多选</font>
  104.                        <input name="VoteTimes" type="hidden" value="<%=((Vector)vt.get(0)).get(6).toString()%>">
  105.                        <input name="PublishTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(7).toString(),"yyyy-MM-dd")%>">
  106.                        <input name="PublishUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
  107.                    </td>
  108.                 </tr>
  109.             </table>
  110.             <table width="70%" border="0">
  111.                 <tr>
  112.                     <td>&nbsp;</td>
  113.                </tr>
  114.                 <tr>
  115.                   <td>&nbsp;</td>
  116.                    <td align="right" valign="middle" nowrap>
  117.                         <td colspan="3" align="right" valign="middle" nowrap><input type="submit" value="确 定" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="返 回" onclick="window.location='VoteManage.jsp?SysDirID=<%=m_request.GetInt("SysDirID")%>';" style="background-color: #FFFFFF; border: 1 solid #000000">
  118.                      </td>
  119.                 </tr>
  120.                 <tr>
  121.                     <td align="right" valign="middle">&nbsp;</td>
  122.                </tr>
  123.             </table>
  124.             </form>
  125.         </td>
  126.     </tr>
  127. </table>
  128. </body>
  129. </html>
  130. <%
  131. }
  132. else
  133. {
  134. %>
  135. <script language="JavaScript" type="text/JavaScript">
  136. alert("您没有权限修改此记录,修改失败!");
  137. history.back();
  138. </script>
  139. <%
  140. }
  141. }
  142. else
  143. {
  144. %>
  145. <script language="JavaScript" type="text/JavaScript">
  146. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  147. history.back();
  148. </script>
  149. <%
  150. }
  151. }
  152. %>