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

📄 shouquedit.jsp

📁 网络版办公管理系统,采用最新技术java开发,对学习java语语的朋友可以借鉴
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="check.jsp" %>

<script language=javascript src="mouse.js"></script>

<%
if(String.valueOf(session.getAttribute("Urule")).compareTo("a")!=0){
	response.sendRedirect ("error.jsp?id=admin");
}

String sql = "";
String op = "9";
String sid = request.getParameter("id");
if( request.getParameter("op")!=null){
	op = request.getParameter("op");
}

if( op.compareTo("1")==0){
	out.println(sqlbean.showMsg("javascript:window.close()","请到《行政管理》栏目的《上报文件》中去上载!","系统提示"));
}else if( op.compareTo("3")==0){
	sql="DELETE from upfile where ID="+sid;
	sqlbean.executeUpdate(sql);
	sqlbean.close();
	response.sendRedirect("shouqu.jsp");
}else if( op.compareTo("2")==0){
	sql = "select * from upfile where ID="+sid;
	sqlbean.executeQuery(sql);
	sqlbean.rs.updateString("title",sqlbean.to_8859_1(request.getParameter("type")));
	sqlbean.rs.updateString("ttext",sqlbean.to_8859_1(request.getParameter("ttext")));
	sqlbean.rs.updateRow();
	sqlbean.close();
	response.sendRedirect("shouqu.jsp");
}else if( op.compareTo("6")==0){//不允许管理员录入
//    sql="insert into upfile (type) values('"+request.getParameter("type")+"')"; 
//	sqlbean.executeUpdate(sql);
//	sqlbean.close();
//	response.sendRedirect("shouqu.jsp");
}else if( op.compareTo("4")==0 || op.compareTo("5")==0){ 	
	int ID =0;
	String status = "readonly";
	if(op.compareTo("5")==0){
		status = "";
	}
	
	sql="select * from upfile where ID="+sid;
	sqlbean.executeQuery(sql);
	if(sqlbean.next()){
		ID = sqlbean.getInt("ID");	
%>

<html><head><title><%=sqlbean.getString("title")%></title>
<link rel="stylesheet" href="oa.css">
<script language="JavaScript">
<!--
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>

</head>
<body bgcolor="#efefef" topmargin=0 leftmargin=0>

<div align="center">
  <center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr bgcolor="#4e5960"> 
    <td  class="heading" height="26">
      <p align="left"><b><font color="#FFFFFF"><%=sqlbean.getString("title")%></font> &nbsp;&nbsp<font color="#FFFFFF"><%=sqlbean.getString("time")%></font></b></p>  
      </font>  
    </td>  
  </tr>  
</table>  
  </center>  
</div>  
<div align="center">  
<table width="100%" border=0 cellspacing=0 cellpadding="2" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" height="40">  
  <tr> 
	<td bgcolor="#bfbfbf" class="heading" width="451" height="20"  align=center><b><%=sqlbean.getString("part")%></b></td>
    <td bgcolor="#bfbfbf" class="heading" width="274" height="20"><%=sqlbean.getString("tname")%></td>
  </tr>    
  <tr>
	<td colspan=2>
		<input type=text name=title value="<%=sqlbean.getString("title")%>" <%=status%> >
	</td>	
	</tr>
  <tr>      
	<td class="show"  colspan="2" height="100" width="100%"><textarea name=ttext <%=status%> cols=40 rows=10><%=sqlbean.getString("ttext")%></textarea></td> 
  </tr>    
  <tr>      
	<td class="show"  colspan="2" width="100%">
	<%
	String tmp = sqlbean.getString("contenttype");
	if(tmp.compareTo("")==0){
		out.println("没有附件");
	}else{
		out.println("<a href='"+sqlbean.getString("html")+"' target=_blank>附件</a></iframe>");
	}	
	%>
  </td></tr>  
</table> 
</div>   
<table border=0 width="100%">
  <tr>
    <td width="33%"></td><td width="16%">  
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','images/close_2.gif',1);"  onclick="MM_callJS('window.close()')"><img name="Image11" border=0 src="images/close_1.gif" hspace="5" vspace="5"></a> 
    </td>
    <td width="34%"></td>
  </tr>
</table>
</body>  
</html>
<%
		int count = sqlbean.getInt("count");
		sqlbean.rs.updateInt("count",count+1);
		sqlbean.rs.updateRow();
	}else{
		out.println("竟然没有数据,奇怪了,请立刻通知管理员!");
	}
}
%>

⌨️ 快捷键说明

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