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

📄 news_midify.jsp.bak

📁 急着下个东西即然还要开通帐号
💻 BAK
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*,beitian.db.*,java.io.*" %>
<%@ include file="checkLogin.jsp" %>

<%
           String news_id = request.getParameter("news_id") == null ? "0" :request.getParameter("news_id");
	
           Connection conn = null;
           
           String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; 
           String dbURL = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=chncup"; 
           String userName = "sa"; 
           String userPwd = "lweditlw"; 
           
           
           java.io.FileOutputStream fos = new java.io.FileOutputStream(file);
           String sql_1="select title,file_length,menu_id from web_news where news_id="+ news_id;
           Statement stmt_1 = conn.createStatement();
           ResultSet result_1 = stmt_1.executeQuery(sql_1);
           result_1.next();
              
           String title = result_1.getString("title"); 
           int file_length = result_1.getInt("file_length"); 
           int menu_id = result_1.getInt("menu_id"); 
           
              
              String sql="select content from web_news where news_id="+news_id;
              Statement stmt = conn.createStatement();
              ResultSet result = stmt.executeQuery(sql);
              result.next();
              
              byte[] b = new byte[file_length];
              InputStream fis = result.getBinaryStream(1);
              //while(fis.read(b,0,file_length) != -1){
              //    fos.write(b,0,file_length);
              //}
             //fos.flush();
             StringBuffer out = new StringBuffer();
             for (int n;(n=fis.read(b))!=-1) {
                 out.append(new String(b,0,n));
             }
             String content = out.toString();
%>
<SCRIPT language="JavaScript" src="../scripts/util.js"></SCRIPT>
<link rel="stylesheet" href="/admin/css/style.css" type="text/css">
<HTML>
<HEAD>
<TITLE>内空发布</TITLE>
<style>
body,td,input,textarea {font-size:9pt}
</style>
<script Language="JavaScript">
<!--
function Check(theForm)
{
	if (theForm.title.value ==""){
		alert("请输入标题名称");
		theForm.title.focus();
		return (false);
	}
	return (true);
}

function changecate()
{
  var obj = document.forms['form1'].elements['parent_id'];

	if (obj.selectedIndex > 0 && obj.options[obj.selectedIndex].className == "leafCat")
	{
      alert("您选择的分类是一个末级分类,请重新选择。");
      obj.selectedIndex = 0;

      return false;
	}
    return true;
}

-->
</script>

</HEAD>
<BODY>
<FORM method="POST" name="myform" action="submit_modify.jsp">
	
<TABLE border="0" cellpadding="2" cellspacing="1" align="center">
<TR>
	<TD><div align="right">标题:</div></TD>
	<TD>
		<input name="title" type="text" size="50" maxlength="50" value=""></TD>
</TR>
 <tr> 
      <td width="10%"><div align="right">菜单名称:</div></td>
    <td width="90%">
           <select name='menu_id'>
           	<%// onchange="changecate()"
            String sql = "select menu_id,parent_id,menu_name from view_www_menu";
    				DBOperation theDBOperation = new DBOperation();
        		ResultSet rs = theDBOperation.getResultSet(sql);
            while(rs.next()){
           %>
           <option value="<%=rs.getString("menu_id")%>" <%=(rs.getInt("parent_id")==0)?"":"class=\"leafCat\""%> <%=rs.getInt("menu_id")==menu_id?"selected":""%>><%=rs.getString("menu_name")%></option>
           <%}%>
         </select>
         </td>
  </tr>
<TR>
	<TD><div align="right">编辑内容:</div></TD>
	<TD>
		<INPUT type="hidden" name="content1" value="<%=content%>">
		<IFRAME ID="eWebEditor1" src="eWebEditor.jsp?id=content1&style=standard" frameborder="0" scrolling="no" width="650" height="400"></IFRAME>
	</TD>
</TR>
<TR>
	<TD colspan=2 align=right>
	<INPUT type=submit name=b1 value="提交">
	<INPUT type=reset name=b2 value="重填">
	<!--<INPUT type=button name=b3 value="查看源文件" onclick="location.replace('view-source:'+location)">-->
	</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>

⌨️ 快捷键说明

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