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

📄 control_module.jsp

📁 又一个新闻发布系统,jsp开发的,想和大家交流一下
💻 JSP
字号:
<%@ include file = "config.jsp" %>
<%@ page import="java.util.*,cwcNews.*"%>
<%@ page contentType="text/html;charset=GBK"%>
<jsp:useBean id="managerNews" scope="page" class="cwcNews.managerNews"/>
<jsp:useBean id="handle" scope="page" class="cwcNews.handle"/>
<jsp:useBean id="admin" class="cwcNews.admin"/>
<%
admin.gotoLogin(response,session,"login.jsp");
admin.checkSupperAdmin(request,response,tb_news_visit_limit_tmp,"control_module.jsp","not_super_admin.jsp");								//检查权限

Vector moduleBeanVector = new Vector();
moduleBean moduleBean = new moduleBean();
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="thestyle.css" rel="stylesheet" type="text/css">
<script language="javascript">
function addModule() {
	if (document.form2.module.value != "") {
		document.form2.submit();
		return(true)
	}
	else {
		alert("模版名称不能为空");
		return(false);
	}
}
function delModule() {
	if (confirm("请确认您的操作")) {
		document.form9.submit();
		return(true);
	}
	else return(false);
}
function uploadModule(theForm) {
	if (confirm("如果上传到已经存在模版页面的模版里,会把该页面覆盖,请确认您的操作")) {
		theForm.action = "upload_module_post.jsp?module=" + theForm.module.value;
		theForm.submit();
		return(true);
	}
	else return(false);
}
</script>
<link href="thestyle.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="eeeeee">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr> 
    <td bgcolor="#e6e6e6" class="whiteline14">
	<form action="dealwithcenter.jsp?action=addModule" method="post" name="form2">
        <br>
        <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td>新闻系统 -&gt; <font color="#0000FF">管理模版</font></td>
          </tr>
        </table>
        <br>
        <table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#999999">
          <tr> 
            <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="0">
                <tr bgcolor="eeeeee"> 
                  <td width="17%" align="center" valign="middle" bgcolor="#9FDFDF">创建模版</td>
                  <td width="20%" align="center" valign="middle">模版名称</td>
                  <td width="40%" valign="middle"><input name="module" type="text" id="module"></td>
                  <td width="23%" align="left" valign="middle"><input type="button" name="Submit23" value="创建" onclick="return addModule();"></td>
                </tr>
              </table></td>
          </tr>
        </table>
        </form>
		<form name="form3" method="post" enctype="multipart/form-data" onsubmit="return uploadModule(this)">
        <table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#999999">
          <tr> 
            <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="0">
                <tr bgcolor="eeeeee"> 
                  <td width="17%" align="center" valign="middle" bgcolor="#9FDFDF">上传模版页面</td>
                  <td width="31%" align="center" valign="middle"><input type="file" name="file_data"></td>
                  <td width="7%" align="center" valign="middle">&gt;&gt;&gt;</td>
                  <td width="22%" valign="middle"><select name="module">
<%
moduleBeanVector = managerNews.getModuleBeanVector(request,tb_news_module,"all");
for (int i=0; i<moduleBeanVector.size(); i++) {
	moduleBean = (moduleBean)moduleBeanVector.elementAt(i);
	out.print("<option value=" + moduleBean.getModule() + ">" + moduleBean.getModule() + "</option>");
}
%>
                    </select></td>
                  <td width="23%" valign="middle"><input type="submit" name="Submit2" value="上传"></td>
                </tr>
                <tr bgcolor="eeeeee"> 
                  <td align="center" valign="middle" bgcolor="dddddd">返回信息</td>
                  <td colspan="4" valign="middle" bgcolor="dddddd"><font color="#FF0000"><%=handle.getString(request,"msg")%></font></td>
                </tr>
              </table></td>
          </tr>
        </table>
      </form> 
      <form name="form9" method="post" action="dealwithcenter.jsp?action=delModule">
        <br>
        <table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#999999">
          <tr> 
            <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="0">
                <tr bgcolor="eeeeee"> 
                  <td width="17%" align="center" valign="middle" bgcolor="#9FDFDF">删除模版</td>
                  <td width="20%" align="center" valign="middle">&nbsp;</td>
                  <td width="40%" valign="middle">
				  <select name="mid_module">
<%
moduleBeanVector = managerNews.getModuleBeanVector(request,tb_news_module,"all");
for (int i=0; i<moduleBeanVector.size(); i++) {
	moduleBean = (moduleBean)moduleBeanVector.elementAt(i);
	out.print("<option value=" + moduleBean.getMid() + "," + moduleBean.getModule() + ">" + moduleBean.getModule() + "</option>");
}
%>
                  </select></td>
                  <td width="23%" align="left" valign="middle"><input type="button" name="Submit22" value="删除" onclick="return delModule();"></td>
                </tr>
              </table></td>
          </tr>
        </table>
      </form>
	  <br>
	  <form name="form1" method="post" action="DealWithCenter.jsp?action=relateModule">
        <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
            <td>新闻系统 -&gt; <font color="#0000FF">关联模版</font></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="14" cellpadding="0">
        <tr> 
            <td bgcolor="#646464"><table width="100%" border="0" cellspacing="1" cellpadding="3">
                <tr> 
                  <td width="43%" height="21" align="center" valign="middle" background="images/title_bg_line.gif">栏目名称</td>
                  <td width="41%" align="center" valign="middle" background="images/title_bg_line.gif">对应模版</td>
                </tr>
<%
Vector moduleBeanVector2 = managerNews.getTypeModuleBeanVector(request,tb_news_type,tb_news_module,tb_news_type_module);
for (int i=0; i<moduleBeanVector2.size(); i++) {
	moduleBean = (moduleBean)moduleBeanVector2.elementAt(i);
%>
                <tr onMouseOut="this.style.background='ffffff'" onMouseOver="this.style.background='eeeeee'"  bgcolor="#FFFFFF"> 
                  <td align=center valign=middle><%=moduleBean.getTypeTitle()%></td>
                  <td align=center valign=middle><a href=<%=systemURL%>/<%=systemFolder%>/module/<%=moduleBean.getModule()%>/detail_news.jsp?Nid=<%=managerNews.getNid(tb_news_info)%> target=_blank><%=moduleBean.getModule()%></a></td>
                </tr>
                <%
}
%>
              </table>           
            </td>
        </tr>
      </table>
        <table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#646464">
          <tr> 
            <td align="center" valign="middle" bgcolor="#FFFFFF">
			<select name="tid">
<%
out.print(managerNews.ListNewsType(request,tb_news_type,tb_news_visitor_type));
%>
              </select>&nbsp;&nbsp;&nbsp; &nbsp; 
              <input type="submit" name="Submit" value="关联到模版 &gt;&gt;&gt;">
              &nbsp;&nbsp;&nbsp; &nbsp; 
              <select name="mid_module">
<%
moduleBeanVector = managerNews.getModuleBeanVector(request,tb_news_module,"");
for (int i=0; i<moduleBeanVector.size(); i++) {
	moduleBean = (moduleBean)moduleBeanVector.elementAt(i);
	out.print("<option value=" + moduleBean.getMid() + "," + moduleBean.getModule() + ">" + moduleBean.getModule() + "</option>");
}
%>
              </select> </td>
          </tr>
        </table>
      </form>
	  <br>
      </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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