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

📄 lm_ziliao.jsp

📁 新闻发布系统 本系统可以完成功能: 1 支持多个网站 2 添加栏目
💻 JSP
字号:
<%@page language="java"%>
<%@page contentType="text/html;charset=8859_1"%>
<%@page import="java.sql.*"%>
<%@page import="DBCon"%>
<% DBCon DBConBean=new DBCon(); %>
<%@page import="IdSelect"%>
<% IdSelect IdSelectBean=new IdSelect(); %>
<html>
<head>
<title>栏目</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/style.css" type="text/css">
</head>
<script language="javascript">
function subb() {
if(document.form1.lm_name.value==""){
alert("请填写要增加的栏目名称!!");
}
else
if(document.form1.lm_admin_mail.value==""){
alert("请填写要增加的管理员信箱!!");
}else{
document.form1.action="lm_add.jsp"
form1.submit();
}
}
</script>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
  <table width="75%" border="1" cellspacing="0" cellpadding="0" align="left"  bordercolorlight="#000000" bordercolordark="#ffffff" class="zw" bgcolor="#e1e1e1">
<%  
  String s_jb_id =(String)session.getValue("s_jb_id");
  IdSelectBean.setIdName("lm_del");
  IdSelectBean.setStrTableName("lanmu");
  IdSelectBean.setStrId("0 and lm_type='0' and s_jb_id="+s_jb_id+"");
  
 	 try {
	  Connection conn = DBConBean.getConnection();
	  IdSelectBean.setConn(conn);
	  ResultSet result = IdSelectBean.getResultSet();
%>
    <tr> 
      <td rowspan="12" height="240">&nbsp;</td>
      <td height="30">栏目名称:</td>
      <td height="30"> 
        <input type="text" name="lm_name" style="width:140px">
      </td>
      <td rowspan="12" height="240">&nbsp;</td>
    </tr>
    <tr> 
      <td height="30">每页显示文章数:</td>
      <td height="30"> 
        <input type="text" name="lm_line" style="width:140px">
      </td>
    </tr>
    <tr> 
      <td height="30">管理员信箱:</td>
      <td height="30"> 
        <input type="text" name="lm_admin_mail" style="width:140px">
      </td>
    </tr>
    <tr> 
      <td height="30">栏目排列序号</td>
      <td height="30"> 
        <input type="text" name="lm_xh" style="width:140px">
      </td>
    </tr>
    <tr> 
      <td height="30">栏目级别:</td>
      <td height="30"> 
        <select name="lm_type" style="width:140px">
          <option value="0">初级栏目</option>
          <%
	//利用while循环将数据表中的记录列出
	while(result.next()) {
		String lm_id= result.getString("lm_id");
		String lm_name=result.getString("lm_name");%>
          <option value="<%=lm_id%>"><%=lm_name%></option>
          <%
	  }
	 }
	 catch(Exception e) {DBConBean.closeAll();
	   e.printStackTrace();
	 }		

    %>
        </select>
      </td>
    </tr>
    <tr> 
      <td height="30">栏目的模板名称:</td>
      <td height="30"> 
        <select name="lm_moban_id" style="width:140px">
         <% IdSelectBean.setIdName("jm_del");
   IdSelectBean.setStrTableName("jiemian");
   IdSelectBean.setStrId("'0' and s_jb_id="+s_jb_id+"");
 	 try {
	  ResultSet result1 = IdSelectBean.getResultSet();
	  //利用while循环将数据表中的记录列出
	  while(result1.next()) {
	  String jm_id=result1.getString("jm_id");
	  String jm_bei=result1.getString("jm_bei");%>
<option value="<%=jm_id%>"><%=jm_bei%></option>
<%	  }
	 result1.close();}
	 catch(Exception e) {DBConBean.closeAll();
	   e.printStackTrace();
	 }	DBConBean.closeAll();	
%>
        </select>
      </td>
    </tr>
    <tr> 
      <td height="30">栏目间隔符号:</td>
      <td height="30"> 
        <select name="lm_tx" style="width:140px">
          <option value="〗〖">〗〖</option>
          <option value="】【">】【</option>
          <option value="〗">〗</option>
          <option value="〖">〖</option>
          <option value="【">【</option>
          <option value="】">】</option>
          <option value="‖">‖</option>
          <option value="|">|</option>
          <option value="┃">┃</option>
          <option value="│">│</option>
          <option value="↓">↓</option>
          <option value="↑">↑</option>
        </select>
      </td>
    </tr>
    <tr> 
      <td height="30">窗口打开方式:</td>
      <td height="30"> 
        <select name="lm_win" style="width:140px">
          <option value="_blank">新窗口</option>
          <option value="_self">本窗口</option>
          <option value="_top">最上层框架</option>
        </select>
      </td>
    </tr>
    <tr> 
      <td height="30">栏目的访问权限: </td>
      <td height="30"> 
        <select name="lm_vist_power" style="width:140px">
          <option value="1">公众</option>
          <option value="0">用户</option>
        </select>
      </td>
    </tr>
    <tr> 
      <td height="30" colspan="2">栏目简介:</td>
    </tr>
    <tr> 
      <td height="30" colspan="2"> 
        <textarea name="lm_info" style="width:300px"></textarea>
      </td>
    </tr>
    <tr> 
      <td height="30" colspan="2"> 
        <input type="button" name="Submit" value="按钮" onClick="subb()">
        <input type="reset" name="Submit2" value="重置">
      </td>
    </tr>
  </table>
  </form>
</body>
</html>

⌨️ 快捷键说明

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