📄 article.jsp
字号:
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=center >
<td width=20> </td>
<td ><b>编号</b></td>
<td ><b>文章标题</b></td>
<td ><b>录入</b></td>
<td ><b>发表时间</b></td>
<%if(strId.equals("1")||strId.equals("2")){%>
<td ><b>所属版面</b></td>
<%}%>
<td><b>焦点</b></td>
<td><b>首页</b></td>
<td><b>图片</b></td>
<td><b>审阅</b></td>
<td width=60><b>操作</b></td>
</tr>
<%
for(i=1;i<vect.size();i++)
{
Hashtable hash = (Hashtable)vect.get(i);
String[] str = new String[13];
str[0]=(String)hash.get("ID");
str[1]=(String)hash.get("TITLE");
str[2]=(String)hash.get("WRITER");
str[3]=(String)hash.get("ADDTIME");
str[4]=(String)hash.get("IFGOOD");
str[5]=(String)hash.get("IFHEAD");
str[6]=(String)hash.get("IFIMG");
str[7]=(String)hash.get("IFSHOW");
str[8]=(String)hash.get("ORGANID");
str[9]=(String)hash.get("MENUID");
//System.out.println("---"+str[8]);
str[11] = (String)hash.get("EDITER");
str[12] = (String)hash.get("EDITTIME");
if(str[4].equals("1"))
str[4] = "是";
else
str[4] = "否";
if(str[5].equals("1"))
str[5] = "是";
else
str[5] = "否";
if(str[6].equals("1"))
str[6] = "是";
else
str[6] = "否";
if(str[7].equals("1"))
str[7] = "是";
else
str[7] = "否";
menuBean.setID(Integer.parseInt(str[9]));
boolean isadmin = ((","+admin_menus+",").indexOf(","+str[9]+",")!=-1);
str[10] = menuBean.toname();
str[9] = myBean.toName("MENU","ID","MENU1",str[9]);
if(!str[11].equals(""))
str[11] ="审批人:"+ myBean.toName("ZZ_ZGB","ZGBH","XM",str[11])+" 审批时间:"+str[12];
%>
<TR bgColor=#ffffff height="22">
<td><%if(!(strType.equals("1")&&str[7].equals("是"))&&(isadmin)){j++;%><input type=checkbox name=checkboxid value="<%=str[0]%>"><%}%></td>
<TD align=center><%=i%></TD>
<TD align=left><a onclick="see('<%=str[0]%>')" style="cursor:hand" title="<%=str[11]%>"><font color=#CC0000><%=str[1]%></font></a></TD>
<TD align=center><%=(String)myBean.toName("zz_zgb","zgbh","xm",str[2])%></TD>
<TD align=center ><%=str[3]%></TD>
<%if(strId.equals("1")||strId.equals("2")){%>
<td align=center title="<%=str[10]%>"><%=str[9]%></td>
<%}%>
<TD align=center><%=str[4]%></TD>
<TD align=center><%=str[5]%></TD>
<TD align=center><%=str[6]%></TD>
<TD align=center><%=str[7]%></TD>
<TD align=center>
<FONT color="#99cc00">
<%if(strType.equals("1")){%>
<%if(str[7].equals("否")){%>
<a onclick="mod('<%=str[0]%>','1');" style="cursor:hand;">修改</a>
<%}else{%>
<a onclick="see('<%=str[0]%>');" style="cursor:hand;">浏览</a>
<%}%>
<%}%>
<%if(!(strType.equals("1")||strType.equals("6"))){%>
<a onclick="see('<%=str[0]%>');" style="cursor:hand;">浏览</a>
<%}%>
<%if(strType.equals("6")){%>
<a onclick="mod('<%=str[0]%>','6');" style="cursor:hand;">修改</a><!-- |
<a onclick="see('<%=str[0]%>');" style="cursor:hand;">浏览</a>-->
<a onclick="showart('<%=str[0]%>');" style="cursor:hand;">审批</a>
<%}%>
<%if(strId.equals("2")){%>
<a onclick="mod('<%=str[0]%>','6');" style="cursor:hand;">修改</a>
<%}%>
<%if(strType.equals("2")){
Vector v=myBean.getDataBySql("select * from news.commentb where articleid="+str[0]+" order by time desc");
%>
<a onclick="javascript:window.open('comment.jsp?id=<%=str[0]%>&title=<%=str[1]%>','评论管理','height=350,width=600,scrollbars=yes,resizable=yes,left=200,top=200');" style="cursor:hand;"><%if(v.size()>0) out.print("评论");%></a>
<%}%>
</FONT>
</TD>
</TR>
<%
}
%>
<input type=hidden name="txt_leixing">
<input type=hidden name="txt_value">
<input type=hidden name="txt_sel" value="<%=sel%>">
<%if(j>=1){%>
<tr>
<TD align=left colspan=20>
<%if(j>=2){%>
<input type=button value="全选" name=selall onclick="selectall();" style="cursor:hand;">   
<%}%>
<input type=button value="删除" onclick="return del();" style="cursor:hand;"></td>
</tr>
<%}%>
<TR>
<TD align=right bgColor=#dbcfff colspan=20>当前<%=cur%>/<%=sum%>页   <a onclick="gotopage('1')" style="cursor:hand;">第一页    </a>
<%if(cur>1){int t=cur-1;%><a onclick="gotopage('<%=t%>')" style="cursor:hand;">上一页    </a><%}%>
<%if(cur<sum){int s=cur+1;%><a onclick="gotopage('<%=s%>')" style="cursor:hand;">下一页   </a><%}%>
<a onclick="gotopage('<%=sum%>')" style="cursor:hand;">最后页    </a>
直接<input type=image src="../images/hand.gif" name="gotof" onclick="return checkdata();">
<input type=text size=2 name=bm class=formcolor>页</TD>
</TR>
</TABLE>
<script>
var czqx = "<%=czqx%>";
var uid = "<%=uid%>";
function selectall()
{
var num = document.all.checkboxid.length;
if(document.all.selall.value == "全选")
{
for(var i=0;i<num;i++)
{
document.all.checkboxid[i].checked = true;
}
document.all.selall.value = "取消全选";
}
else
{
for(var i=0;i<num;i++)
{
document.all.checkboxid[i].checked = false;
}
document.all.selall.value = "全选";
}
}
function gotopage(id)
{
document.all.txt_type.value = "<%=strType%>";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -