- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <%
- Request m_request = new Request(request);
- int intVoteID = m_request.GetInt("ID");
- int iSysDirID = m_request.GetInt("SysDirID");
- if(intVoteID<1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的在线投票,修改失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- Vector vt = VoteManager.getRecordByID(intVoteID);
- if(vt.size()==1)
- {
- if(("," + iSysDirID + ",").indexOf("," + ((Vector)vt.get(0)).get(5).toString() + ",")>=0)
- {
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <title>在线投票管理-- GForce OA 2.0</title>
- <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
- <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
- <script language="JavaScript" type="text/javascript">
- function checkEditVote()
- {
- if(document.editvote.VoteName.value=="")
- {
- alert("请输入投票名称!");
- document.editvote.VoteName.focus();
- return false;
- }
- if(document.editvote.StartTime.value!="")
- {
- if(!isDate(document.editvote.StartTime.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.editvote.StartTime.focus();
- return false;
- }
- }
- if(document.editvote.EndTime.value!="")
- {
- if(!isDate(document.editvote.EndTime.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.editvote.EndTime.focus();
- return false;
- }
- }
- }
- </script>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <table width="90%" border="0" cellpadding="0" cellspacing="0">
- <tr align="center" valign="middle">
- <th nowrap colspan=2 align="center"><font color="#000000">投 票 信 息 修 改</font></th>
- </tr>
- <tr><td> </td>
- </tr>
- </table>
- <form name="editvote" action="EditVoteAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkEditVote();">
- <table border="1" cellpadding="1" cellspacing="1" width="70%">
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">投 票 名 称: </font></td>
- <td align="left" valign="middle" nowrap>
- <input name="ID" type="hidden" value="<%=intVoteID%>">
- <input name="VoteName" type="text" maxlength="60" size="37" Value="<%=((Vector)vt.get(0)).get(1).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">开 始 时 间: </font></td>
- <td align="left" valign="middle" nowrap>
- <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);">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">结 束 时 间: </font></td>
- <td align="left" valign="middle" nowrap>
- <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);">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">是 否 单 选: </font></td>
- <td align="left" valign="middle" nowrap>
- <%
- String t_IsRadio = ((Vector)vt.get(0)).get(4).toString();
- String t_IsRadioTrue = "";
- String t_IsRadioFalse = "";
- if (t_IsRadio.equalsIgnoreCase("true")) t_IsRadioTrue = "checked";
- else t_IsRadioFalse = "checked";
- %>
- <font color="#0A0A0A"><input name="IsRadio" type="radio" value="1" <%=t_IsRadioTrue%>>单选 <input name="IsRadio" type="radio" value="0" <%=t_IsRadioFalse%>>多选</font>
- <input name="VoteTimes" type="hidden" value="<%=((Vector)vt.get(0)).get(6).toString()%>">
- <input name="PublishTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(7).toString(),"yyyy-MM-dd")%>">
- <input name="PublishUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
- </td>
- </tr>
- </table>
- <table width="70%" border="0">
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- <td align="right" valign="middle" nowrap>
- <td colspan="3" align="right" valign="middle" nowrap><input type="submit" value="确 定" style="background-color: #FFFFFF; border: 1 solid #000000"> <input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000"> <input type="button" value="返 回" onclick="window.location='VoteManage.jsp?SysDirID=<%=m_request.GetInt("SysDirID")%>';" style="background-color: #FFFFFF; border: 1 solid #000000">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- %>