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

📄 hyxwallmana.jsp~11~

📁 c++通信编程学习1
💻 JSP~11~
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.j2ee.func.news.*"%>
<%@ page import="java.util.Vector"%>
<%@ page import="java.lang.Integer" %>
<%
Vector vct=(Vector)request.getAttribute("vct");
String counts=(String)request.getAttribute("count");
String pagesizes=(String)request.getAttribute("pagesize");
String pagenos=(String)request.getAttribute("pageno");
int count=Integer.parseInt(counts);
int pagesize=Integer.parseInt(pagesizes);
int pageno=Integer.parseInt(pagenos);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="css/indexcss.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="700" border="0" align="center">
  <tr>
    <td width="175">数据库中有<strong><font color="#FF0000"><%=count%></font></strong> 条新闻 </td>
    <td width="515"><form action="">记录按
<select name="sortid">
        <option value="newsdate" selected>时间</option>
        <option value="id">编号</option>
        <option value="title">标题</option>
        <option value="author">作者</option>
        <option value="type">分类</option>
      </select>
      <select name="sorttype">
        <option value="desc" selected>倒序</option>
        <option>升序</option>
      </select>
      排列
      <input type="hidden" name="pageno" value="<%=pageno%>"/>
      <input type="submit" name="Submit" value="查看">
	  </form></td>
  </tr>
</table>

<table width="700" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#9BD7FF" bgcolor="#9BD7FF">
  <tr>
    <td width="77" align="center">编号</td>
    <td width="194" align="center">标题</td>
    <td width="127" align="center">作者</td>
    <td width="117" align="center">分类</td>
    <td width="163" align="center">日期</td>
    <td width="163" align="center"> 操作</td>
  </tr>
</table>
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#9BD7FF">
  <%int vcti=0;
  String colorp="#ffffff";
   while(vcti<vct.size()){
   NewsInfo ni=(NewsInfo)vct.elementAt(vcti);
   if(vcti%2!=0){colorp="#E6F2FF";}
   %>
  <tr bgcolor="<%=colorp%>">
    <td width="79" height="26" align="center"><strong><%=ni.getId()%></strong></td>
    <td width="189" align="center"><%=ni.getTitle().length()>10? ni.getTitle().substring(0,10):ni.getTitle() %></td>
    <td width="132" align="center"><%=ni.getAuthor() %></td>
    <td width="114" align="center"><%=ni.getType() %></td>
    <td width="164" align="center"><%=ni.getNewsdate()%></td>
    <td width="164" align="center"><a href="getallnewsservlet?type=edit&id=<%=ni.getId()%>">修改</a> <a href="getallnewsservlet?type=delete&id=<%=ni.getId()%>">删除</a></td>
  </tr>
  <%vcti++;
   colorp="ffffff";}
   %>
</table>
<form action="getallnewsservlet?type=get" name="myform" method="Post">
  <table width="800" border="0">
    <tr>
      <td width="68">&nbsp;</td>
      <td width="55">&nbsp;</td>
      <td width="548">
        <%if (pageno==1){%>
        <font color="#999999">首页 上一页</font>
        <%}else{%>
        <a href="getallnewsservlet?type=get&pageno=1"> 首页</a> <a href="getallnewsservlet?type=get&pageno=<%=pageno-1%>">
        上一页</a>
        <%}
        if(pageno==(count%pagesize==0?count/pagesize:count/pagesize+1)){%>
        <font color="#999999">下一页 末页</font>
        <%}else{ %>
        <a href="getallnewsservlet?type=get&pageno=<%=pageno+1%>"> 下一页</a> <a href="getallnewsservlet?type=get&pageno=<%=(count%pagesize==0?count/pagesize:count/pagesize+1)%>">
        末页</a>
        <%} %>
        当前页
        <input name="pageno" type="text" size="4" value="<%=pageno%>"> <input name="button" type="button" onclick="window.location='getallnewsservlet?type=get&pageno='+myform.pageno.value" value="go"/>
        页数 <%=pageno%>/<%=count%pagesize==0?count/pagesize:count/pagesize+1%>
        每页:<%=pagesize%> 总数:<%=count%></td>
      <td width="56">&nbsp;</td>
      <td width="51">&nbsp;</td>
    </tr>
  </table>

  <input type="hidden" name="sortid" value="<%=request.getAttribute("sortid")%>"/>
  <input type="hidden" name="sorttype" value="<%=request.getAttribute("sorttype")%>"/>
</form>
</body>
</html>

⌨️ 快捷键说明

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