• 2021.4.11每日学习


    <%@page import="com.ch7.model.BlogInfo"%>
    <%@page import="com.ch7.common.DataConverter"%>
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    
    <%@page import="com.ch7.model.UserInfo" %>
    <%@page import="com.ch7.dal.Blog" %>
    <%@page import="com.ch7.common.DataValidator" %>
    <%@page import="com.ch7.common.Utility" %>
    <%@page import="com.ch7.dal.Class" %>
    <%@page import="com.ch7.model.ClassInfo" %>
    <%@page import="com.ch7.model.CommentInfo" %>
    <%@page import="com.ch7.dal.Comment" %>
    
    <%
    int id= DataConverter.toInt(request.getParameter("id"));
    Blog blog=new Blog();
    BlogInfo info =blog.getBlogInfo(id);
    if(info==null){
    out.println("<script>alert('博文ID有误');window.location.href='index.jsp';</script>");
    }
     %>
    
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      
        
        <title>博文详情</title>
        
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">    
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
    
      </head>
      
      
      <body background="Image/timg.jpg" width=100% height=100%>
      <div class="header">
    <style>
    .header{ background:url(Image/2.jpg) no-repeat left top; height:618px;}}
    </style>
    
    </div>
        
        <div id="content">
        <div class="post">
        <h1 class="title"><%=info.getTitle() %></h1>
        <p class="byline"> <small><%=info.getCreatedtime() %></small></p>
        <div class="entry">
        <p> <%=DataValidator.serverhtmlDecode(info.getContext()) %></p>
        </div>
        <P class="meta"><a href="#" class="more">分类:<%=info.getClassName() %></a></P>
        </div>
         <a name="comment" id="comment"></a>
        <p class="meta">评论:</p><br>
        <%
        Comment comment=new Comment();
        List<CommentInfo> cmlist=comment.getListByBlogId(id);
        for(CommentInfo cminfo: cmlist){
        out.println(cminfo.getContext()+"<br>");
         out.println(cminfo.getCreatedtime()+"&nbsp;&nbsp;&nbsp;&nbsp;"+cminfo.getUsername()+"<br><hr>");
        }%>
        
         <jsp:include page="comment.jsp" >
         <jsp:param value="<%=id %>" name="id"/>
         </jsp:include>
         </div>
        
       
         
      </body>
    </html>
    <%@page import="com.ch7.model.BlogInfo"%>
    <%@page import="com.ch7.common.DataConverter"%>
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    
    <%@page import="com.ch7.model.UserInfo" %>
    <%@page import="com.ch7.dal.Blog" %>
    <%@page import="com.ch7.common.DataValidator" %>
    <%@page import="com.ch7.common.Utility" %>
    <%@page import="com.ch7.dal.Class" %>
    <%@page import="com.ch7.model.ClassInfo" %>
    <%@page import="com.ch7.model.CommentInfo" %>
    <%@page import="com.ch7.dal.Comment" %>
    
    <%
    int id= DataConverter.toInt(request.getParameter("id"));
    Blog blog=new Blog();
    BlogInfo info =blog.getBlogInfo(id);
    if(info==null){
    out.println("<script>alert('博文ID有误');window.location.href='index.jsp';</script>");
    }
     %>
    
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      
        
        <title>博文详情</title>
        
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">    
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
    
      </head>
      
      
      <body background="Image/timg.jpg" width=100% height=100%>
      <div class="header">
    <style>
    .header{ background:url(Image/2.jpg) no-repeat left top; height:618px;}}
    </style>
    
    </div>
        
        <div id="content">
        <div class="post">
        <h1 class="title"><%=info.getTitle() %></h1>
        <p class="byline"> <small><%=info.getCreatedtime() %></small></p>
        <div class="entry">
        <p> <%=DataValidator.serverhtmlDecode(info.getContext()) %></p>
        </div>
        <P class="meta"><a href="#" class="more">分类:<%=info.getClassName() %></a></P>
        </div>
         <a name="comment" id="comment"></a>
        <p class="meta">评论:</p><br>
        <%
        Comment comment=new Comment();
        List<CommentInfo> cmlist=comment.getListByBlogId(id);
        for(CommentInfo cminfo: cmlist){
        out.println(cminfo.getContext()+"<br>");
         out.println(cminfo.getCreatedtime()+"&nbsp;&nbsp;&nbsp;&nbsp;"+cminfo.getUsername()+"<br><hr>");
        }%>
        
         <jsp:include page="comment.jsp" >
         <jsp:param value="<%=id %>" name="id"/>
         </jsp:include>
         </div>
        
       
         
      </body>
    </html>
  • 相关阅读:
    MySQL server has gone away 问题的解决方法
    MySQL批量SQL插入性能优化
    mysql中int、bigint、smallint 和 tinyint的区别详细介绍
    Mac OS使用ll、la、l等ls的别名命令
    Github上的PHP资源汇总大全
    svn代码版本管理总结
    mysql information_schema介绍
    redis 五种数据结构详解(string,list,set,zset,hash)
    git 换行符LF与CRLF转换问题
    php 利用activeMq+stomp实现消息队列
  • 原文地址:https://www.cnblogs.com/sunhongbin/p/14941272.html
Copyright © 2020-2023  润新知