📄 votemanage.jsp
字号:
<%@ 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); %>
<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" src="/js/changestyle.js"></script>
<script language="JavaScript" type="text/javascript">
function checkAddVote()
{
if(document.addvote.VoteName.value=="")
{
alert("请输入投票名称!");
document.addvote.VoteName.focus();
return false;
}
if(document.addvote.StartTime.value!="")
{
if(!isDate(document.addvote.StartTime.value))
{
alert("日期格式错误,请按照“2002-02-18”重新输入!");
document.addvote.StartTime.focus();
return false;
}
}
if(document.addvote.EndTime.value!="")
{
if(!isDate(document.addvote.EndTime.value))
{
alert("日期格式错误,请按照“2002-02-18”重新输入!");
document.addvote.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>
<%
Request m_request = new Request(request);
int iSysDirID = m_request.GetInt("SysDirID");
int iPageSize = 18;
int iPage = m_request.GetInt("Page");
Vector vt = VoteManager.getRecordBySysDirID(iSysDirID);
if(iPage<1)iPage=1;
int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
if(iPage>iPageCount) iPage=1;
%>
<table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
<tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
<th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
<th width="6%" nowrap><font color="#000000">序号</font></th>
<th width="30%" nowrap><font color="#000000">投票名称</font></th>
<th width="8%" nowrap><font color="#000000">开始时间</font></th>
<th width="8%" nowrap><font color="#000000">结束时间</font></th>
<th width="8%" nowrap><font color="#000000">是否单选</font></th>
<th width="8%" nowrap><font color="#000000">投票次数</font></th>
<th width="8%" nowrap><font color="#000000">发布时间</font></th>
<th width="8%" nowrap><font color="#000000">发布用户</font></th>
<th width="8%" nowrap><font color="#000000">修改</font></th>
<th width="8%" nowrap><font color="#000000">删除</font></th>
</tr>
<%
for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
{
String strID = ((Vector)vt.get(i)).get(0).toString();
if(i % 2 == 0)
out.println("<tr id=\"Row"+ i+ "\" class=\"DataRowsSingle\" onmouseover=\"mouseon(this,'image" + i + "');\" onmouseout=\"mouseout(this,'image" + i + "','DataRowsSingle');\">");
else
out.println("<tr id=\"Row"+ i+ "\" class=\"DataRowsDouble\" onmouseover=\"mouseon(this,'image" + i + "');\" onmouseout=\"mouseout(this,'image" + i + "','DataRowsDouble');\">");
out.println("<td align=\"right\" valign=\"middle\"><img id=\"image" + i + "\" src=\"../images/lastpost1.gif\" style=\"display:none;\"> </td>");
out.println("<td align=\"right\" valign=\"middle\">" + (i+1) + "</td>");
out.println("<td align=\"left\" valign=\"middle\" nowrap title=\"" + ((Vector)vt.get(i)).get(1).toString() + "\" onclick=\"window.open('VoteOptionManage.jsp?SysDirID=" + iSysDirID + "&VoteID=" + strID + "','_blank','height=380,top='+((screen.height-380)/2)+',left='+((screen.width-400)/2)+',width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes')\"><a href=\"\" onclick=\"return false;\">" + ((Vector)vt.get(i)).get(1).toString() + "</a></td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(2).toString(),"yyyy-MM-dd") + "</td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(3).toString(),"yyyy-MM-dd") + "</td>");
String t_IsRadio = ((Vector)vt.get(i)).get(4).toString();
if (t_IsRadio.equalsIgnoreCase("true")) t_IsRadio = "是";
else t_IsRadio = "否";
out.println("<td align=\"center\" valign=\"middle\" nowrap>" + t_IsRadio + "</td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap>" + ((Vector)vt.get(i)).get(6).toString() + "</td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(7).toString(),"yyyy-MM-dd") + "</td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap>" + ((Vector)vt.get(i)).get(9).toString() + " </td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap><a href=\"EditVote.jsp?SysDirID="+iSysDirID + "&ID=" + strID + "\">修改</a></td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap><a href=\"DelVote.jsp?SysDirID="+iSysDirID + "&ID=" + strID + "\" onclick=\"return confirm('您确实要删除该投票吗?\\n要删除该投票,请先删除属于该投票的投票选项。');\">删除</a></td>");
out.println("</tr>");
}
%>
<tr>
<th align="center" valign="top" colspan="11">
<%
String strCurrentPageURL = request.getRequestURI();
if(iPage<2)
out.print("首页 上页");
else
out.print("<a href=\""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + 1 + "\">首页</a> <a href=\""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage-1) + "\">上页</a>");
out.print(" 当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页 ");
if(iPage>=iPageCount)
out.print("下页 末页");
else
out.print("<a href=\""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage+1) + "\">下页</a> <a href=\""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + iPageCount + "\">末页</a>");
%>
</th>
</tr>
</table>
<form name="addvote" action="AddVoteAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkAddVote();">
<table align="center" border="1" cellpadding="0" cellspacing="0" width="90%">
<tr>
<th colspan="2" align="center"><font color="#0A0A0A">新 增 投 票 </font></th>
</tr>
<tr>
<td align="right" valign="middle" width="14%"><font color="#0A0A0A">投 票 名 称: </font></td>
<td align="left" valign="middle" nowrap>
<input name="VoteName" type="text" maxlength="60" size="40">
</td>
</tr>
<tr>
<td align="right" valign="middle" width="14%"><font color="#0A0A0A">开 始 时 间: </font></td>
<td align="left" valign="middle" nowrap>
<input name="StartTime" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="40" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
</td>
</tr>
<tr>
<td align="right" valign="middle" width="14%"><font color="#0A0A0A">结 束 时 间: </font></td>
<td align="left" valign="middle" nowrap>
<input name="EndTime" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="40" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
</td>
</tr>
<tr>
<td align="right" valign="middle" width="14%"><font color="#0A0A0A">是 否 单 选: </font></td>
<td align="left" valign="middle" nowrap>
<font color="#0A0A0A"> <input name="IsRadio" type="radio" value="1" checked>单选 <input name="IsRadio" type="radio" value="0">多选</font>
<input name="VoteTimes" type="hidden" value="0">
<%java.util.Date t_Date = new java.util.Date();%>
<input name="PublishTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd")%>">
<%
Session t_session = new Session(session);
%>
<input name="PublishUserID" type="hidden" value="<%=t_session.GetInt("UserID")%>">
</td>
</tr>
<tr>
<td align="center" valign="middle" colspan="2">
<input type="submit" value="新 增" style="background-color: #FFFFFF; border: 1 solid #000000"> <input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -