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

📄 editpicnews.jsp

📁 自己写的新闻发布系统
💻 JSP
字号:
<%@page contentType="text/html; charset=gb2312" language="java" %>
<%
String news_location="listpicnews";
%>
<%@ include file="session.jsp" %>
<jsp:useBean id=empire scope="page" class="Eclass.jdbc_sql" />
<%
java.sql.ResultSet rs=null;
String b_s0="",b_s1="",o_b0="",o_b1="";
int picid=Integer.parseInt(request.getParameter("picid"));
rs=empire.query("select picid,pic_url,url,title,pic_width,pic_height,open_pic,border from enews_pic where picid="+picid);
rs.next();
if(rs.getInt("border")==0)
{b_s0=" selected";}
else
{b_s1=" selected";}
if(rs.getString("open_pic").equals("_blank"))
{o_b0=" selected";}
else
{o_b1=" selected";}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../images/ebb.css" type="text/css">
<title>无标题文档</title>
<script>
function check_pic(obj)
{
if(obj.title.value=="")
{alert("新闻标题不能为空");obj.title.focus();return false;}
if(obj.pic_url.value=="")
{alert("图片地址不能为空");obj.pic_url.focus();return false;}
return true;
}
</script>
</head>

<body>
<form name=form1 method=post action=ListPicNews.jsp onsubmit="return check_pic(document.form1)">
<input type=hidden name=picid value=<%=picid%>>
  <table width=80% align=center cellpadding=0 cellspacing=0 bgcolor="3370A6">
    <tr>
      <td colspan=2><font color="#FFFFFF" size=5><strong>增加首页图片新闻</strong></font></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=165 height="23">图片地址:</td>
      <td width=635 height="23"> 
        <input name=pic_url type=text id="pic_url" value="<%=rs.getString("pic_url")%>">
        (大小:宽 
        <input name=pic_width type=text id="pic_width" value="<%=rs.getString("pic_width")%>" size=4 maxlength=4>
        pix 高 
        <input name=pic_height type=text id="<%=rs.getString("pic_height")%>" value=146 size=4 maxlength=4>
        pix)边框: 
        <select name="border" id="border">
          <option value="0"<%=b_s0%>>没有边框</option>
          <option value="1"<%=b_s1%>>有边框</option>
        </select>
        <input name="action" type="hidden" id="action" value="EditPicNews"></td></tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=165 height="23">新闻标题:</td>
      <td width=635 height="23"> 
        <input name=title type=text size="50" value="<%=rs.getString("title")%>"></td></tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=165 height=23>连接地址:</td>
      <td width=635 height=23> 
        <input name=url type=text id="url" value='<%=rs.getString("url")%>' size="70"></td></tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=165 height="23">打开链接方式:</td>
      <td width=635 height="23"> 
        <select name=open_pic id="open_pic">
          <option value="_blank"<%=o_b0%>>在新窗口打开</option>
          <option value="_parent"<%=o_b1%>>在原窗口打开</option>
        </select></td></tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=165 height="23">&nbsp; </td>
      <td width=635 height="23"> 
        <input type=submit name=zz value=增加><input type=reset name=Submit2 value=重置>
</td></tr></table></form>
</body>
</html>
<%
rs.close();
empire.closestmt();
empire.closeconn();
%>

⌨️ 快捷键说明

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