📄 browsepoll.jsp
字号:
<%@ page import="com.everstar.poll.*,com.everstar.usermanage.*"%>
<jsp:useBean id="dbConn" scope="request" class="com.everstar.database.Database"/>
<jsp:useBean id="carerrCtl" scope="page" class="com.everstar.poll.ListPoll">
<jsp:setProperty name="carerrCtl" property="*"/>
<jsp:setProperty name="carerrCtl" property="dbConn" value="<%=dbConn%>"/>
<%carerrCtl.init();%>
</jsp:useBean>
<%
//user permission check! --operate name: POLL_INFORMATION
HttpSession AuthInfoPool=request.getSession();
if (!Auth.islogin(AuthInfoPool))
{
%>
<jsp:include page="../header.jsp" flush="true"/>
<meta http-equiv="refresh" content="2;URL='../login.jsp">
<center><h2>You should login first! </h2></center>
<jsp:include page="../footer.jsp" flush="true"/>
<%
//response.sendRedirect("../login.jsp");
return;
}
else
{
boolean canOperate = Auth.havePerm("WEB_STARINVITE",AuthInfoPool);
if (!canOperate)
{
%>
<jsp:include page="../header.jsp" flush="true"/>
<!--meta http-equiv="refresh" content="2;URL='../login.jsp"-->
<center><h2>You have no permission to operate the function!
<br><a href="javascript:history.go(-1);">Back</a>
</h2></center>
<jsp:include page="../footer.jsp" flush="true"/>
<%
return;
}
}
%>
<script language="JavaScript">
<!--
function addpage(){
form1.action = "addpoll.jsp";
form1.submit();
}
function deleteA(form){
var li_count = 0;
for( var i = 0; i < form.elements.length; i++){
e = form.elements[i];
if (e.checked == true) {li_count = li_count + 1;}
}
if (li_count < 1) {
window.alert("No Selection,Don't Delete!");
return false;
}
form.action = "deletepoll.jsp";
form.submit();
}
//-->
</script>
<html>
<head>
<title>management
</title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<style type="text/css">
<!--
A { text-decoration: none; }
A:hover { color:#FF3300; }
.normal { text-decoration: underline; color:#0033cc; }
.subject { font-family: verdana; }
.subjectOn { font-family: verdana; font-weight: bold; }
.username { font-family: verdana; color: #000000; }
.usernameOn { font-family: verdana; color: #000000; font-weight: bold; }
.datetime { font-family: verdana; color: #333333; }
.datetimeOn { font-family: verdana; color: #333333; font-weight: bold; }
.dateTimeList { font-family: verdana; color: #666666; text-align: center; }
.dateTimeListToday { font-family: verdana; color: #ff6600; text-align: center; }
.breadcrumbBox { font-family: verdana; font-size: 9pt; color: #0033cc; font-weight: bold;}
.messageNav { font-size: 7pt; font-family: verdana;}
.messageNavButton { font-size: 8pt;font-family: verdana;}
-->
</style>
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 text=#000000 topMargin=0 MARGINWIDTH="0" MARGINHEIGHT="0">
<TABLE bgColor=#ffffff border=0 cellPadding=0 cellSpacing=0 width="100%">
<tr><jsp:include page="../header.jsp" flush="true"/> </tr>
</TABLE>
<TABLE bgColor=#ffffff border=0 cellPadding=0 cellSpacing=0 width="100%">
<Form Action="browsepoll.jsp" Method=Post Name="form1" >
<tr><div align="center"><font size="+2">Poll Information List</font></div></tr>
<tr>
<table width="100%" border="1" align="center">
<tr>
<td width="5%">
<div align="center"><font size="2" color="#000000">Select</font></div>
</td>
<td width="50%">
<div align="center"><font size="2">PollName</font></div>
</td>
<td width="10%">
<div align="center"><font size="2">Author</font></div>
</td>
<td width="5%">
<div align="center"><font size="2">Status</font></div>
</td>
<td width="15%">
<div align="center"><font size="2">CreateTime</font></div>
</td>
<td width="15%">
<div align="center"><font size="2">OverTime</font></div>
</td>
<%String[] rowClrs = new String[] { "F7EFDE", "00FF80" };
PollInformation emBean = null;
for (int i = 0; i < carerrCtl.getNumOfPoll(); ++i) {
emBean = carerrCtl.getPoll(i);%>
<tr bgColor="<%=rowClrs[i % 2]%>">
<td width ="5%"><div align="center"><input type="checkbox" name="chk" value ="<%=emBean.getThemeNo()%>"></div></td>
<td width="50%"><a href="polldetail.jsp?pollId=<%=emBean.getThemeNo()%>"><%=(emBean.getThemeTitle().trim().length() == 0) ? " " : emBean.getThemeTitle()%></a></td>
<td width="10%"><%=(emBean.getAuthor().trim().length() == 0) ? " " : emBean.getAuthor()%></td>
<td width ="5%"><div align="center"><%=(emBean.getStatus()<= 0) ? 0 : emBean.getStatus()%></div></td>
<td width="15%"><%=(emBean.getCreatTime().trim().length() == 0) ? " " : emBean.getCreatTime()%></td>
<td width="15%"><%=(emBean.getOverTime().trim().length() == 0) ? " " : emBean.getOverTime()%></td>
</tr>
<%}%>
</table>
</tr>
<tr>
<div align="center">
<input type= "button" name =add value ="AddPosition" onclick="addpage()">
<input type= "button" name =delete value ="DeletePosition" onclick="deleteA(this.form)">
<input type=Hidden name=recFrom value=<%=carerrCtl.getRecFrom()%>>
<%if (carerrCtl.getRecFrom()> 1) { %>
<input type=submit name=actPrev value="PreviousPage">
<%}
if (carerrCtl.getNumOfPoll()>= carerrCtl.getNumRecPerPage()) {%>
<input type=submit name=actNext value="NextPage">
<%}%>
</div>
</tr>
</tr>
</form>
</table>
<TABLE bgColor=#ffffff border=0 cellPadding=0 cellSpacing=0 width="100%">
<tr><jsp:include page="../footer.jsp" flush="true"/> </tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -