📄 webarticlemanage.jsp
字号:
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="com.sunny.s3fornetoffice.*,com.sunny.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>网站栏目内容管理-- S3 for OA 2.0</title>
<link href="../css/txt.jsp" rel="stylesheet" type="text/css">
<script language="JavaScript" src="/js/changestyle.js"></script>
</head>
<body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
<%
Request m_request = new Request(request);
int iPageSize = 18;
int iPage = m_request.GetInt("Page");
String strCurrentPageURL = request.getRequestURI();
String strIDs = m_request.GetString("ID");
String strMultUserID = m_request.GetString("MultUserID");
String strMultSysID = m_request.GetString("MultSysID");
String strTitle = m_request.GetString("Title");
String strAuthor = m_request.GetString("Author");
String strPublisher = m_request.GetString("Publisher");
String strFromURL = m_request.GetString("FromURL");
String strPublishDateFrom = m_request.GetString("PublishDateFrom");
String strPublishDateTo = m_request.GetString("PublishDateTo");
String strContent = m_request.GetString("Content");
String strIsHot = m_request.GetString("IsHot");
String strKeyWords = m_request.GetString("KeyWords");
String strWebSiteDirID = m_request.GetString("WebSiteDirID");
String strPublishUserID = m_request.GetString("PublishUserID");
String strPublishUserName = m_request.GetString("PublishUserName");
String strOrderBy=m_request.GetString("OrderBy");
String strIsDesc=m_request.GetString("IsDesc");
String strOrderArrow="↑";
if(strIsDesc.equalsIgnoreCase("True"))
{
strOrderArrow="↓";
}
else
{
strOrderArrow="↑";
}
%>
<script language="JavaScript">
function changeorder(orderBy)
{
with(document.WebSiteDirManage)
{
if(OrderBy.value==orderBy)
{
if(IsDesc.value=="")
IsDesc.value="True";
else
IsDesc.value="";
}
else
{
OrderBy.value=orderBy;
IsDesc.value="";
Page.value="1";
}
}
document.WebSiteDirManage.submit();
}
function changepage(pageNum)
{
with(document.WebSiteDirManage)
{
Page.value=pageNum;
}
document.WebSiteDirManage.submit();
}
function checkWebSiteDir()
{
var isIDCheck = false;
var isIDCheck = false;
with(document.WebSiteDir)
{
try
{
for(i=0;i<elements.length;i++)
{
if(elements[i].type=="checkbox"&&elements[i].name=="ID")
{
if(elements[i].checked)
{
isIDCheck = true;
break;
}
}
}
}
catch(ex)
{
}
}
if(!isIDCheck)
{
alert("请先选择新闻、文章,再进行删除操作!");
return false;
}
return window.confirm('确实要删除这些新闻、文章吗?');
}
function checktall()
{
var allselect=true;
with(document.WebSiteDir)
{
if(selectall.value=="全部选择")
{
allselect = true;
selectall.value="全部取消";
}
else
{
allselect = false;
selectall.value="全部选择";
}
for(i=0;i<elements.length;i++)
{
if(elements[i].type=="checkbox")
elements[i].checked = allselect;
}
}
}
</script>
<table width="100%" height="100%" border="0" align="center" cellspacing="0">
<tr>
<td align="center" valign="top"><p> </p>
<form name="WebSiteDirManage" action="<%=strCurrentPageURL%>?MultUserID=<%=strMultUserID%>&MultSysID=<%=strMultSysID%>" method="post">
<input name="Page" type="hidden" value="<%=iPage%>">
<input name="ID" type="hidden" value="<%=strIDs%>">
<input name="Title" type="hidden" value="<%=strTitle%>">
<input name="Author" type="hidden" value="<%=strAuthor%>">
<input name="Publisher" type="hidden" value="<%=strPublisher%>">
<input name="FromURL" type="hidden" value="<%=strFromURL%>">
<input name="PublishDateFrom" type="hidden" value="<%=strPublishDateFrom%>">
<input name="PublishDateTo" type="hidden" value="<%=strPublishDateTo%>">
<input name="Content" type="hidden" value="<%=strContent%>">
<input name="IsHot" type="hidden" value="<%=strIsHot%>">
<input name="KeyWords" type="hidden" value="<%=strKeyWords%>">
<input name="WebSiteDirID" type="hidden" value="<%=strWebSiteDirID%>">
<input name="PublishUserID" type="hidden" value="<%=strPublishUserID%>">
<input name="PublishUserName" type="hidden" value="<%=strPublishUserName%>">
<input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
<input name="IsDesc" type="hidden" value="<%=strIsDesc%>"><font color="#000000"><b>新闻文章管理</b></font>
<br><br>
</form>
<form name="WebSiteDir" action="DelWebArticle.jsp?MultUserID=<%=strMultUserID%>&MultSysID=<%=strMultSysID%>" method="post" onsubmit="return checkWebSiteDir();">
<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="2%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
<th width="4%" nowrap><font color="#000000">编号</font></th>
<th width="60%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.Title');return false;">文章标题</a><%=(strOrderBy.equalsIgnoreCase("a.Title"))?strOrderArrow:""%></font></th>
<th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.Author');return false;">作者</a><%=(strOrderBy.equalsIgnoreCase("a.Author"))?strOrderArrow:""%></font></th>
<th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('b.Name');return false;">所属栏目</a><%=(strOrderBy.equalsIgnoreCase("b.Name"))?strOrderArrow:""%></font></th>
<th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('d.Name');return false;">发布者</a><%=(strOrderBy.equalsIgnoreCase("d.Name"))?strOrderArrow:""%></font></th>
<th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.PublishDate');return false;">发布时间</a><%=(strOrderBy.equalsIgnoreCase("a.PublishDate"))?strOrderArrow:""%></font></th>
<th width="3%" nowrap><font color="#000000">修改</font></th>
<th width="3%" nowrap><font color="#000000">删除</font></th>
</tr>
<%
Vector vt = WebSiteArticleManager.getRecordBySearch(strIDs, strTitle, strAuthor, strPublisher, strFromURL,strPublishDateFrom,strPublishDateTo,strContent,strIsHot,strKeyWords,strWebSiteDirID,strPublishUserID,strPublishUserName,strMultUserID,strMultSysID,strOrderBy, strIsDesc);
if(iPage<1)iPage=1;
int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
if(iPage>iPageCount) iPage=1;
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\" title=\"" + ((Vector)vt.get(i)).get(1).toString() + "\" ><input type=\"checkbox\" name=\"ID\" value=\"" + strID + "\">" + ((Vector)vt.get(i)).get(1).toString() + " </td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap >" + ((Vector)vt.get(i)).get(2).toString() + " </td>");
out.println("<td align=\"center\" valign=\"middle\" >" + ((Vector)vt.get(i)).get(13).toString() + " </td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap >" + ((Vector)vt.get(i)).get(14).toString() + " </td>");
out.println("<td align=\"left\" valign=\"middle\" nowrap >" + StringNew.GetDateString(((Vector)vt.get(i)).get(5).toString(),"MM-dd HH:mm") + " </td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap ><a href=\"EditWebArticle.jsp?MultUserID=" + strMultUserID + "&MultSysID=" + strMultSysID + "&ID=" + strID + "\">修改</a></td>");
out.println("<td align=\"center\" valign=\"middle\" nowrap ><a href=\"DelWebArticle.jsp?MultUserID=" + strMultUserID + "&MultSysID=" + strMultSysID + "&ID=" + strID + "\">删除</a></td>");
out.println("</tr>");
}
%>
<tr>
<th align="center" valign="top" colspan="5">
<%
if(iPage<2)
out.print("首页 上页");
else
out.print("<a href=\"\" onclick=\"changepage(" + 1 + ");return false;\">首页</a> <a href=\"\" onclick=\"changepage(" + (iPage-1) + ");return false;\">上页</a>");
out.print(" 当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页 ");
if(iPage>=iPageCount)
out.print("下页 末页");
else
out.print("<a href=\"\" onclick=\"changepage(" + (iPage+1) + ");return false;\">下页</a> <a href=\"\" onclick=\"changepage(" + iPageCount + ");return false;\">末页</a>");
%>
</th>
<th colspan="4">
<input name="AddNew" type="button" value="新增" onclick="window.location='AddWebArticle.jsp?MultUserID=<%=strMultUserID%>&MultSysID=<%=strMultSysID%>'" style="background-color: #FFFFFF; border: 1 solid #000000">
<input name="selectall" type="button" value="全部选择" onclick="checktall()" style="background-color: #FFFFFF; border: 1 solid #000000">
<input name="subm" type="submit" value="删除" style="background-color: #FFFFFF; border: 1 solid #000000">
</th>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -