【JSP开源代码栏目提醒】:本文主要为网学会员提供allarticle.jsp,希望对需要allarticle.jsp网友有所帮助,学习一下!
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.io.*,oa.main.DealString"%>
<%
oa.bean.ArticleBean myBean = null;
oa.bean.RightBean myRitBean = null;
oa.bean.MenuBean menuBean = null;
try{
myBean = new oa.bean.ArticleBean();
myRitBean = new oa.bean.RightBean();
menuBean = new oa.bean.MenuBean();
DealString ds = new DealString();
//取得菜单类别
String strType = ds.toString((String)request.getParameter("txt_type"));
if(strType.equals(""))strType = "1";
//那个分页
String strId = ds.toString((String)request.getParameter("t"));
//操作权限 0:浏览 1:增删改
String czqx = "0";
//文章搜索条件
String select1 = ds.toString((String)request.getParameter("sel1"));
String select2 = ds.toString((String)request.getParameter("sel2"));
String select3 = ds.toString((String)request.getParameter("sel3"));
String currentBM = ds.toString((String)request.getParameter("menuid"));//分版面管理
//权限控制
String uid = (String)session.getAttribute("zgbh");
//Hashtable htbmqx = (Hashtable)myBean.getbmqx(uid);
menuBean.setUID(uid);
myRitBean.setUID(uid);
Hashtable htbmqx = (Hashtable)menuBean.getqx(uid,currentBM);
String showqx1 = (String)htbmqx.get("SHOW1");//所有可审批的位于menu表中的版面
if(showqx1.equals(""))
showqx1="-1";
String showqx2 = "";//(String)htbmqx.get("SHOW2");//所有可审批的位于menuchild表中的版面
if(showqx2.equals(""))
showqx2="-1";
String imgqx1 = (String)htbmqx.get("IMG1");//所有可审批图片的位于menu表中的版面
if(imgqx1.equals(""))
imgqx1="-1";
String imgqx2 ="";// (String)htbmqx.get("IMG2");//所有可审批图片的位于menuchild表中的版面
if(imgqx2.equals(""))
imgqx2="-1";
String headqx1 = (String)htbmqx.get("HEAD1");//所有可审批首页的位于menu表中的版面
if(headqx1.equals(""))
headqx1="-1";
String headqx2 = "";//(String)htbmqx.get("HEAD2");//所有可审批首页的位于menuchild表中的版面
if(headqx2.equals(""))
headqx2="-1";
String goodqx1 = (String)htbmqx.get("GOOD1");//所有可审批焦点的位于menu表中的版面
if(goodqx1.equals(""))
goodqx1="-1";
String goodqx2 ="";// (String)htbmqx.get("GOOD2");//所有可审批焦点的位于menuchild表中的版面
if(goodqx2.equals(""))
goodqx2="-1";
String admin_menus = menuBean.getAdminDown(currentBM);
String menus = menuBean.getDown(currentBM);
// Hashtable htorgqx = (Hashtable)myBean.getorgqx(uid);
// String orgqx = (String)htorgqx.get("GL");
/// if(orgqx.equals(""))
// orgqx="-1";
//查询语句
String sel = "";
if(strId.equals("1"))
{
sel = "where article.organid='00000000000000000000' order by article.organid,article.addtime desc";
}
if(select3.equals("1"))
{
sel = ds.toString((String)request.getParameter("txt_sel"));
}
String bm = (String)request.getParameter("bm");
if(bm==null) bm = "1";
if(bm.equals(""))bm = "1";
int cur = Integer.parseInt(bm);
Vector vect = (Vector)myBean.getOnePage(sel,cur,5);
int sum = Integer.parseInt((String)vect.get(0));
int i = 0;
int j = 0;
%>
<table width="95%" cellspacing="1" cellpadding="5" bgcolor=#999999 align=center>
<tr bgColor=#dbcfff >
<td colspan=20 align=right>
文章搜索: 
<select name="select1">
<option value="0" selected>模糊查询</option>
<option value="1">文章标题</option>
<%if(!strId.equals("1")){%><option value="2">录入员</option><%}%>
<option value="3">文章关键字</option>
</select>
 
<input type=text name=select2 size=20>
 
<input type=button value="搜索" onclick="selectart();" style="cursor:hand;background-color:#ffffff;">
</td>
</tr>
<tr bgColor=#ffffff >
<td colspan=20><center>
<b>文章列表</b></center></td>
</tr>
<tr bgcolor=#ffcc00 align=cente