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

📄 hpconf.jsp

📁 在系统开发过程中用到了javabean和jsp技术
💻 JSP
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString"%>
<%
oa.bean.SysConfBean myBean = null;
try{
myBean = new oa.bean.SysConfBean();
	DealString ds = new DealString();
	//取得菜单类别
	String strType = ds.toString((String)request.getParameter("txt_type"));
	if(strType.equals(""))strType = "1";

	//编号
	String strId = ds.toString((String)request.getParameter("txt_id"));

	//增删改类型
	String strEdit = ds.toString((String)request.getParameter("txt_edit"));


	String uid = (String)session.getAttribute("zgbh");
%>
<br>


<table width="95%" cellspacing="1" cellpadding="3" bgcolor="#999999" align="center">
  <tr bgcolor="#CCCCCC" align=center>
  <td colspan="5"><b>主页新闻设置</b></td>
  </tr>
  <tr bgcolor="#ffcc00" height=20>
   <td colspan="5"></td>
  </tr>
   <tr align=middle bgColor=#dddddd>
    <td><b>模块序号</b></td>
    <td><b>模块名称</b></td>
    <td><b>显示新闻条数</b></td>
    <td><b>标尾是否显示时间</b></td>

		<td>管理操作</td>
  <tr align=middle bgColor=#eeeeee></tr>
<%	
	myBean.initMain();
	myBean.setType(14);
	Vector vet = (Vector)myBean.getData();
	for(int i=0;i<vet.size();i++)
	{  

		Hashtable hash = (Hashtable)vet.get(i);
		String strID = (String)hash.get("ID");
		String strN = "";
		if(strID.equals("18")||strID=="18")strN = "二级版面";
		else if(strID.equals("19")||strID=="19")strN = "三级版面";
		else if(strID.equals("20")||strID=="20")strN = "滚动消息";
		else if(strID.equals("21")||strID=="21")strN = "焦点导读";
		else if(strID.equals("22")||strID=="22")strN = "栏目精选";
		else if(strID.equals("23")||strID=="23")strN = "热门专题";
		else strN = myBean.toName(strID);
		//把模块编号转化为模块名称String strName = ..............................
		String strNUM = (String)hash.get("NUM");
		String strIsShowtime = (String)hash.get("ISSHOWTIME");	
		if(strIsShowtime.equals("1")) strIsShowtime = "是";
		else strIsShowtime = "否";
%>


 <TR bgColor=#ffffff>
    <TD align=center><%=strID%></TD>
    <TD><%=strN%></TD>
    <TD align=center><%=strNUM%></TD>
    <TD align=center><%=strIsShowtime%></TD>


	
		<TD align=center>
		<FONT color="#99cc00">
		  【<A onclick="edit('<%=strID%>');" style="cursor:hand;">修改</A>】 
		</FONT>
		</TD>
	


</TR>
<%
	}
%>
</table>

<script>
	function add(id)
	{
		document.all.txt_type.value = "14";
		document.all.txt_id.value = "";
		document.all.txt_edit.value = "1";
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}

	function edit(id)
	{
		document.all.txt_type.value = "14";
		document.all.txt_id.value = id;
		document.all.txt_edit.value = "2";
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}

	function del(id)
	{
		if(!confirm("是否真的要删除?"))
		{ 
		}
		else
		{
			
			document.all.txt_type.value = "14";
			document.all.txt_id.value = id;
			document.all.txt_edit.value = "3";
			document.all.form1.action = "../../manageservlet";
			document.all.form1.submit();
		 }
	}
</script>
<%}finally{
	if(myBean!=null)myBean.closeConn();
}%>

⌨️ 快捷键说明

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