⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 child.jsp

📁 在系统开发过程中用到了javabean和jsp技术
💻 JSP
📖 第 1 页 / 共 3 页
字号:
		</TD>
<%
}//(0)end-----------------------------------------------------------------------
else if(strmenuid.equals("20")||strmenuid.equals("21")||strmenuid.equals("22"))//滚动消息//焦点导读//栏目精选
{//(1)gegin-----------------------------------------------------------------------
	%>
		<TD 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%">
						&nbsp;&nbsp;当前位置:<a class="MOUT" onclick="changemenu1('<%=strId1%>');" style="cursor:hand;"><%=strMenuName%></a> >> 
						<%
						if(strmenuid.equals("20"))//滚动消息
						{
							out.println("滚动消息");
						}
						else if(strmenuid.equals("21"))//焦点导读
						{
							out.println("焦点导读");
						}
						else if(strmenuid.equals("22"))//栏目精选
						{
							out.println("栏目精选");
						}
						%>
					  </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">
											<%
											if(strmenuid.equals("20"))//滚动消息
											{
												out.println("滚动消息");
											}
											else if(strmenuid.equals("21"))//焦点导读
											{
												out.println("焦点导读");
											}
											else if(strmenuid.equals("22"))//栏目精选
											{
												out.println("栏目精选");
											}
											%>
											</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 ka=st;ka<ja;ka++){
								String img = "index_right2_line04.gif";
								String w = "284";
								if(ka!=(ja-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="view('<%=straId[ka]%>');" target=_blank title="<%=straHits[ka]%>" style="cursor:hand;" ><%int len = ds.byteLength(stra[ka]);int len2 = wlen2;if(len<wlen2)len2 = len;String t1 = ds.strByteCopy(stra[ka],len2);%><%=t1.replaceAll(" ","&nbsp;")%><%if(len>wlen2)out.print("...");%>&nbsp;<%if(strshowconf.equals("1")){%><font color=<%=color_time%>>(<%=stratime[ka]%>)</font><%}%></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
							%>
							<%if(sum==0)
							{
							%>
							<tr align=center><td><font color=red><br>目前没有文章!!!<br><br></font></td></tr>
							<TR><TD vAlign=top align=left><IMG height=1 src="../images/index_right2_line04.gif" width=284></TD></TR>
							<%}%>
							<%if(sum>0){%>
							<tr height=18 valign=bottom>
								<TD align=right><br>
										每页记录数:<%=i_len3%>&nbsp;&nbsp;&nbsp;&nbsp;共有记录数:<font color=red><%=tnum%></font>&nbsp;&nbsp;&nbsp;&nbsp;
									<%if(vetarc.size()>1){%>
										当前<font color=red><%=cur%></font>/<%=sum%>页&nbsp&nbsp&nbsp<%if(cur!=1){%><a onclick="firsrpg()" style="cursor:hand">第一页&nbsp&nbsp&nbsp </a> <%}%>
										<%if(cur>1){ t=cur-1;%>
										<a onclick="lastpg()" style="cursor:hand">上一页&nbsp&nbsp&nbsp </a><%}%>
										<%if(cur<sum){ s=cur+1;%>
										<a onclick="nextpg()" style="cursor:hand">下一页&nbsp&nbsp&nbsp</a><%}%>&nbsp&nbsp
										<%if(cur<sum){%>
										<a onclick="finalpg()" style="cursor:hand">最后页&nbsp&nbsp&nbsp </a>
										<%}%>
										</TD>
									<%}%>
								</tr>	
							<%}%>

							
							</TBODY>
							</TABLE>
						</TD></TR>




					</TBODY>
					</TABLE>
				</TD>
				</TR>
			</TBODY></TABLE>
		</TD>
<%
}//(1)end-----------------------------------------------------------------------
else
{
	if(strtopicid.equals("0"))
	{
		if(strmenuid.equals("0"))//(2)gegin-----------------------------------------------------------------------
		{

			//生成菜单的树形结构
			int sub = 2;
			int psub = 2;
			String outPrint = "";
			String strID = "";
			String menu = "";
			Vector myTree = myBean.buildTree();
			DefaultMutableTreeNode root, currentNode, lastNode;

			for(int j=0;j<myTree.size();j++)
			{
				root = (DefaultMutableTreeNode)myTree.get(j);
				outPrint = (String) ((Hashtable) root.getUserObject()).get("MENU2");
				strID = (String) ((Hashtable) root.getUserObject()).get("ID");
			%>
		<TD 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>&nbsp;&nbsp;当前位置:<a class="MOUT" onclick="changemenu1('<%=strId1%>');" style="cursor:hand;"><%=strMenuName%></a> >> <%=outPrint%></td><TR>
					<TR><TD vAlign=top align=left background="../images/index_right2_bg02.gif">
					<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0 height="100%">
					<TBODY>					
					<!------------------------------------------------------------------------------->
					<%
						if (root.getChildCount()!=0)
						{
							currentNode = (DefaultMutableTreeNode) root.getFirstChild();
							psub=3;
							sub++;
							while ((currentNode != null) && (currentNode != root))
							{
								if(sub==3) 
									menu="MENU3";
								if(sub>3)  
									menu="MENUCHILD";
								
								outPrint = (String) ((Hashtable) currentNode.getUserObject()).get(menu);
								strID = (String) ((Hashtable) currentNode.getUserObject()).get("ID");
					%>
				



						<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%"><STRONG><font color="#1258af"><%=outPrint%></font></STRONG></TD>
								<TD align=right><IMG style="cursor:hand;" height=14 src="../images/index_right2_more.gif" width=34 onclick="viewarticle('<%=strID%>','<%=sub%>');" title="查看此菜单下的所有文章"></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>
							<!-------------------------------------显示二级菜单文章信息----------------------------------->
							<%
								//取得某一以菜单下的所有文章
								String whichtable="0";
								if(sub<4) whichtable="1";
								else whichtable="0";
								Vector vetarc2 = (Vector)myBean.getArc(strID,whichtable);
								int ja2=vetarc2.size();
								String stra2Id [] = new String[ja2];
								String stra2[] = new String[ja2];//文章标题
								String stra2time[] = new String[ja2];//发表时间
								String stra2Hits[] = new String[ja2];//取得数标题是信息


								for(int ia=0;ia<vetarc2.size();ia++)
								{  
									Hashtable hash = (Hashtable)vetarc2.get(ia);
									stra2Id[ia] = (String)hash.get("ID");
									stra2[ia] = (String)hash.get("TITLE");
									stra2time[ia] = ((String)hash.get("ADDTIME")).substring(0,10);
									stra2Hits[ia] = (String)hash.get("HITS");
								}
							%>

							<%for(int kls=0;kls<ja2;kls++){
								
								if(kls==i_len2)break;
								String img = "index_right2_line04.gif";
								String w = "284";
								if(kls!=(ja2-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="view('<%=stra2Id[kls]%>');" target=_blank style="cursor:hand;"  title=<%=stra2Hits[kls]%>><%int len = ds.byteLength(stra2[kls]);int len2 = wlen2;if(len<wlen2)len2 = len;String t1 = ds.strByteCopy(stra2[kls],len2);%><%=t1.replaceAll(" ","&nbsp;")%><%if(len>wlen2)out.print("...");%>
								<%if(strshowconf.equals("1")){%><font color=<%=color_time%>>(<%=stra2time[kls]%>)</font><%}%></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
							%>

							
							</TBODY>
							</TABLE>
						</TD></TR>
						<%
								if ((currentNode.getChildCount()) == 0) 
							{
								if ((currentNode.getNextSibling() == null)) 
								{
									//当前节点即没有子节点又没有兄弟节点,则返回父节点
									currentNode =(DefaultMutableTreeNode) currentNode.getParent();
									psub=sub;//测试的时候用
									sub--;
									if (currentNode == null)
									{
										continue;
									}

								}
							} 
							else
							{
								//当前节点有子节点
								currentNode =(DefaultMutableTreeNode) currentNode.getFirstChild();
								psub=sub;//测试的时候用
								sub++;
								continue;
							}
							lastNode = currentNode.getNextSibling();
							if (lastNode != null) 
							{
								currentNode = lastNode;
							}
							else 
							{
								while ((currentNode.getNextSibling() == null)&&(currentNode!=root))
								{
									currentNode =(DefaultMutableTreeNode) currentNode.getParent();
									psub=sub;//测试的时候用
									sub--;
								}
								currentNode = currentNode.getNextSibling();
							}
						}//while
					}//if
					%>



					</TBODY>
					</TABLE>
				</TD>
				</TR>
			</TBODY></TABLE></TBODY></TABLE>
		</TD>
		<%								
							
			}//for
		}//if//(2)end-----------------------------------------------------------------------多个菜单
		else//(3)gegin-----------------------------------------------------------------------一个菜单
		{
%>
			<TD 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 height="5" valign=top><td height="5" align=left style="LINE-HEIGHT: 150%">&nbsp;&nbsp;当前位置:<a class="MOUT" onclick="changemenu1('<%=strId1%>');" style="cursor:hand;LINE-HEIGHT: 150%"><%=strMenuName%></a> >> <a class="MOUT" onclick="changemenu2('<%=strId2%>');" style="cursor:hand;LINE-HEIGHT: 150%"><%=strMenuName2%></a> >> <%=myBean.getMenuName(strmenuid,wtb)%></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%"><STRONG><font color="#1258af"><%=myBean.getMenuName(strmenuid,wtb)%></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 ka=1;ka<ja;ka++){
								String img = "index_right2_line04.gif";
								String w = "284";
								if(ka!=(ja-1))
								{
									img = "index_right2_line03.gif";
									w = "253";
								}
							%>
							<TR><TD vAlign=top align=left>
								<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
								<TBODY>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -