📄 child.jsp
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString,javax.swing.tree.DefaultMutableTreeNode,java.util.Hashtable"%>
<%
oa.bean.MainBean myBean = null;
try{
myBean = new oa.bean.MainBean();
DealString ds = new DealString();
//取得菜单类别
String strId1 = ds.toString((String)request.getParameter("txt_type1"));
String strId2 = ds.toString((String)request.getParameter("txt_type2"));
if(strId1.equals(""))strId1 = "1";
if(strId2.equals(""))strId2 = "0";
int intId1 = Integer.parseInt(strId1);
String strMenuName = myBean.toMenu1(strId1);
String strMenuName2 = myBean.toMenu2(strId1,strId2);
String strFileId = ds.toString((String)request.getParameter("txt_fileid"));
if(strFileId.equals(""))strFileId = "0";
String strSub = ds.toString((String)request.getParameter("txt_sub"));
if(strSub.equals("")) strSub="0";
String wtb = "";
if(Integer.parseInt(strSub)>3) wtb = "0";
else wtb = "1";
String strEdit = ds.toString((String)request.getParameter("txt_edit"));
if(strEdit.equals("")) strEdit = "0";
String strmenuid = ds.toString((String)request.getParameter("txt_menuid"));
if(strmenuid.equals("")) strmenuid = "0";
String strtopicid = ds.toString((String)request.getParameter("txt_topicid"));
if(strtopicid.equals("")) strtopicid = "0";
String strsearch = ds.toString((String)request.getParameter("txt_search"));
if(strsearch.equals("")) strsearch="0";
myBean.setId1(strId1);
myBean.setId2(strId2);
//二级三级版面显示条数
String t_len2 = myBean.toName("NB_ZYSZB","ID","NUM","18");
int i_len2 = Integer.parseInt(t_len2);
String t_len3 = myBean.toName("NB_ZYSZB","ID","NUM","19");
int i_len3 = Integer.parseInt(t_len3);
//取得CSS
String css = (String)session.getAttribute("CSS");
//取得专题信息
Vector vettopic = (Vector)myBean.getTopic(strMenuName);
int jp=vettopic.size();
String strpId[] = new String[jp];//专题编号
String strp[] = new String[jp];//存放文章标题
String strpintroduce[] = new String[jp];//专题介绍
String strpAddtime[] = new String[jp];//专题介绍
for(int ip=0;ip<vettopic.size();ip++)
{
Hashtable hash = (Hashtable)vettopic.get(ip);
strpId[ip] = ds.toString((String)hash.get("ID"));
strp[ip] = ds.toString((String)hash.get("NAME"));
strpintroduce[ip] = ds.toString((String)hash.get("INTRODUCE"));
strpAddtime[ip] = ds.toString((String)hash.get("ADDTIME"));
}
//取得栏目精选
Vector vetgood = (Vector)myBean.getGood(strId1,"22");
int jg=vetgood.size();
String strgId [] = new String[jg];
String strgtitle[] = new String[jg];//存放文章标题
String strgtime[] = new String[jg];//发表时间
String strgHits[] = new String[jg];//取得数标题是信息
for(int ig=0;ig<vetgood.size();ig++)
{
Hashtable hash = (Hashtable)vetgood.get(ig);
strgId[ig] = ds.toString((String)hash.get("id"));
strgtitle[ig] = ds.toString((String)hash.get("title"));
strgtime[ig] = ds.toString(((String)hash.get("addtime"))).substring(0,10);
strgHits[ig] = ds.toString((String)hash.get("hits"));
}
//取得某一以菜单下的所有文章
String bm = (String)request.getParameter("bm");
if(bm==null || bm.equals("")) bm = "1";
int cur = Integer.parseInt(bm);
int t=-1;
int s=-1;
Vector vetarc = new Vector();
int st = 2;
if(strmenuid.equals("20"))//滚动消息
{
vetarc = (Vector)myBean.getArticle(strId1,"公告通知",cur,i_len3);
}
else if(strmenuid.equals("21"))//焦点导读
{
vetarc = (Vector)myBean.getGood(strId1,"21",cur,i_len3);
}
else if(strmenuid.equals("22"))//栏目精选
{
vetarc = (Vector)myBean.getGood(strId1,"22",cur,i_len3);
}
else
{
vetarc = (Vector)myBean.getArc(strmenuid,wtb,cur,i_len3);
st = 1;
}
Vector vettotarc = (Vector)myBean.getArc(strmenuid,wtb);
int sum = Integer.parseInt((String)vetarc.get(0));
int tnum = 0;
if(st==2)tnum = Integer.parseInt((String)vetarc.get(1));
else tnum = vettotarc.size();
int ja=vetarc.size();
String straId [] = new String[ja];
String stra[] = new String[ja];//文章标题
String stratime[] = new String[ja];//发表时间
String straHits[] = new String[ja];//取得数标题是信息
for(int ia=st;ia<vetarc.size();ia++)
{
Hashtable hash = (Hashtable)vetarc.get(ia);
straId[ia] = ds.toString((String)hash.get("ID"));
stra[ia] = ds.toString((String)hash.get("TITLE"));
stratime[ia] = ds.toString(((String)hash.get("ADDTIME"))).substring(0,10);
straHits[ia] = ds.toString((String)hash.get("HITS"));
}
//取得某一专题下所有文章
int jop = 0;
Vector vetotopic = (Vector)myBean.getOneTopic(strtopicid,cur,i_len3);
int sum5 = 0;
int tnum5 = 0;
jop=vetotopic.size();
if(jop>=2)
{
sum5 = Integer.parseInt((String)vetotopic.get(0));
tnum5 = Integer.parseInt((String)vetotopic.get(1));
}
String stropId [] = new String[jop];
String stroptitle[] = new String[jop];//文章标题
String stroptime[] = new String[jop];//发表时间
String stropHits[] = new String[jop];//取得数标题是信息
for(int iop=2;iop<vetotopic.size();iop++)
{
Hashtable hash = (Hashtable)vetotopic.get(iop);
stropId[iop] = ds.toString((String)hash.get("ID"));
stroptitle[iop] = ds.toString((String)hash.get("TITLE"));
stroptime[iop] = ds.toString(((String)hash.get("ADDTIME"))).substring(0,10);
stropHits[iop] = ds.toString((String)hash.get("HITS"));
}
// 取得当前所显示的版面的设置
Hashtable hashconf = (Hashtable)myBean.getOneMenuConf(strId1);
int intnumconf = 0;
String strnumconf = "0";
String strshowconf = "0";
strnumconf = ds.toString((String)hashconf.get("NUM"));
strshowconf = ds.toString((String)hashconf.get("ISSHOWTIME"));//1是显示 0是不显示
intnumconf = Integer.parseInt(strnumconf);
int wlen=21;
int wlen2 = 72 ;
String color_time = "#616161";
String showtime21 = myBean.toName("NB_ZYSZB","ID","ISSHOWTIME","21");
String showtime22 = myBean.toName("NB_ZYSZB","ID","ISSHOWTIME","22");
String showtime23 = myBean.toName("NB_ZYSZB","ID","ISSHOWTIME","23");
%>
<LINK href="../css/child.css" type=text/css rel=stylesheet>
<link href="../images/css.css" rel=stylesheet type="text/css">
<div align="center">
<table border="0" cellPadding="0" cellSpacing="0" width="790" background="../images/bg01.gif">
<tbody>
<tr vAlign=top>
<TD align=center valign=top>
<table border="0" cellPadding="0" cellSpacing="0" width="779">
<tbody>
<tr vAlign=top>
<TD align=right width=180>
<TABLE cellSpacing=0 cellPadding=0 width=173 border=0>
<TBODY>
<TR>
<TD align=center bgColor=#f7fbff>
<TABLE cellSpacing=0 cellPadding=0 width=172 border=0>
<TBODY>
<TR><TD vAlign=top align=right><IMG height=26 src="../images/search.gif" width=172></TD></TR>
<TR><TD vAlign=top align=middle>
<TABLE width=123 border=0>
<TBODY>
<TR><TD align=middle><INPUT class=inputter size=16 value="关键字:" name="keyword" onkeydown="if(window.event.keyCode==13)search(form1);"></TD></TR>
<TR><TD align=middle>
<select style="WIDTH: 123px" name=select2>
<option value="1" selected>标题</option>
<option value="2">关键字</option>
</select>
</TD></TR>
<TR><TD align=middle>
<SELECT style="WIDTH: 123px" name="s2">
<option value="all" selected>所有时间</option>
<option value="1">昨天以来</option>
<option value="3">3 天以来</option>
<option value="7">7 天以来</option>
<option value="15">15天以来</option>
<option value="30">30天以来</option>
<option value="60">60天以来</option>
<option value="90">90天以来</option>
</SELECT>
</TD></TR>
<TR><TD align=right height=25><IMG style="cursor:hand;" height=17 src="../images/index_top_search.gif" width=49 onclick="search(form1)"></TD></TR>
</TBODY>
</TABLE>
</TD></TR>
<TR><TD vAlign=top align=left><IMG height=26 src="../images/index_right1_news01.gif" width=172></TD></TR>
<TR><TD class=left2 vAlign=top align=left bgColor=#f7fbff>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<%
String t_len = myBean.toName("NB_ZYSZB","ID","NUM","23");
int i_len = Integer.parseInt(t_len);
if(i_len>jp)i_len = jp;
for(int kp=0;kp<i_len;kp++){%>
<TR><TD width=25 height=25><IMG height=18 src="../images/index_right1_newsarrow.gif" width=18></TD>
<TD height=25><a onclick="viewtopic('<%=strpId[kp]%>');" style="cursor:hand;LINE-HEIGHT: 150%" target=_blank title=<%=strpintroduce[kp]%>><%=strp[kp]%></a><%if(showtime23.equals("1")){%><font color=<%=color_time%>>(<%=strpAddtime[kp].substring(5,10)%>)</font><%}%></TD>
</TR>
<%}%>
<TR><TD width=25 height=25><IMG height=18 src="../images/index_right1_newsarrow.gif" width=18></TD>
<TD height=25><a onclick="viewarticle('23','');" style="cursor:hand;LINE-HEIGHT: 150%" title="查看全部专题">[更多...]</a></TD>
</TR>
</TBODY>
</TABLE>
</TD></TR>
<TR><TD vAlign=top align=left><IMG height=6 src="../images/index_right1_newsdown.gif" width=172></TD></TR>
</TBODY></TABLE>
</TD></TR>
<TR><TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width=172 border=0>
<TBODY>
<TR><TD vAlign=top align=left><IMG height=26 src="../images/second_jingxuan01.gif" width=172></TD></TR>
<TR><TD class=left2 vAlign=top align=left bgColor=#f7fbff>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<%for(int kg=0;kg<jg;kg++){%>
<TR><TD width=18 height=25 align=left valign=top><li></li></TD>
<TD height=25 width="100%" align=left valign=top><a onclick="view('<%=strgId[kg]%>');" style="cursor:hand;LINE-HEIGHT: 140%" target=_blank title=<%=strgHits[kg]%>><%=strgtitle[kg]%><%if(showtime22.equals("1")){%><font color=<%=color_time%>>(<%=strgtime[kg]%>)</font><%}%></a><%}%>
</TD></TR>
<TR><TD height=25> </TD>
<TD height=25 align=right><a onclick="viewarticle('22','');" style="cursor:hand;LINE-HEIGHT: 140%" target=_blank>[更多...]</a> </TD></TR>
</TBODY>
</TABLE>
</TD></TR>
</TBODY></TABLE>
</TD></TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=173 border=0 height="100%">
<TBODY>
<TR>
<TD align=center bgColor=#f7fbff>
</td>
</tr>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=172 border=0>
<TBODY>
<TR><TD vAlign=top align=left><IMG height=6 src="../images/index_right1_newsdown.gif"width=172></TD></TR>
</TBODY>
</TABLE>
</TD>
<%//(0)gegin-----------------------------------------------------------------------
if(strmenuid.equals("23"))//热门专题
{
%>
<TD valign=top align=left background="../images/index_right2_bg02.gif">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR><TD vAlign=top align=left><IMG height=9 src="../images/index_right2_top.gif"></TD></TR>
<tr>
<td align=left style="LINE-HEIGHT: 150%">
当前位置:<a class="MOUT" onclick="changemenu1('<%=strId1%>');" style="cursor:hand;"><%=strMenuName%></a> >>
热门专题
</td>
</tr>
<TR><TD vAlign=top align=left background="../images/index_right2_bg02.gif">
<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR><TD vAlign=top align=left>
<TABLE height=20 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle width=30><IMG height=10 src="../images/index_right2_arrow.gif" width=10></TD>
<TD style="LINE-HEIGHT: 150%" align=left><STRONG><font color="#1258af">
热门专题
</font></STRONG></TD>
<TD align=right></TD></TR>
</TBODY></TABLE>
</TD></TR>
<TR><TD vAlign=top align=left background="../images/index_right2_line02bg.gif"><IMG height=3 src="../images/index_right2_line02.gif" width=288></TD></TR>
<%
for(int kp=1;kp<jp;kp++){
String img = "index_right2_line04.gif";
String w = "284";
if(kp!=(jp-1))
{
img = "index_right2_line03.gif";
w = "253";
}
%>
<TR><TD vAlign=top align=left>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle width=30 height=25><IMG height=10 src="../images/index_right2_arrow02.gif" width=10></TD>
<TD><a onclick="viewtopic('<%=strpId[kp]%>');" target=_blank style="cursor:hand;" title=<%=strpintroduce[kp]%>><%int len = ds.byteLength(strp[kp]);int len2 = wlen2;if(len<wlen2)len2 = len;String t1 = ds.strByteCopy(strp[kp],len2);%><%=t1.replaceAll(" "," ")%><%if(len>wlen2)out.print("...");%></a></TD></TR>
</TBODY></TABLE>
</TD></TR>
<TR><TD vAlign=top align=left><IMG height=1 src="../images/<%=img%>" width="<%=w%>"></TD></TR>
</TBODY></TABLE>
</TD></TR>
<%
}//for_end
%>
</TBODY>
</TABLE>
</TD></TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY></TABLE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -