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

📄 editmenu.jsp

📁 就业管理系统 源代码 可以运行 没有错误
💻 JSP
字号:
<%@ page language="java" import="java.util.*"  contentType="text/html;charset=gb2312"%>
<jsp:useBean id="sn" scope="page" class="com.bean.SystemBean" />
<jsp:useBean id="us" scope="page" class="com.bean.SiteBean" />
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String dir=sn.getDir();
%>
<HTML><HEAD><TITLE>后台操作区</TITLE>
<LINK href="<%=basePath %><%=dir %>/images/Admin_Style.css" type=text/css rel=stylesheet>
<LINK href="<%=basePath %><%=dir %>/images/style.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript src="<%=basePath %><%=dir %>/images/Common.js"></SCRIPT>
<STYLE type=text/css>
BODY {
	MARGIN-LEFT: 0px; BACKGROUND-COLOR: #ffffff
}
.STYLE1 {color: #ECE9D8}
</STYLE>
</HEAD>
<SCRIPT>
function foreColor_font(obj)
{
  var arr = showModalDialog('<%=basePath %><%=dir %>/images/selcolor.htm', '', 'dialogWidth:18.5em; dialogHeight:17.5em; status:0');
  if (arr != null) { obj.value=arr;obj.style.color=arr;}
  else  obj.focus();
  
}
</SCRIPT>
<%
String message = (String)request.getAttribute("message");
	if(message == null){
		message = "";
	}
	if (!message.trim().equals("")){
		out.println("<script language='javascript'>");
		out.println("alert('"+message+"');");
		out.println("</script>");
	}
	request.removeAttribute("message");
%>
<%
	String username=(String)session.getAttribute("user");
	if(username==null){
		response.sendRedirect(path+"/error.jsp");
	}
	else{
		List list=(List)session.getAttribute("list");
		List menuList=us.getAllmenu();
		String method=request.getParameter("method");
		String menuname="";
		String linkurl="";
		String wordcolor="";
		String targettype="";
		String hide="";
		String ordernum="";
		String id=request.getParameter("id");
		String id2=(String)request.getAttribute("id");
		String method2=(String)request.getAttribute("method");
		if(id2!=null){id=id2;method=method2;}
		if(id!=null){
			List editList=us.get1menu(Integer.parseInt(id));
			menuname=editList.get(1).toString();
			linkurl=editList.get(3).toString();
			wordcolor=editList.get(4).toString();
			targettype=editList.get(5).toString();
			hide=editList.get(6).toString();
			ordernum=editList.get(7).toString();
		}
		else{
			if((String)request.getAttribute("menuname")!=null){
		 	menuname=(String)request.getAttribute("menuname");
			}
			if((String)request.getAttribute("linkurl")!=null){
			 	linkurl=(String)request.getAttribute("linkurl");
			}
			if((String)request.getAttribute("wordcolor")!=null){
			 	wordcolor=(String)request.getAttribute("wordcolor");
			}
			if((String)request.getAttribute("targettype")!=null){
			 	targettype=(String)request.getAttribute("targettype");
			}
			if((String)request.getAttribute("hide")!=null){
			 	hide=(String)request.getAttribute("hide");
			}
			if((String)request.getAttribute("ordernum")!=null){
			 	ordernum=(String)request.getAttribute("ordernum");
			}
			if(method==null){
				method=(String)request.getAttribute("method");
			}
		}
		String picoff=us.getMenuPicOff();
%>
<BODY oncontextmenu="return false;" onselectstart="return false;" leftMargin=0 
background=<%=basePath %><%=dir %>/images/MainBg.gif topMargin=0 scroll=no 
marginheight="0" marginwidth="0">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD align="left" vAlign=top >
	<table width="100%" border="0" class="tablewidth" cellspacing="1" cellpadding="3" >
<tr> 
      <td class="head" bgcolor="#EAEAEA">&nbsp;</td>
    </tr>
  <tr> 
    <td bgcolor="#FFFFFF">[<a href="<%=basePath%><%=dir %>/site/index.jsp">菜单管理</a>] 
    [<a href="<%=basePath%><%=dir %>/site/editmenu.jsp?method=addmenu">新添加一个链接</a>] 
    <%if(picoff.trim().equals("open")){ %>[<a href="<%=basePath%>Common.shtml?method=picoff&id=0" >禁用菜单装饰图片片</a>]<%}else{ %>[<a href="<%=basePath%>Common.shtml?method=picoff&id=1" >启用菜单装饰图片</a>]<%} %>
    </td>
  </tr>
</table>
<form name="form1" method="post" action="<%=basePath %>Menu.shtml" enctype="multipart/form-data" >
<table width=100% cellspacing=1 cellpadding=3  class="tablewidth">
    <tr> <input type="hidden" name="method" value="<%=method %>"><input type="hidden" name="id" value="<%=id %>">
      <td class="head" bgcolor="#EAEAEA" colspan="2"><font color="#FFFFFF">菜单管理</font></td>
    </tr>
    
    <tr> 
      <td bgcolor=#FFFFFF align="right" width="32%">菜单名称 </td>
      <td bgcolor=#FFFFFF align="left" width="68%">
        <input name="menuname" type="text" value="<%=menuname %>" size="20" maxlength="12">
      </td>
      <tr> 
      <td bgcolor=#FFFFFF align="right" width="32%">菜单图片 </td>
      <td bgcolor=#FFFFFF align="left" width="68%">
        <input name="pic" type="file"  contentEditable=false >
        &nbsp;为保证页面美观,请上传16*16或32*32的导航图片,如不想使用或不做修改请保持为空
      </td>
    </tr>
    <tr> 
      <td bgcolor=#FFFFFF align="right" width="32%">链接地址</td>
      <td bgcolor=#FFFFFF align="left" width="68%"> 
        <input name="linkurl" type="text" value="<%=linkurl %>" size="50" maxlength="200">
      </td>
    </tr>
    <tr> 
      <td bgcolor=#FFFFFF align="right" width="32%">字体颜色</td>
      <td bgcolor=#FFFFFF align="left" width="68%"> 
        <input name="wordcolor" type="text" value="<%=wordcolor %>"  style="color:<%=wordcolor %>;"  onClick="foreColor_font(this);" size="20" maxlength="16">
      </td>
    </tr>
    <tr> 
      <td bgcolor=#FFFFFF align="right" width="32%">打开方式</td>
      <td bgcolor=#FFFFFF align="left" width="68%"> 
      <%
      	if(targettype.trim().equals("_blank")){
      %>
        <input type="radio" name="targettype" value="_parent" >
        本窗口打开 
        <input type="radio" name="targettype" value="_blank" checked>
        新窗口打开
      <%}else{ %> 
        <input type="radio" name="targettype" value="_parent" checked>
        本窗口打开 
        <input type="radio" name="targettype" value="_blank" >
        新窗口打开
      <%} %> 
        </td>
    </tr>
    <tr> 
      <td bgcolor=#FFFFFF align="right" width="32%">隐藏/显示</td>
      <td bgcolor=#FFFFFF align="left" width="68%"> 
      <%
      	if(hide.trim().equals("0")){
      %>
        <input type="radio" name="hide" value="1" >
        显示 
        <input type="radio" name="hide" value="0" checked>
        隐藏
      <%}else{ %>
        <input type="radio" name="hide" value="1" checked>
        显示 
        <input type="radio" name="hide" value="0" >
        隐藏
      <%} %> 
        </td>
    </tr>
    <tr> 
      <td bgcolor=#FFFFFF align="right" width="32%">排序值</td>
      <td bgcolor=#FFFFFF align="left" width="68%"> 
        <input type="text" name="ordernum" value="<%=ordernum %>"  maxlength="4" size="5"  onkeyup="this.value=this.value.replace(/\D/gi,'')" >
        (数字) </td>
    </tr>
    <tr> 
      <td bgcolor=#FFFFFF align="left" width="32%">&nbsp;</td>
      <td bgcolor=#FFFFFF align="left" width="68%"> 
        <input type="button" name="button" value="提交"  onclick="checkMENU()">
      </td>
    </tr>
</table>
</form>
 </TD>
		</TR>
  </TBODY>
</TABLE>
</BODY>
<%} %>
</HTML>

⌨️ 快捷键说明

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