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

📄 index.jsp

📁 这是一个很好用的软件
💻 JSP
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<%@page import="oa.main.DealString"%>
<%@page import="oa.bean.*"%>
 <!-- %<@include file="../../inc.jsp"%>-->
<%
OrgMenuBean orgmenuBean = null;
ArticleBean myBean = null;
MenuBean menuBean = null;

try{
    DealString ds = new DealString();
	myBean = new  ArticleBean();
	orgmenuBean = new  OrgMenuBean();

	//取得菜单类别
	String strType = ds.toString((String)request.getParameter("txt_type"));
	if(strType.equals(""))strType = "1";
	String currentBM = null;//分版面管理
	//编号
	String strID = ds.toString((String)request.getParameter("txt_id"));
	String strbmbh = "";
	String strbmbh_t = "";
	String strwzlx = "";
	String strmenuID1 = "";
	String zgbh = "";
	String[] strbmno = null;
	String[] strBMMC = null;
	//增删改类型
	String strEdit = ds.toString((String)request.getParameter("txt_edit"));
	String childfile = "";
	String txt = "";
	String addr = "?txt_id="+strID+"&txt_type="+strType+"&txt_edit="+strEdit;

	if(strType.equals("1"))
	{
		childfile = "article.jsp"+addr+"&t=1";
		txt = "文章管理>>我发表的文章";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "article_edit.jsp"+addr;
		
	}
	else if(strType.equals("2"))
	{
		childfile = "article.jsp"+addr+"&t=2";
		txt = "文章管理>>所有文章";
	}
	else if(strType.equals("3"))
	{
		childfile = "article.jsp"+addr+"&t=3";
		txt = "文章管理>>所有焦点";
	}
	else if(strType.equals("4"))
	{
		childfile = "article.jsp"+addr+"&t=4";
		txt = "文章管理>>所有首页";
	}
	else if(strType.equals("5"))
	{
		childfile = "article.jsp"+addr+"&t=5";
		txt = "文章管理>>所有图片";
	}
	else if(strType.equals("6"))
	{
		childfile = "article.jsp"+addr+"&t=6";
		txt = "文章管理>>所有待审";
	}
	else if(strType.equals("99"))
	{
		childfile = "allarticle.jsp"+addr+"&t=1";
		txt = "所有文章";
		
	}
	else if(strType.equals("7"))
	{
		childfile = "pers.jsp"+addr;
		txt = "个人信息";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "pers_edit.jsp"+addr;
		if(strEdit.equals("3")||strEdit.equals("4"))childfile = "pers_pwd.jsp"+addr;
	}
	else if(strType.equals("8"))
	{
		childfile = "user.jsp"+addr;
		txt = "用户管理";
		if(strEdit.equals("1"))childfile = "user_edit.jsp"+addr;
		if(strEdit.equals("3")||strEdit.equals("4"))childfile = "user_right.jsp"+addr;
		if(strEdit.equals("2"))childfile = "user_edit.jsp"+addr;
	}
	else if(strType.equals("9"))
	{
		childfile = "comm.jsp"+addr;
		txt = "站务交流";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "comm_edit.jsp"+addr;
	}
	else if(strType.equals("10"))
	{
		strmenuID1 = ds.toString(request.getParameter("txt_menuID1"));
		childfile = "menu.jsp" + addr + "txt_menuID1=" + strmenuID1;
		txt = "版面管理";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "menu_edit.jsp"+addr;
	}
	else if(strType.equals("11"))
	{
		childfile = "fastadd.jsp"+addr;
		txt = "发表文章";

	}
	else if(strType.equals("12"))
	{
		childfile = "topic.jsp"+addr;
		txt = "专题列表";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "topic_edit.jsp"+addr;
	}
	else if(strType.equals("13"))
	{
		childfile = "piconf.jsp"+addr;
		txt = "系统设置>>图片设置";
	}
	else if(strType.equals("14"))
	{
		childfile = "hpconf.jsp"+addr;
		txt = "系统设置>>主页新闻设置";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "hpconf_edit.jsp"+addr;
		//if(strEdit.equals("1")||strEdit.equals("2"))childfile = "menu_edit.jsp"+addr;

	}
	else if(strType.equals("15"))
	{
		childfile = "cssconf.jsp"+addr;
		txt = "系统设置>>CSS设置";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "cssconf_edit.jsp"+addr;
	}
	else if(strType.equals("16"))
	{
		childfile = "ftpconf.jsp"+addr;
		txt = "系统设置>>FTP设置";
	}
	else if(strType.equals("17"))
	{
		childfile = "comconf.jsp"+addr;
		txt = "系统设置>>评论设置";
	}
	else if(strType.equals("18"))
	{
		childfile = "article_dep.jsp"+addr+"&t=1";
		txt = "信息维护>>我发表的文章";
		if(!strbmbh.equals(""))
			txt += "("+myBean.toName("ZZ_BMB","BMBH","BMMC",strbmbh)+")";
		
	}
	else if(strType.equals("19"))
    
	{
		childfile = "article_dep.jsp"+addr+"&t=2";
		txt = "信息维护>>所有文章";
		if(!strbmbh.equals(""))
			txt += "("+myBean.toName("ZZ_BMB","BMBH","BMMC",strbmbh)+")";
	}
	else if(strType.equals("20"))
	{
		childfile = "menulist.jsp"+addr;
		txt = "文章管理>>版面浏览";
	}
	else if(strType.equals("21"))
	{
		childfile = "link.jsp"+addr;
		txt = "系统设置>>主页链接设置";
		if(strEdit.equals("1")||strEdit.equals("2"))childfile = "link_edit.jsp"+addr;
	}

	String color[] = {"#006600","#006600","#006600","#006600","#006600","#006600"};
	if(Integer.parseInt(strType)<=6)
		color[Integer.parseInt(strType)-1] = "#CC0000";
	if(strType.equals("18")||strType.equals("19"))//  12-11
		color[Integer.parseInt(strType)-18] = "#CC0000";
	strbmbh_t = strbmbh ;
	if ( strbmbh_t.equals("") ) strbmbh_t = "-1" ;
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
  <HEAD>
    <TITLE>金瑞科技信息管理系统</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=GBK">
    <LINK href="../../css/main.css" rel=stylesheet>
	<link href="../../css/person.css" type=text/css rel=stylesheet>
    <META content="MSHTML 6.00.2800.1226" name=GENERATOR>
  </HEAD>
<form name=form1 action="index.jsp" method=post>
<iframe width="0" height="0" name="IFRAME0"  ></iframe>
<input type=hidden name="txt_type" value="<%=strType%>">
<input type=hidden name="txt_id" value="<%=strID%>">
<input type=hidden name="txt_edit" value="<%=strEdit%>">
<input type=hidden name="txt_uid" value="<%=zgbh%>">
<%if(strType.equals("18")||strType.equals("19")){%>
<input type=hidden name="bmbh" value="<%=strbmbh%>">
<input type=hidden name="wzlx" value="<%=strwzlx%>">
<%}if(strType.equals("10")||strType.equals("20")){%>
<input type=hidden name="txt_menuID1" value="<%=strmenuID1%>">
<%}%>

<%
	if(strType.equals("1")||strType.equals("2")||strType.equals("3")||strType.equals("4")||strType.equals("5")||strType.equals("6"))
	{
		  currentBM = ds.toString((String)request.getParameter("menuid"));
		if(currentBM.equals("")){
			childfile="";
			response.sendRedirect("index.jsp?txt_type=20");
		}
		else{
			menuBean = new oa.bean.MenuBean();
			menuBean.setID(Integer.parseInt(currentBM));			
			txt+="(<font color='#FF0000'>"+menuBean.toname()+"</font>)";
		}
	}
if(!strType.equals("18")&&!strType.equals("19")){%>
<table width="95%" border="0" cellspacing="3" cellpadding="3" align=center><tr><td height="20">当前位置:主页管理>><%=txt%></a></td></tr></table>
<br>
<%}
else{%>
<table width="95%" border="0" cellspacing="3" cellpadding="3" align=center><tr><td height="20">当前位置:<%=txt%></a></td></tr></table>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align=center><tr><td>
<%
if(!strbmbh.equals("")){
System.out.println("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
		for(int i=0;i<strbmno.length;i++){
			String uid = (String)session.getAttribute("zgbh");
			boolean right2 = true;
			if(!right2){
				if(strbmbh.equals(strbmno[i])&&i+1<strbmno.length)
					strbmbh = strbmno[i+1];
				continue;
			}
			strBMMC[i] = myBean.toName("ZZ_BMB","BMBH","BMMC",strbmno[i]);
%>		<%if(strbmno.length!=1){%><input type=radio onclick="changeBM('<%=strbmno[i]%>')"<%if(strbmbh.equals(strbmno[i])){out.print("checked");}%>><a style="cursor:hand" onclick="changeBM('<%=strbmno[i]%>')"><%}%><font color=<%if(strbmbh.equals(strbmno[i])){%>#CC0000<%}else{%>#006600<%}%>><%=strBMMC[i]%></font></a>
		<%}
%>
	</td>
	<td align=right>选择类别:</td>
	<td align=right width=5>
	<select name="selwzlx" onchange="changewzlx(selwzlx)"><option id="0">所有类别</option>
<%
	Vector vect=orgmenuBean.getData(strbmbh);
	int n=vect.size();
	for(int i=0;i<n;i++){
		if(i%2==0){
			Hashtable hash = (Hashtable)vect.get(i);
			String mc = (String)hash.get("MC");
			int bh = Integer.parseInt((String)hash.get("BH"));
			out.print("<option id="+bh);
			if(strwzlx.equals(""+bh))
				out.print("  selected");
			out.print(">"+mc+"</option>");
		}
		else{
			Vector v = (Vector)vect.get(i);
			int n1 = v.size();
			for(int j=0;j<n1;j++){
				Hashtable hash = (Hashtable)v.get(j);
				String mc = (String)hash.get("MC");
				int bh = Integer.parseInt((String)hash.get("BH"));
				out.print("<option id="+bh);
				if(strwzlx.equals(""+bh))
					out.print("  selected");
				out.print(">&nbsp;&nbsp;&nbsp;&nbsp;"+mc+"</option>");
			}
		}
	}%>
	</select></td></tr></table>
	<%}
}
if(strType.equals("1")||strType.equals("2")||strType.equals("3")||strType.equals("4")||strType.equals("5")||strType.equals("6"))
{
%>
 <input type=hidden value="<%=currentBM%>" name="menuid">
<table width="95%" cellspacing="0" cellpadding="0" align=center>
<tr>
<td align=center>
	<A onclick="changepage('1','1');" style="cursor:hand;"><font color="<%=color[0]%>">【我发表的文章】</font></a>
	<a onclick="changepage('2','1');" style="cursor:hand;"><font color="<%=color[1]%>">【所有文章】</font></a>
	<a onclick="changepage('3','1');" style="cursor:hand;"><font color="<%=color[2]%>">【所有焦点】</font></a>
	<a onclick="changepage('4','1');" style="cursor:hand;"><font color="<%=color[3]%>">【所有首页】</font></a>
	<a onclick="changepage('5','1');" style="cursor:hand;"><font color="<%=color[4]%>">【所有图片】</font></a> 
	<a onclick="changepage('6','1');" style="cursor:hand;"><font color="<%=color[5]%>">【所有待审】</font></a><br>
</td></tr></table>
<%}%>
<%if(strType.equals("18")||strType.equals("19")){%>
<hr>
<table width="95%" cellspacing="0" cellpadding="0" align=center>
<tr>
<td align=left>
	<A onclick="changepage('18','1');" style="cursor:hand;"><font color="<%=color[0]%>">【我发表的文章】</font></a>
<%
	String uid = (String)session.getAttribute("zgbh");
	boolean right1 = true;
	if(right1){
%>
	<a onclick="changepage('19','1');" style="cursor:hand;"><font color="<%=color[1]%>">【所有文章】</font></a><%}%><br>
</td></tr></table>
<%}%>
<%if(strType.equals("13")||strType.equals("14")||strType.equals("15")||strType.equals("16")||strType.equals("17")||strType.equals("21")){%><table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
 <tr bgcolor=#eeeeee>
  <td colspan=2 align=right> <a onclick="changepage('13');" style="cursor:hand;">图片设置</a> | <a onclick="changepage('14');" style="cursor:hand;">主页新闻设置</a> | <a onclick="changepage('21');" style="cursor:hand;">主页链接设置</a> | <a onclick="changepage('15');" style="cursor:hand;">CSS代码设置</a> | <a onclick="changepage('17');" style="cursor:hand;">评论设置</a>
  </td>
 </tr>
</table>
<%}%>
<jsp:include page="<%=childfile%>"/>
<br>
<HR width="90%" size=1>

<CENTER><FONT size=2>Copyright &copy;2006 All rights reserved. 金瑞科技企业信息管理系统
</FONT></CENTER></DIV>
<script>
	function changepage(type,right)
	{
		if(right=="")
		{
			alert("您没有该模块的操作权限!");
		}
		else
		{
			document.all.txt_type.value = type;
			document.all.txt_id.value = "";
			document.all.txt_edit.value = "";
			document.all.form1.action = "index.jsp";
			document.all.form1.submit();
		}
	}
<%if(strType.equals("18")||strType.equals("19")){%>
	function changewzlx(selwzlx){
		document.all.txt_type.value = <%=strType%>;
		document.all.txt_id.value = "";
		document.all.txt_edit.value = "";
		document.all.bmbh.value = "<%=strbmbh%>";
		document.all.wzlx.value = selwzlx.options[selwzlx.selectedIndex].id;
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}
<%}%>
</script>





</form>
</BODY></HTML>
<%}

catch (Exception e){ e.printStackTrace();}
finally{
	if(myBean!=null)		myBean.closeConn();
	if(orgmenuBean!=null)	orgmenuBean.closeConn();
	if(menuBean!=null)		menuBean.closeConn();
}%>

⌨️ 快捷键说明

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