ftebox 3 years ago
parent
commit
5a325c710b
77 changed files with 3335 additions and 2575 deletions
  1. 14 1
      .idea/inspectionProfiles/Project_Default.xml
  2. 0 5
      .idea/misc.xml
  3. 2 0
      .idea/webContexts.xml
  4. 41 0
      src/main/java/cn/ftebox/controller/BlogController.java
  5. 24 0
      src/main/java/cn/ftebox/controller/BloggerController.java
  6. 50 0
      src/main/java/cn/ftebox/controller/CommentController.java
  7. 63 0
      src/main/java/cn/ftebox/controller/IndexController.java
  8. 158 0
      src/main/java/cn/ftebox/controller/admin/BloggerAdminController.java
  9. 92 0
      src/main/java/cn/ftebox/controller/admin/CommentAdminController.java
  10. 91 0
      src/main/java/cn/ftebox/controller/admin/LinkAdminController.java
  11. 21 4
      src/main/java/cn/ftebox/controller/admin/SystemAdminController.java
  12. 10 0
      src/main/java/cn/ftebox/dao/BlogDao.java
  13. 31 0
      src/main/java/cn/ftebox/dao/BloggerDao.java
  14. 5 0
      src/main/java/cn/ftebox/dao/CommentDao.java
  15. 26 0
      src/main/java/cn/ftebox/dao/LinkDao.java
  16. 13 0
      src/main/java/cn/ftebox/entity/Blogger.java
  17. 16 17
      src/main/java/cn/ftebox/entity/Comment.java
  18. 45 0
      src/main/java/cn/ftebox/entity/Link.java
  19. 2 1
      src/main/java/cn/ftebox/realm/MyRealm.java
  20. 10 0
      src/main/java/cn/ftebox/service/BlogService.java
  21. 27 0
      src/main/java/cn/ftebox/service/BloggerService.java
  22. 1 0
      src/main/java/cn/ftebox/service/CommentService.java
  23. 26 0
      src/main/java/cn/ftebox/service/LinkService.java
  24. 15 0
      src/main/java/cn/ftebox/service/impl/BlogServiceImpl.java
  25. 33 0
      src/main/java/cn/ftebox/service/impl/BloggerServiceImpl.java
  26. 12 5
      src/main/java/cn/ftebox/service/impl/CommentServiceImpl.java
  27. 18 3
      src/main/java/cn/ftebox/service/impl/InitComponent.java
  28. 46 0
      src/main/java/cn/ftebox/service/impl/LinkServiceImpl.java
  29. 4 0
      src/main/java/cn/ftebox/util/Const.java
  30. 15 0
      src/main/java/cn/ftebox/util/DateUtil.java
  31. 37 0
      src/main/java/cn/ftebox/util/PageUtil.java
  32. 8 2
      src/main/java/cn/ftebox/util/StringUtil.java
  33. 16 0
      src/main/resources/cn/ftebox/mappers/BlogMapper.xml
  34. 12 4
      src/main/resources/cn/ftebox/mappers/BlogTypeMapper.xml
  35. 57 1
      src/main/resources/cn/ftebox/mappers/BloggerMapper.xml
  36. 35 78
      src/main/resources/cn/ftebox/mappers/CommentMapper.xml
  37. 59 0
      src/main/resources/cn/ftebox/mappers/LinkMapper.xml
  38. 5 0
      src/main/webapp/WEB-INF/web.xml
  39. 0 0
      src/main/webapp/_tree.json
  40. 1 1
      src/main/webapp/a.jsp
  41. 0 103
      src/main/webapp/about.html
  42. 100 0
      src/main/webapp/about.jsp
  43. 9 8
      src/main/webapp/admin/blogManage.jsp
  44. 19 18
      src/main/webapp/admin/blogTypeManage.jsp
  45. 77 0
      src/main/webapp/admin/commentManage.jsp
  46. 67 0
      src/main/webapp/admin/commentReview.jsp
  47. 154 0
      src/main/webapp/admin/linkManage.jsp
  48. 135 77
      src/main/webapp/admin/main.jsp
  49. 6 4
      src/main/webapp/admin/modifyBlog.jsp
  50. 90 0
      src/main/webapp/admin/modifyInfo.jsp
  51. 0 35
      src/main/webapp/admin/temp/datagrid.json
  52. 0 55
      src/main/webapp/admin/temp/datagrid.php
  53. 0 267
      src/main/webapp/admin/temp/layout1.jsp
  54. 0 252
      src/main/webapp/admin/temp/layout2.jsp
  55. 0 22
      src/main/webapp/admin/temp/layout3.jsp
  56. 0 51
      src/main/webapp/admin/temp/menu.json
  57. 0 51
      src/main/webapp/admin/temp/menu.php
  58. 0 49
      src/main/webapp/admin/temp/tree.json
  59. 0 49
      src/main/webapp/admin/temp/tree.php
  60. 151 0
      src/main/webapp/admin/userManager.jsp
  61. 70 0
      src/main/webapp/admin/userRole.jsp
  62. 7 4
      src/main/webapp/admin/writeBlog.jsp
  63. 0 347
      src/main/webapp/article.html
  64. 234 0
      src/main/webapp/article.jsp
  65. 281 0
      src/main/webapp/article_datali.jsp
  66. 0 250
      src/main/webapp/article_detail.html
  67. 0 191
      src/main/webapp/board.html
  68. 188 0
      src/main/webapp/board.jsp
  69. 0 254
      src/main/webapp/index.html
  70. 128 104
      src/main/webapp/index.jsp
  71. 2 2
      src/main/webapp/login.jsp
  72. 0 240
      src/main/webapp/mood.html
  73. 239 0
      src/main/webapp/mood.jsp
  74. 237 0
      src/main/webapp/register.jsp
  75. BIN
      src/main/webapp/static/uploader/image/111.jpg
  76. BIN
      src/main/webapp/static/uploader/image/9.png
  77. 0 20
      src/main/webapp/test.jsp

+ 14 - 1
.idea/inspectionProfiles/Project_Default.xml

@@ -1,13 +1,26 @@
 <component name="InspectionProjectProfileManager">
   <profile version="1.0">
     <option name="myName" value="Project Default" />
+    <inspection_tool class="CssInvalidPropertyValue" enabled="false" level="ERROR" enabled_by_default="false" />
     <inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
       <option name="myValues">
         <value>
-          <list size="3">
+          <list size="15">
             <item index="0" class="java.lang.String" itemvalue="iconcls" />
             <item index="1" class="java.lang.String" itemvalue="iframe" />
             <item index="2" class="java.lang.String" itemvalue="url" />
+            <item index="3" class="java.lang.String" itemvalue="formatter" />
+            <item index="4" class="java.lang.String" itemvalue="field" />
+            <item index="5" class="java.lang.String" itemvalue="checkbox" />
+            <item index="6" class="java.lang.String" itemvalue="fitcolumns" />
+            <item index="7" class="java.lang.String" itemvalue="rownumbers" />
+            <item index="8" class="java.lang.String" itemvalue="fit" />
+            <item index="9" class="java.lang.String" itemvalue="toolbar" />
+            <item index="10" class="java.lang.String" itemvalue="pagination" />
+            <item index="11" class="java.lang.String" itemvalue="rownumber" />
+            <item index="12" class="java.lang.String" itemvalue="plain" />
+            <item index="13" class="java.lang.String" itemvalue="buttons" />
+            <item index="14" class="java.lang.String" itemvalue="closed" />
           </list>
         </value>
       </option>

+ 0 - 5
.idea/misc.xml

@@ -17,9 +17,4 @@
   <component name="ProjectType">
     <option name="id" value="jpab" />
   </component>
-  <component name="SwUserDefinedSpecifications">
-    <option name="specTypeByUrl">
-      <map />
-    </option>
-  </component>
 </project>

+ 2 - 0
.idea/webContexts.xml

@@ -4,6 +4,8 @@
     <option name="state">
       <map>
         <entry key="file://$PROJECT_DIR$/src/main/webapp/admin/main.jsp" value="file://$PROJECT_DIR$/src/main/webapp/admin" />
+        <entry key="file://$PROJECT_DIR$/src/main/webapp/article_datali.jsp" value="file://$PROJECT_DIR$/src/main/webapp" />
+        <entry key="file://$PROJECT_DIR$/src/main/webapp/index.jsp" value="file://$PROJECT_DIR$/src/main/webapp" />
       </map>
     </option>
   </component>

+ 41 - 0
src/main/java/cn/ftebox/controller/BlogController.java

@@ -0,0 +1,41 @@
+package cn.ftebox.controller;
+
+import cn.ftebox.entity.Blog;
+import cn.ftebox.service.BlogService;
+import cn.ftebox.service.CommentService;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+@Controller
+public class BlogController {
+    @Resource
+    private BlogService blogService;
+    @Resource
+    private CommentService commentService;
+
+    @RequestMapping({"/article_datali.do"})
+    public ModelAndView details(@RequestParam(value = "id", required = false)Integer id, HttpServletRequest request){
+        ModelAndView mav = new ModelAndView();
+        // 根据id查询博客信息
+        Blog blog = blogService.findById(id);
+        mav.addObject("blog",blog);
+        // 点击量+1
+        blog.setClickHit(blog.getClickHit()+1);
+        blogService.update(blog);
+
+        // 查询评论
+        Map<String,Object> map = new HashMap<>();
+        map.put("blogId",blog.getId());
+        map.put("state",1);
+        mav.addObject("commentList",commentService.list(map));
+        return mav;
+    }
+}

+ 24 - 0
src/main/java/cn/ftebox/controller/BloggerController.java

@@ -1,14 +1,21 @@
 package cn.ftebox.controller;
 
+import cn.ftebox.entity.Blog;
 import cn.ftebox.entity.Blogger;
+import cn.ftebox.service.BloggerService;
 import cn.ftebox.util.CryptographyUtil;
+import cn.ftebox.util.ResponseUtil;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.subject.Subject;
+import org.json.JSONObject;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * 博主登录相关
@@ -16,6 +23,9 @@ import javax.servlet.http.HttpServletRequest;
 @Controller
 @RequestMapping("/blogger")
 public class BloggerController {
+    @Resource
+    private BloggerService bloggerService;
+
     @RequestMapping("/login.do")
     public String login(Blogger blogger,HttpServletRequest request) {
         /**用户名*/
@@ -38,4 +48,18 @@ public class BloggerController {
         }
         return "login";
     }
+
+    @RequestMapping({"/register.do"})
+    public String register(Blogger blogger, HttpServletResponse response) throws IOException {
+        blogger.setPassword(CryptographyUtil.md5(blogger.getPassword(),"java1234"));
+        int resultTotal = bloggerService.insert(blogger);
+        JSONObject result = new JSONObject();
+        if (resultTotal > 0) {
+            result.put("success", Boolean.valueOf(true));
+        } else {
+            result.put("error", Boolean.valueOf(false));
+        }
+        ResponseUtil.write(response, result);
+        return null;
+    }
 }

+ 50 - 0
src/main/java/cn/ftebox/controller/CommentController.java

@@ -0,0 +1,50 @@
+package cn.ftebox.controller;
+
+
+import cn.ftebox.entity.Blog;
+import cn.ftebox.entity.Blogger;
+import cn.ftebox.entity.Comment;
+import cn.ftebox.service.BlogService;
+import cn.ftebox.service.CommentService;
+import cn.ftebox.util.Const;
+import cn.ftebox.util.ResponseUtil;
+import org.apache.shiro.SecurityUtils;
+import org.json.JSONObject;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+
+/**
+ * 提交评论
+ */
+@Controller
+@RequestMapping("/comment")
+public class CommentController {
+    @Resource
+    private CommentService commentService;
+    @Resource
+    private BlogService blogService;
+
+    @RequestMapping("/save.do")
+    public String save(Comment comment, HttpServletRequest request, HttpServletResponse response, HttpSession session) throws IOException {
+        Blogger blogger = (Blogger) SecurityUtils.getSubject().getSession().getAttribute(Const.CURRENT_USER);
+        comment.setUserIp(blogger==null?"匿名": blogger.getUserName());
+        int resultTotal = 0;
+        JSONObject result = new JSONObject();
+        if (comment.getId() == null) {
+            resultTotal = commentService.add(comment);
+            Blog blog = blogService.findById(comment.getBlog().getId());
+            blog.setReplyHit(blog.getReplyHit() + 1);
+            blogService.update(blog);
+        }
+        ResponseUtil.write(response,resultTotal > 0?result.put("success",Boolean.TRUE):result.put("error",Boolean.FALSE));
+        return null;
+    }
+
+
+}

+ 63 - 0
src/main/java/cn/ftebox/controller/IndexController.java

@@ -0,0 +1,63 @@
+package cn.ftebox.controller;
+
+import cn.ftebox.entity.Blog;
+import cn.ftebox.entity.Blogger;
+import cn.ftebox.entity.PageBean;
+import cn.ftebox.service.BlogService;
+import cn.ftebox.service.BloggerService;
+import cn.ftebox.util.PageUtil;
+import cn.ftebox.util.StringUtil;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 首页
+ */
+@Controller
+public class IndexController {
+    @Resource
+    private BlogService blogService;
+
+    @RequestMapping({"/index.do"})
+    public ModelAndView index(@RequestParam(value = "page", required = false) String page, HttpServletRequest request) {
+        ModelAndView mav = new ModelAndView();
+        if (StringUtil.isEmpty(page)) {
+            page = "1";
+        }
+        PageBean pageBean = new PageBean(Integer.parseInt(page), 10);
+        Map<String, Object> map = new HashMap<>();
+        map.put("start", pageBean.getStart());
+        map.put("size", pageBean.getPageSize());
+        List<Blog> list = blogService.list(map);
+        String pageCode = PageUtil.genPagination(request.getContextPath()+"index.do",blogService.getTotal(map),Integer.parseInt(page),list.size());
+        mav.addObject("blogList", list);
+        mav.addObject("pageCode",pageCode);
+        return mav;
+    }
+
+    @RequestMapping({"/article.do"})
+    public ModelAndView article(@RequestParam(value = "page", required = false) String page, HttpServletRequest request) {
+        ModelAndView mav = new ModelAndView();
+        if (StringUtil.isEmpty(page)) {
+            page = "1";
+        }
+        PageBean pageBean = new PageBean(Integer.parseInt(page), 10);
+        Map<String, Object> map = new HashMap<>();
+        map.put("start", pageBean.getStart());
+        map.put("size", pageBean.getPageSize());
+        List<Blog> list = blogService.list(map);
+        String pageCode = PageUtil.genPagination(request.getContextPath()+"article.do",blogService.getTotal(map),Integer.parseInt(page),list.size());
+        mav.addObject("blogList", list);
+        mav.addObject("pageCode",pageCode);
+        return mav;
+    }
+}

+ 158 - 0
src/main/java/cn/ftebox/controller/admin/BloggerAdminController.java

@@ -0,0 +1,158 @@
+package cn.ftebox.controller.admin;
+
+import cn.ftebox.entity.*;
+import cn.ftebox.service.BloggerService;
+import cn.ftebox.util.Const;
+import cn.ftebox.util.CryptographyUtil;
+import cn.ftebox.util.DateUtil;
+import cn.ftebox.util.ResponseUtil;
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+@Controller
+@RequestMapping({"/admin/blogger"})
+public class BloggerAdminController {
+    @Resource
+    private BloggerService bloggerService;
+
+
+    /**
+     * 友情链接列表
+     */
+    @RequestMapping({"/list.do"})
+    public String list(@RequestParam(value = "page", required = false) String page, @RequestParam(value = "rows", required = false) String rows, HttpServletResponse response) throws IOException {
+        PageBean pageBean = new PageBean(Integer.parseInt(page), Integer.parseInt(rows));
+        Map<String, Object> map = new HashMap<>();
+        map.put("start", pageBean.getStart());
+        map.put("size", pageBean.getPageSize());
+        // 查询友情链接列表
+        List<Link> bloggerList = bloggerService.list(map);
+        // 查询总共有多少条数据
+        Long total = bloggerService.getTotal(map);
+        // 将数据写入response
+        org.json.JSONObject result = new org.json.JSONObject();
+        JSONArray jsonArray = JSONArray.fromObject(bloggerList);
+        result.put("rows", jsonArray);
+        result.put("total", total);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+
+    /**
+     * 保存用户信息
+     */
+    @RequestMapping({"/save.do"})
+    public String save(@RequestParam("imageFile") MultipartFile imageFile, Blogger blogger, HttpServletRequest request, HttpServletResponse response) throws IOException {
+        if (!imageFile.isEmpty()) {
+            String filePath = request.getServletContext().getRealPath("/");
+            String imageName = DateUtil.getCurrentDateStr() + "." + Objects.requireNonNull(imageFile.getOriginalFilename()).split("\\.")[1];
+            imageFile.transferTo(new File(filePath + "static/uploader/image/" + imageName));
+            blogger.setImageName(imageName);
+        }
+        int resultTotal = bloggerService.update(blogger);
+        StringBuffer result = new StringBuffer();
+        if (resultTotal > 0) {
+            result.append("<script language='javascript'>alert('修改成功')</script>");
+        } else {
+            result.append("<script language='javascript'>alert('修改失败')</script>");
+        }
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    @RequestMapping({"/modify.do"})
+    public String save(Blogger blogger, HttpServletResponse response) throws IOException {
+        int resultTotal = bloggerService.update(blogger);
+        // 将数据写入response
+        org.json.JSONObject result = new org.json.JSONObject();
+        if (resultTotal > 0) {
+            result.put("success", Boolean.valueOf(true));
+        } else {
+            result.put("success", Boolean.valueOf(true));
+        }
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 获取博主的JSON格式
+     */
+    @RequestMapping({"/find.do"})
+    public String find(HttpServletResponse response) throws IOException {
+        Blogger blogger = (Blogger) SecurityUtils.getSubject().getSession().getAttribute(Const.CURRENT_USER);
+        JSONObject result = JSONObject.fromObject(blogger);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 修改密码
+     */
+    @RequestMapping({"/modifyPassword.do"})
+    public String modifyPassword(@RequestParam("id") String id, @RequestParam("newPassword") String newPassword, HttpServletResponse response) throws IOException {
+        Blogger blogger = new Blogger();
+        blogger.setId(Integer.parseInt(id));
+        blogger.setPassword(CryptographyUtil.md5(newPassword, "java1234"));
+        int resultTotal = bloggerService.update(blogger);
+        JSONObject result = new JSONObject();
+        if (resultTotal > 0) {
+            result.put("success", Boolean.TRUE);
+        } else {
+            result.put("success", Boolean.FALSE);
+        }
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 用户退出
+     */
+    @RequestMapping({"/logout.do"})
+    public String logout() {
+        SecurityUtils.getSubject().logout();
+        return "redirect:/login.jsp";
+    }
+
+    @RequestMapping({"/delete.do"})
+    public String delete(@RequestParam("ids") String ids, HttpServletResponse response) throws IOException {
+        String[] idsStr = ids.split(",");
+        org.json.JSONObject result = new org.json.JSONObject();
+        for (String id : idsStr) {
+            bloggerService.delete(Integer.valueOf(id));
+        }
+        result.put("success", Boolean.TRUE);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 修改角色
+     */
+    @RequestMapping({"/review.do"})
+    public String review(@RequestParam("ids") String ids, @RequestParam("state") String state, HttpServletResponse response) throws IOException {
+        String[] idsStr = ids.split(",");
+        Blogger blogger = new Blogger();
+        for (String id : idsStr) {
+            blogger.setId(Integer.parseInt(id));
+            blogger.setUserTag(Integer.parseInt(state));
+            bloggerService.update(blogger);
+        }
+        org.json.JSONObject result = new org.json.JSONObject();
+        result.put("success", Boolean.TRUE);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+}

+ 92 - 0
src/main/java/cn/ftebox/controller/admin/CommentAdminController.java

@@ -0,0 +1,92 @@
+package cn.ftebox.controller.admin;
+
+import cn.ftebox.entity.Comment;
+import cn.ftebox.entity.PageBean;
+import cn.ftebox.service.CommentService;
+import cn.ftebox.util.DateJsonValueProcessor;
+import cn.ftebox.util.ResponseUtil;
+import net.sf.json.JSONArray;
+import net.sf.json.JsonConfig;
+import org.json.JSONObject;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 评论管理
+ */
+@Controller
+@RequestMapping({"admin/comment"})
+public class CommentAdminController {
+    @Resource
+    private CommentService commentService;
+
+    /**
+     * 评论列表
+     */
+    @RequestMapping({"/list.do"})
+    public String list(@RequestParam(value = "page", required = false) String page, @RequestParam(value = "rows", required = false) String rows, @RequestParam(value = "state", required = false) String state, HttpServletResponse response) throws IOException {
+        PageBean pageBean = new PageBean(Integer.parseInt(page), Integer.parseInt(rows));
+        // 加载翻页,状态参数
+        Map<String, Object> map = new HashMap<>();
+        map.put("size", pageBean.getPageSize());
+        map.put("start", pageBean.getStart());
+        map.put("state", state);
+        System.out.println(map);
+        // 查询评论列表
+        List<Comment> commentList = commentService.list(map);
+        // 查询评论总数
+        Long total = commentService.getTotal(map);
+        // 封装成json返回
+        JSONObject result = new JSONObject();
+        JsonConfig config = new JsonConfig();
+        config.registerJsonValueProcessor(Date.class, new DateJsonValueProcessor("yyyy-MM-dd"));
+        JSONArray jsonArray = JSONArray.fromObject(commentList, config);
+        result.put("rows", jsonArray);
+        result.put("total", total);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 删除评论
+     */
+    @RequestMapping({"/delete.do"})
+    public String delete(@RequestParam("ids") String ids, HttpServletResponse response) throws IOException {
+        String[] idsStr = ids.split(",");
+        for (String id : idsStr) {
+            commentService.delete(Integer.parseInt(id));
+        }
+        JSONObject result = new JSONObject();
+        result.put("success", Boolean.TRUE);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 审核评论
+     */
+    @RequestMapping({"/review.do"})
+    public String review(@RequestParam("ids") String ids, @RequestParam("state") String state, HttpServletResponse response) throws IOException {
+        String[] idsStr = ids.split(",");
+        Comment comment = new Comment();
+        for (String id : idsStr) {
+            comment.setId(Integer.parseInt(id));
+            comment.setState(Integer.parseInt(state));
+            commentService.update(comment);
+        }
+        JSONObject result = new JSONObject();
+        result.put("success", Boolean.TRUE);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+}

+ 91 - 0
src/main/java/cn/ftebox/controller/admin/LinkAdminController.java

@@ -0,0 +1,91 @@
+package cn.ftebox.controller.admin;
+
+import cn.ftebox.entity.Link;
+import cn.ftebox.entity.PageBean;
+import cn.ftebox.service.LinkService;
+import cn.ftebox.util.ResponseUtil;
+import net.sf.json.JSONArray;
+import org.json.JSONObject;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 友情链接管理
+ */
+@Controller
+@RequestMapping({"/admin/link"})
+public class LinkAdminController {
+    @Resource
+    private LinkService linkService;
+
+    /**
+     * 友情链接列表
+     */
+    @RequestMapping({"/list.do"})
+    public String list(@RequestParam(value = "page", required = false) String page, @RequestParam(value = "rows", required = false) String rows, HttpServletResponse response) throws IOException {
+        PageBean pageBean = new PageBean(Integer.parseInt(page), Integer.parseInt(rows));
+        Map<String, Object> map = new HashMap<>();
+        map.put("start", pageBean.getStart());
+        map.put("size", pageBean.getPageSize());
+        // 查询友情链接列表
+        List<Link> linkList = linkService.list(map);
+        // 查询总共有多少条数据
+        Long total = linkService.getTotal(map);
+        // 将数据写入response
+        JSONObject result = new JSONObject();
+        JSONArray jsonArray = JSONArray.fromObject(linkList);
+        result.put("rows", jsonArray);
+        result.put("total", total);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 保存友情链接信息
+     */
+    @RequestMapping({"/save.do"})
+    public String save(Link link, HttpServletResponse response) throws IOException {
+        int resultTotal = 0;
+        if (link.getId() == null) {
+            // 添加
+            resultTotal = linkService.add(link);
+        } else {
+            // 更新
+            resultTotal = linkService.update(link);
+        }
+
+        // 将数据写入response
+        JSONObject result = new JSONObject();
+        if (resultTotal > 0) {
+            result.put("success", Boolean.valueOf(true));
+        } else {
+            result.put("success", Boolean.valueOf(true));
+        }
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+    /**
+     * 删除友情链接
+     */
+    @RequestMapping({"/delete.do"})
+    public String delete(@RequestParam("ids") String ids, HttpServletResponse response) throws IOException {
+        String[] idsStr = ids.split(",");
+        JSONObject result = new JSONObject();
+        for (String id : idsStr) {
+            linkService.delete(Integer.valueOf(id));
+        }
+        result.put("success", Boolean.TRUE);
+        ResponseUtil.write(response, result);
+        return null;
+    }
+
+}

+ 21 - 4
src/main/java/cn/ftebox/controller/SystemAdminController.java → src/main/java/cn/ftebox/controller/admin/SystemAdminController.java

@@ -1,7 +1,11 @@
-package cn.ftebox.controller;
+package cn.ftebox.controller.admin;
 
 import cn.ftebox.entity.BlogType;
+import cn.ftebox.entity.Blogger;
+import cn.ftebox.entity.Link;
 import cn.ftebox.service.BlogTypeService;
+import cn.ftebox.service.BloggerService;
+import cn.ftebox.service.LinkService;
 import cn.ftebox.util.Const;
 import cn.ftebox.util.ResponseUtil;
 import org.json.JSONObject;
@@ -22,6 +26,11 @@ import java.util.Objects;
 public class SystemAdminController {
     @Resource
     private BlogTypeService blogTypeService;
+    @Resource
+    private BloggerService bloggerService;
+    @Resource
+    private LinkService linkService;
+
     /**
      * 刷新系统缓存
      */
@@ -30,10 +39,18 @@ public class SystemAdminController {
         ServletContext application = Objects.requireNonNull(RequestContextUtils.findWebApplicationContext(request)).getServletContext();
         List<BlogType> list = blogTypeService.countList();
         assert application != null;
-        application.setAttribute(Const.BLOG_TYPE_COUNT_LIST,list);
+        application.setAttribute(Const.BLOG_TYPE_COUNT_LIST, list);
+
+        Blogger blogger = bloggerService.find();
+        blogger.setPassword(null);
+        application.setAttribute(Const.BLOGGER, blogger);
+
+        List<Link> linkList = linkService.list(null);
+        application.setAttribute(Const.LINK_LIST, linkList);
+
         JSONObject result = new JSONObject();
-        result.put("success",Boolean.TRUE);
-        ResponseUtil.write(response,result);
+        result.put("success", Boolean.TRUE);
+        ResponseUtil.write(response, result);
         return null;
     }
 }

+ 10 - 0
src/main/java/cn/ftebox/dao/BlogDao.java

@@ -46,4 +46,14 @@ public interface BlogDao {
      * 根据类型查询博客数量
      */
     public Integer getBlogByTypeId(Integer typeId);
+
+    /**
+     * 查找上一篇
+     */
+    public Integer getLastBlog(Integer id);
+
+    /**
+     * 查找下一篇
+     */
+    public Integer getNextBlog(Integer id);
 }

+ 31 - 0
src/main/java/cn/ftebox/dao/BloggerDao.java

@@ -1,12 +1,43 @@
 package cn.ftebox.dao;
 
 import cn.ftebox.entity.Blogger;
+import cn.ftebox.entity.Link;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 博主相关
  */
 
 public interface BloggerDao {
+    /**
+     * 根据登录名查询博主对象
+     */
     public Blogger getByUserName(@Param("userName")String userName);
+
+    /**
+     * 更新博主对象
+     */
+    public Integer update(Blogger blogger);
+
+    /**
+     * 查询博主
+     */
+    public Blogger find();
+
+    /**
+     * 新增博主
+     */
+    public Integer insert(Blogger blogger);
+
+    /** 不固定参数查询友情链接列表 */
+    public List<Link> list(Map<String,Object> paramMap);
+
+    /** 不固定参数查询友情链接数 */
+    public Long getTotal(Map<String,Object> paramMap);
+
+    /** 删除一条友情链接 */
+    public Integer delete(Integer id);
 }

+ 5 - 0
src/main/java/cn/ftebox/dao/CommentDao.java

@@ -33,4 +33,9 @@ public interface CommentDao {
      * 删除评论
      */
     public Integer delete(Integer id);
+
+    /**
+     * 根据博客id删除评论
+     */
+    public Integer deleteByBlogId(Integer blogId);
 }

+ 26 - 0
src/main/java/cn/ftebox/dao/LinkDao.java

@@ -0,0 +1,26 @@
+package cn.ftebox.dao;
+
+import cn.ftebox.entity.Link;
+
+import java.util.List;
+import java.util.Map;
+
+public interface LinkDao {
+    /** 根据id查询一条友情链接 */
+    public Link findById(Integer id);
+
+    /** 不固定参数查询友情链接列表 */
+    public List<Link> list(Map<String,Object> paramMap);
+
+    /** 不固定参数查询友情链接数 */
+    public Long getTotal(Map<String,Object> paramMap);
+
+    /** 添加一条友情链接 */
+    public Integer add(Link link);
+
+    /** 修改一条友情链接 */
+    public Integer update(Link link);
+
+    /** 删除一条友情链接 */
+    public Integer delete(Integer id);
+}

+ 13 - 0
src/main/java/cn/ftebox/entity/Blogger.java

@@ -16,6 +16,19 @@ public class Blogger {
     /**头像地址*/
     private String imageName;
 
+    /**
+     * 权限标识
+     */
+    private Integer userTag;
+
+    public Integer getUserTag() {
+        return userTag;
+    }
+
+    public void setUserTag(Integer userTag) {
+        this.userTag = userTag;
+    }
+
     public Integer getId() {
         return id;
     }

+ 16 - 17
src/main/java/cn/ftebox/entity/Comment.java

@@ -23,7 +23,6 @@ public class Comment {
   /** 审核状态 */
   private Integer state;
 
-
   public Integer getId() {
     return id;
   }
@@ -40,22 +39,6 @@ public class Comment {
     this.userIp = userIp;
   }
 
-  public String getContent() {
-    return content;
-  }
-
-  public void setContent(String content) {
-    this.content = content;
-  }
-
-  public Integer getState() {
-    return state;
-  }
-
-  public void setState(Integer state) {
-    this.state = state;
-  }
-
   public Blog getBlog() {
     return blog;
   }
@@ -64,6 +47,14 @@ public class Comment {
     this.blog = blog;
   }
 
+  public String getContent() {
+    return content;
+  }
+
+  public void setContent(String content) {
+    this.content = content;
+  }
+
   public Date getCommentDate() {
     return commentDate;
   }
@@ -71,4 +62,12 @@ public class Comment {
   public void setCommentDate(Date commentDate) {
     this.commentDate = commentDate;
   }
+
+  public Integer getState() {
+    return state;
+  }
+
+  public void setState(Integer state) {
+    this.state = state;
+  }
 }

+ 45 - 0
src/main/java/cn/ftebox/entity/Link.java

@@ -0,0 +1,45 @@
+package cn.ftebox.entity;
+
+
+public class Link {
+
+  private Integer id;
+  private String linkName;
+  private String linkUrl;
+  private Integer orderNo;
+
+
+  public Integer getId() {
+    return id;
+  }
+
+  public void setId(Integer id) {
+    this.id = id;
+  }
+
+
+  public String getLinkName() {
+    return linkName;
+  }
+
+  public void setLinkName(String linkName) {
+    this.linkName = linkName;
+  }
+
+
+  public String getLinkUrl() {
+    return linkUrl;
+  }
+
+  public void setLinkUrl(String linkUrl) {
+    this.linkUrl = linkUrl;
+  }
+
+  public Integer getOrderNo() {
+    return orderNo;
+  }
+
+  public void setOrderNo(Integer orderNo) {
+    this.orderNo = orderNo;
+  }
+}

+ 2 - 1
src/main/java/cn/ftebox/realm/MyRealm.java

@@ -2,6 +2,7 @@ package cn.ftebox.realm;
 
 import cn.ftebox.entity.Blogger;
 import cn.ftebox.service.BloggerService;
+import cn.ftebox.util.Const;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
@@ -37,7 +38,7 @@ public class MyRealm extends AuthorizingRealm {
         //让Shiro去验证账号密码
         Blogger blogger = bloggerService.getByUserName(userName);
         if (blogger!=null){
-            SecurityUtils.getSubject().getSession().setAttribute("currentUser",blogger);
+            SecurityUtils.getSubject().getSession().setAttribute(Const.CURRENT_USER,blogger);
             return new SimpleAuthenticationInfo(blogger.getUserName(),blogger.getPassword(),getName());
         }
         return null;

+ 10 - 0
src/main/java/cn/ftebox/service/BlogService.java

@@ -29,4 +29,14 @@ public interface BlogService {
 
     /** 根据类型查询博客数量 */
     public  Integer getBlogByTypeId(Integer typeId);
+
+    /**
+     * 查找上一篇
+     */
+    public Integer getLastBlog(Integer id);
+
+    /**
+     * 查找下一篇
+     */
+    public Integer getNextBlog(Integer id);
 }

+ 27 - 0
src/main/java/cn/ftebox/service/BloggerService.java

@@ -1,7 +1,34 @@
 package cn.ftebox.service;
 
 import cn.ftebox.entity.Blogger;
+import cn.ftebox.entity.Link;
+
+import java.util.List;
+import java.util.Map;
 
 public interface BloggerService {
     public Blogger getByUserName(String userName);
+    /**
+     * 更新博主对象
+     */
+    public Integer update(Blogger blogger);
+
+    /**
+     * 查询博主
+     */
+    public Blogger find();
+
+    /**
+     * 新增博主
+     */
+    public Integer insert(Blogger blogger);
+
+    /** 不固定参数查询友情链接列表 */
+    public List<Link> list(Map<String,Object> paramMap);
+
+    /** 不固定参数查询友情链接数 */
+    public Long getTotal(Map<String,Object> paramMap);
+
+    /** 删除一条友情链接 */
+    public Integer delete(Integer id);
 }

+ 1 - 0
src/main/java/cn/ftebox/service/CommentService.java

@@ -30,4 +30,5 @@ public interface CommentService {
      * 删除评论
      */
     public Integer delete(Integer id);
+
 }

+ 26 - 0
src/main/java/cn/ftebox/service/LinkService.java

@@ -0,0 +1,26 @@
+package cn.ftebox.service;
+
+import cn.ftebox.entity.Link;
+
+import java.util.List;
+import java.util.Map;
+
+public interface LinkService {
+    /** 根据id查询一条友情链接 */
+    public Link findById(Integer id);
+
+    /** 不固定参数查询友情链接列表 */
+    public List<Link> list(Map<String,Object> paramMap);
+
+    /** 不固定参数查询友情链接数 */
+    public Long getTotal(Map<String,Object> paramMap);
+
+    /** 添加一条友情链接 */
+    public Integer add(Link link);
+
+    /** 修改一条友情链接 */
+    public Integer update(Link link);
+
+    /** 删除一条友情链接 */
+    public Integer delete(Integer id);
+}

+ 15 - 0
src/main/java/cn/ftebox/service/impl/BlogServiceImpl.java

@@ -1,6 +1,7 @@
 package cn.ftebox.service.impl;
 
 import cn.ftebox.dao.BlogDao;
+import cn.ftebox.dao.CommentDao;
 import cn.ftebox.entity.Blog;
 import cn.ftebox.service.BlogService;
 import org.springframework.stereotype.Service;
@@ -11,6 +12,9 @@ import java.util.Map;
 
 @Service("blogService")
 public class BlogServiceImpl implements BlogService {
+    @Resource
+    private CommentDao commentDao;
+
     @Resource
     private BlogDao blogDao;
 
@@ -46,6 +50,7 @@ public class BlogServiceImpl implements BlogService {
 
     @Override
     public Integer delete(Integer id) {
+        commentDao.deleteByBlogId(id);
         return blogDao.delete(id);
     }
 
@@ -54,5 +59,15 @@ public class BlogServiceImpl implements BlogService {
         return blogDao.getBlogByTypeId(typeId);
     }
 
+    @Override
+    public Integer getLastBlog(Integer id) {
+        return blogDao.getLastBlog(id);
+    }
+
+    @Override
+    public Integer getNextBlog(Integer id) {
+        return blogDao.getNextBlog(id);
+    }
+
 
 }

+ 33 - 0
src/main/java/cn/ftebox/service/impl/BloggerServiceImpl.java

@@ -2,10 +2,13 @@ package cn.ftebox.service.impl;
 
 import cn.ftebox.dao.BloggerDao;
 import cn.ftebox.entity.Blogger;
+import cn.ftebox.entity.Link;
 import cn.ftebox.service.BloggerService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
 
 @Service("bloggerService")
 public class BloggerServiceImpl implements BloggerService {
@@ -16,4 +19,34 @@ public class BloggerServiceImpl implements BloggerService {
     public Blogger getByUserName(String userName) {
         return bloggerDao.getByUserName(userName);
     }
+
+    @Override
+    public Integer update(Blogger blogger) {
+        return bloggerDao.update(blogger);
+    }
+
+    @Override
+    public Blogger find() {
+        return bloggerDao.find();
+    }
+
+    @Override
+    public Integer insert(Blogger blogger) {
+        return bloggerDao.insert(blogger);
+    }
+
+    @Override
+    public List<Link> list(Map<String, Object> paramMap) {
+        return bloggerDao.list(paramMap);
+    }
+
+    @Override
+    public Long getTotal(Map<String, Object> paramMap) {
+        return bloggerDao.getTotal(paramMap);
+    }
+
+    @Override
+    public Integer delete(Integer id) {
+        return bloggerDao.delete(id);
+    }
 }

+ 12 - 5
src/main/java/cn/ftebox/service/impl/CommentServiceImpl.java

@@ -1,34 +1,41 @@
 package cn.ftebox.service.impl;
 
+import cn.ftebox.dao.CommentDao;
 import cn.ftebox.entity.Comment;
 import cn.ftebox.service.CommentService;
+import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.List;
 import java.util.Map;
 
+@Service("commentService")
 public class CommentServiceImpl implements CommentService {
+    @Resource
+    private CommentDao commentDao;
+
     @Override
     public int add(Comment comment) {
-        return 0;
+        return commentDao.add(comment);
     }
 
     @Override
     public int update(Comment comment) {
-        return 0;
+        return commentDao.update(comment);
     }
 
     @Override
     public List<Comment> list(Map<String, Object> map) {
-        return null;
+        return commentDao.list(map);
     }
 
     @Override
     public Long getTotal(Map<String, Object> map) {
-        return null;
+        return commentDao.getTotal(map);
     }
 
     @Override
     public Integer delete(Integer id) {
-        return null;
+        return commentDao.delete(id);
     }
 }

+ 18 - 3
src/main/java/cn/ftebox/service/impl/InitComponent.java

@@ -1,7 +1,11 @@
 package cn.ftebox.service.impl;
 
 import cn.ftebox.entity.BlogType;
+import cn.ftebox.entity.Blogger;
+import cn.ftebox.entity.Link;
 import cn.ftebox.service.BlogTypeService;
+import cn.ftebox.service.BloggerService;
+import cn.ftebox.service.LinkService;
 import cn.ftebox.util.Const;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
@@ -14,7 +18,7 @@ import javax.servlet.ServletContextListener;
 import java.util.List;
 
 @Component
-public class InitComponent implements ServletContextListener,ApplicationContextAware{
+public class InitComponent implements ServletContextListener, ApplicationContextAware {
     private static ApplicationContext applicationContext;
 
     @Override
@@ -25,10 +29,21 @@ public class InitComponent implements ServletContextListener,ApplicationContextA
     @Override
     public void contextInitialized(ServletContextEvent sce) {
         ServletContext application = sce.getServletContext();
+        // 博客类别
         BlogTypeService blogTypeService = (BlogTypeService) applicationContext.getBean("blogTypeService");
         List<BlogType> blogTypeList = blogTypeService.countList();
-        System.out.println(blogTypeList);
-        application.setAttribute(Const.BLOG_TYPE_COUNT_LIST,blogTypeList);
+        application.setAttribute(Const.BLOG_TYPE_COUNT_LIST, blogTypeList);
+
+        // 博主信息
+        BloggerService bloggerService = (BloggerService) applicationContext.getBean("bloggerService");
+        Blogger blogger = bloggerService.find();
+        blogger.setPassword(null);
+        application.setAttribute(Const.BLOGGER, blogger);
+
+        // 友情链接
+        LinkService linkService = (LinkService) applicationContext.getBean("linkService");
+        List<Link> linkList = linkService.list(null);
+        application.setAttribute(Const.LINK_LIST, linkList);
     }
 
     @Override

+ 46 - 0
src/main/java/cn/ftebox/service/impl/LinkServiceImpl.java

@@ -0,0 +1,46 @@
+package cn.ftebox.service.impl;
+
+import cn.ftebox.dao.LinkDao;
+import cn.ftebox.entity.Link;
+import cn.ftebox.service.LinkService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Service("linkService")
+public class LinkServiceImpl implements LinkService {
+    @Resource
+    private LinkDao linkDao;
+
+    @Override
+    public Link findById(Integer id) {
+        return linkDao.findById(id);
+    }
+
+    @Override
+    public List<Link> list(Map<String, Object> paramMap) {
+        return linkDao.list(paramMap);
+    }
+
+    @Override
+    public Long getTotal(Map<String, Object> paramMap) {
+        return linkDao.getTotal(paramMap);
+    }
+
+    @Override
+    public Integer add(Link link) {
+        return linkDao.add(link);
+    }
+
+    @Override
+    public Integer update(Link link) {
+        return linkDao.update(link);
+    }
+
+    @Override
+    public Integer delete(Integer id) {
+        return linkDao.delete(id);
+    }
+}

+ 4 - 0
src/main/java/cn/ftebox/util/Const.java

@@ -6,4 +6,8 @@ package cn.ftebox.util;
  */
 public class Const {
     public static final String BLOG_TYPE_COUNT_LIST = "blogTypeCountList";
+    public static final String CURRENT_USER = "currentUser";
+    public static final String BLOGGER = "blogger";
+
+    public static final String LINK_LIST = "linkList";
 }

+ 15 - 0
src/main/java/cn/ftebox/util/DateUtil.java

@@ -0,0 +1,15 @@
+package cn.ftebox.util;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class DateUtil {
+    /**
+     * 得到当前精确到秒的时间字符串
+     */
+    public static String getCurrentDateStr(){
+        Date date = new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
+        return sdf.format(date);
+    }
+}

+ 37 - 0
src/main/java/cn/ftebox/util/PageUtil.java

@@ -0,0 +1,37 @@
+package cn.ftebox.util;
+
+/**
+ * 翻页工具类
+ */
+public class PageUtil {
+    /**
+     * 翻页方法
+     */
+    public static String genPagination(String targetUrl, long totalNum, int currentPage, int pageSize) {
+        // 总页数
+        if (totalNum == 0) {
+            return "未查询到数据!";
+        }
+        long totalPage = totalNum % pageSize + 1L;
+        StringBuffer pageCode = new StringBuffer();
+        // 首页
+        pageCode.append("<a class=\"btn  radius btn-block left\" style=\"width: 15%;float: left;\" href=\"").append(targetUrl).append("?page=1").append("\">首页</a>");
+        // 上一页
+        if (currentPage > 1) {
+            pageCode.append("<a class=\"btn  radius btn-block left\" style=\"width: 30%;float: left;\" href=\"").append(targetUrl).append("?page=").append(currentPage - 1).append("\">上一页</a>");
+        }else{
+            pageCode.append("<a class=\"btn  radius btn-block left\" style=\"width: 30%;float: left;\" href=\"").append(targetUrl).append("?page=1").append("\">上一页</a>");
+        }
+        // 显示页数
+        pageCode.append("<a class=\"btn  radius btn-block left\" style=\"width: 10%;float: left;\">").append(currentPage).append("</a>");
+        // 下一页
+        if (currentPage < totalPage) {
+            pageCode.append("<a class=\"btn  radius btn-block left\" style=\"width: 30%;float: left;\" href=\"").append(targetUrl).append("?page=").append(currentPage + 1).append("\">下一页</a>");
+        }else{
+            pageCode.append("<a class=\"btn  radius btn-block left\" style=\"width: 30%;float: left;\" href=\"").append(targetUrl).append("?page=").append(currentPage).append("\">下一页</a>");
+        }
+        // 尾页
+        pageCode.append("<a class=\"btn  radius btn-block left\" style=\"width: 15%;float: left;\" href=\"").append(targetUrl).append("?page=").append(currentPage).append("\">尾页</a>");
+        return pageCode.toString();
+    }
+}

+ 8 - 2
src/main/java/cn/ftebox/util/StringUtil.java

@@ -12,9 +12,15 @@ public class StringUtil {
     }
 
     /**
-     * 判断字符串是否为空
+     * 判断字符串是否为空
      */
-    private static boolean isNotEmpty(String str) {
+    public static boolean isNotEmpty(String str) {
         return str != null && !"".equals(str.trim());
+    }/**
+
+     * 判断字符串是否为空
+     */
+    public static boolean isEmpty(String str) {
+        return str == null || "".equals(str.trim());
     }
 }

+ 16 - 0
src/main/resources/cn/ftebox/mappers/BlogMapper.xml

@@ -107,4 +107,20 @@
         from t_blog
         where typeId = #{typeId}
     </select>
+
+    <select id="getLastBlog" parameterType="Integer" resultMap="BlogResult">
+        select *
+        from t_blog
+        where id &lt; #{id}
+        order by id desc
+        limit 1
+    </select>
+
+    <select id="getNextBlog" parameterType="Integer" resultMap="BlogResult">
+        select *
+        from t_blog
+        where id &gt; #{id}
+        order by id
+        limit 1
+    </select>
 </mapper>

+ 12 - 4
src/main/resources/cn/ftebox/mappers/BlogTypeMapper.xml

@@ -10,11 +10,19 @@
         <result property="blogCount" column="blogCount"/>
     </resultMap>
     <select id="countList" parameterType="String" resultMap="BlogTypeResult">
-        select t2.id, t2.typeName, count(t1.id) as blogCount
+                select t2.id, t2.typeName, count(t1.id) as blogCount
         from t_blog t1
                  right join t_blogtype t2 on t1.typeId = t2.id
-        group by t2.typeName
-        order by t2.orderNo
+        group by t2.typeName,t2.id
+        order by t2.orderNo,t2.id
+#         SELECT temp.id, temp.typeName, COUNT(*) blogCount
+#         FROM (SELECT bt.id,
+#                      bt.typeName
+#               FROM t_blogtype bt,
+#                    t_blog b
+#               WHERE bt.id = b.typeId
+#               ORDER BY bt.orderNo) temp
+#         GROUP BY temp.typeName,temp.id
     </select>
 
     <select id="findById" parameterType="Integer" resultMap="BlogTypeResult">
@@ -50,7 +58,7 @@
             <if test="typeName!=null and typeName!=''">
                 typeName=#{typeName},
             </if>
-            <if test="orderNo!=null and orderNo!=''">
+            <if test="orderNo!=null">
                 orderNo=#{orderNo},
             </if>
         </set>

+ 57 - 1
src/main/resources/cn/ftebox/mappers/BloggerMapper.xml

@@ -13,7 +13,63 @@
         <result property="imageName" column="imageName"/>
     </resultMap>
     <select id="getByUserName" parameterType="String" resultMap="BloggerResult">
-        select * from  t_blogger where userName=#{userName}
+        select *
+        from t_blogger
+        where userName = #{userName}
     </select>
 
+    <insert id="insert" parameterType="Blogger">
+        insert into t_blogger(userName, password)
+        values (#{userName}, #{password})
+    </insert>
+
+    <update id="update" parameterType="Blogger">
+        update t_blogger
+        <set>
+            <if test="password!=null and password!=''">
+                password=#{password},
+            </if>
+            <if test="nickName!=null and nickName!=''">
+                nickName=#{nickName},
+            </if>
+            <if test="sign!=null and sign!=''">
+                sign=#{sign},
+            </if>
+            <if test="profile!=null and profile!=''">
+                profile=#{profile},
+            </if>
+            <if test="imageName!=null and imageName!=''">
+                imageName=#{imageName},
+            </if>
+            <if test="userTag!=null">
+                userTag=#{userTag},
+            </if>
+        </set>
+        where id=#{id}
+    </update>
+
+    <select id="find" resultMap="BloggerResult">
+        select *
+        from t_blogger limit 1
+    </select>
+
+    <select id="list" parameterType="Map" resultMap="BloggerResult">
+        select * from t_blogger
+        order by id
+        <if test="start!=null and size!=null">
+            limit #{start},${size}
+        </if>
+    </select>
+
+    <select id="getTotal" parameterType="Integer" resultType="long">
+        select count(*)
+        from t_blogger
+    </select>
+
+    <delete id="delete" parameterType="Integer">
+        delete
+        from t_blogger
+        where id = #{id}
+    </delete>
+
 </mapper>

+ 35 - 78
src/main/resources/cn/ftebox/mappers/CommentMapper.xml

@@ -2,109 +2,66 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
 <mapper namespace="cn.ftebox.dao.CommentDao">
     <resultMap id="CommentResult" type="Comment">
         <result property="id" column="id"/>
         <result property="userIp" column="userIp"/>
-        <result property="summary" column="summary"/>
-        <result property="releaseDate" column="releaseDate"/>
-        <result property="clickHit" column="clickHit"/>
-        <result property="replyHit" column="replyHit"/>
         <result property="content" column="content"/>
-        <result property="keyWord" column="keyWord"/>
-        <association property="blogType" column="typeId" select="cn.ftebox.dao.BlogTypeDao.findById"/>
+        <result property="commentDate" column="commentDate"/>
+        <result property="state" column="state"/>
+        <association property="blog" column="blogId" select="cn.ftebox.dao.BlogDao.findById"/>
     </resultMap>
 
-    <select id="countList" resultMap="BlogResult">
-        select date_format(releaseDate, '%Y年%m月') as releaseDataStr, count(*) as blogCount
-        from t_blog
-        group by date_format(releaseDate, '%Y年%m月')
-        order by date_format(releaseDate, '%Y年%m月') desc
-    </select>
+    <insert id="add" parameterType="Comment">
+        insert into t_comment
+        values (null, #{userIp}, #{blog.id}, #{content}, now(), 0)
+    </insert>
 
-    <select id="list" parameterType="Map" resultMap="BlogResult">
-        select * from t_blog
-        <where>
-            <if test="title!=null and title!=''">
-                and title like #{title}
+    <update id="update" parameterType="Comment">
+        update t_comment
+        <set>
+            <if test="state!=null">
+                state=#{state},
             </if>
-            <if test="typeId!=null and typeId!=''">
-                and typeId = #{typeId}
+        </set>
+        where id=#{id}
+    </update>
+
+    <select id="list" parameterType="Map" resultMap="CommentResult">
+        select * from t_comment
+        <where>
+            <if test="blogId!=null">
+                and blogId=#{blogId}
             </if>
-            <if test="releaseDateStr!=null and releaseDateStr!=''">
-                and date_fromat(releaseDate,'%Y年%m月')=#{releaseDateStr}
+            <if test="state!=null">
+                and state=#{state}
             </if>
         </where>
-        order by releaseDate desc
+        order by commentDate
         <if test="start!=null and size!=null">
             limit #{start},#{size}
         </if>
     </select>
 
-    <select id="getTotal" parameterType="Map" resultType="long">
-        select count(*)
-        from t_blog
+    <select id="getTotal" parameterType="Map" resultType="Long">
+        select count(*) from t_comment
         <where>
-            <if test="title!=null and title!=''">
-                and title like #{title}
-            </if>
-            <if test="typeId!=null and typeId!=''">
-                and typeId = #{typeId}
-            </if>
-            <if test="releaseDateStr!=null and releaseDateStr!=''">
-                and date_fromat(releaseDate,'%Y年%m月')=#{releaseDateStr}
+            <if test="state!=null">
+                and state=#{state}
             </if>
         </where>
     </select>
 
-    <select id="findById" parameterType="Integer" resultMap="BlogResult">
-        select *
-        from t_blog
-        where id = #{id}
-    </select>
-
-    <insert id="add" useGeneratedKeys="true" keyProperty="id" parameterType="Blog">
-        insert into t_blog
-        values (null, #{title}, #{summary}, now(), 0, 0, #{content}, #{blogType.id}, #{keyWord})
-    </insert>
-
-    <update id="update" parameterType="Blog">
-        update t_blog
-        <set>
-            <if test="title!=null and title!=''">
-                title=#{title},
-            </if>
-            <if test="summary!=null and summary!=''">
-                summary=#{summary},
-            </if>
-            <if test="content!=null and content!=''">
-                content=#{content},
-            </if>
-            <if test="blogType.id!=null">
-                typeId=#{blogType.id},
-            </if>
-            <if test="clickHit!=null">
-                clickHit=#{clickHit},
-            </if>
-            <if test="replyHit!=null">
-                replyHit=#{replyHit},
-            </if>
-            <if test="keyWord!=null and keyWord!=''">
-                keyWord=#{keyWord},
-            </if>
-        </set>
-        where id=#{id}
-    </update>
-
     <delete id="delete" parameterType="Integer">
         delete
-        from t_blog
+        from t_comment
         where id = #{id}
     </delete>
 
-    <select id="getBlogByTypeId" parameterType="Integer" resultType="Integer">
-        select count(*)
-        from t_blog
-        where typeId = #{typeId}
-    </select>
+    <delete id="deleteByBlogId" parameterType="Integer">
+        delete
+        from t_comment
+        where blogId = #{blogId}
+    </delete>
 </mapper>

+ 59 - 0
src/main/resources/cn/ftebox/mappers/LinkMapper.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ftebox.dao.LinkDao">
+    <resultMap id="LinkResult" type="Link">
+        <result property="id" column="id"/>
+        <result property="linkName" column="linkName"/>
+        <result property="linkUrl" column="linkUrl"/>
+        <result property="orderNo" column="orderNo"/>
+    </resultMap>
+
+    <select id="findById" parameterType="Integer" resultMap="LinkResult">
+        select *
+        from t_Link
+        where id = #{id}
+    </select>
+
+    <select id="list" parameterType="Map" resultMap="LinkResult">
+        select * from t_link
+        order by orderNo
+        <if test="start!=null and size!=null">
+            limit #{start},${size}
+        </if>
+    </select>
+
+    <select id="getTotal" parameterType="Integer" resultType="long">
+        select count(*)
+        from t_Link
+    </select>
+
+    <insert id="add" parameterType="Link">
+        insert into t_Link(linkName, linkUrl, orderNo)
+        values (#{linkName}, #{linkUrl}, #{orderNo})
+    </insert>
+
+    <update id="update" parameterType="Link">
+        update t_link
+        <set>
+            <if test="linkName!=null and linkName!=''">
+               linkName=#{linkName},
+            </if>
+            <if test="linkUrl!=null and linkName!=''">
+               linkUrl=#{linkUrl},
+            </if>
+            <if test="orderNo!=null">
+                orderNo=#{orderNo},
+            </if>
+        </set>
+        where id=#{id}
+    </update>
+
+    <delete id="delete" parameterType="Integer">
+        delete
+        from t_Link
+        where id = #{id}
+    </delete>
+
+</mapper>

+ 5 - 0
src/main/webapp/WEB-INF/web.xml

@@ -7,6 +7,11 @@
          metadata-complete="true">
 
   <display-name>my_blog</display-name>
+  
+  <welcome-file-list>
+    <welcome-file>a.jsp</welcome-file>
+  </welcome-file-list>
+  
   <!-- shiro过滤器定义 -->
   <filter>
     <filter-name>shiroFilter</filter-name>

File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/_tree.json


+ 1 - 1
src/main/webapp/a.jsp

@@ -2,4 +2,4 @@
          pageEncoding="utf-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
-<jsp:include page="/index"></jsp:include>
+<%response.sendRedirect("index.do");%>

+ 0 - 103
src/main/webapp/about.html

@@ -1,103 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>关于我 —  一个站在java开发之路上的草根程序员个人博客网站</title>
-<meta charset="utf-8">
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
-<meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
-<LINK rel="Bookmark" href="favicon.ico" >
-<LINK rel="Shortcut Icon" href="favicon.ico" />
-<!--[if lt IE 9]>
-<script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
-<script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
-<![endif]-->
-<link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
-<link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
-<link rel="stylesheet" type="text/css" href="css/common.css" />
-<link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
-<!--[if lt IE 9]>
-<link href="/staticRes/lib/h-ui/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
-<![endif]-->
-<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
-</head>
-<body>
-<header class="navbar-wrapper">
-    <div class="navbar navbar-fixed-top">
-        <div class="container cl">
-            <a class="navbar-logo hidden-xs" href="index">
-                <img class="logo" src="img/logo.png" alt="Lao王博客" />
-            </a>
-            <a class="logo navbar-logo-m visible-xs" href="index.html">Lao王博客</a>
-            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
-            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
-                <ul class="cl">
-                    <li class="active"> <a href="index" data-hover="首页">首页</a> </li>
-                    <li> <a href="about.html" data-hover="关于我">关于我</a> </li>
-                    <li> <a href="mood.html" data-hover="碎言碎语">碎言碎语</a> </li>
-                    <li><a href="article.html" data-hover="学无止尽">学无止尽</a></li>
-                    <li> <a href="board.html" data-hover="留言板">留言板</a> </li>
-                </ul>
-            </nav>
-            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
-                <ul class="cl">
-                    <li class="userInfo dropDown dropDown_hover">
-                            <!--<a href="javascript:;" ><img class="avatar radius" src="img/40.jpg" alt="丶似浅 "></a>
-                            <ul class="dropDown-menu menu radius box-shadow">
-                                <li><a href="/app/loginOut">退出</a></li>
-                            </ul>-->
-                            <a href="/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" ><img class="avatar size-S" src="img/qq.jpg" title="登入">登入</a>
-                    </li>
-                </ul>
-            </nav>
-        </div>
-    </div>
-</header>
-
-<!--导航条-->
-<nav class="breadcrumb">
-    <div class="container"> <i class="Hui-iconfont">&#xe67f;</i> <a href="index.html" class="c-primary">首页</a> <span class="c-gray en">&gt;</span>  <span class="c-gray">关于</span> </div>
-</nav>
-
-<section class="container">
-    <div class="container-fluid">
-        <div class="about">
-            <h2>Just about me</h2>
-            <ul>
-                <p>一枚正在努力进步的javaWeb程序员。专长领域为Web开发、服务器端开发,目前正在向全栈工程师进发。。。</p>
-            </ul>
-            <h2>About my blog</h2>
-            <ul>
-                <p>域  名:wfyvv.com 注册于2017年02月02日</p>
-                <p>服务器:腾讯云服务器 ,于2017年02月23日完成备案</p>
-                <p>备案号:皖ICP备17002922号</p>
-                <p>本站定位为IT技术博客站,博客内容主要涉及编程语言、前端开发、服务端开发及一些热门技术等方面,同时分享实用的开发资料。</p>
-            </ul>
-            <h2>Contact  me</h2>
-            <ul>
-                <p><i class="Hui-iconfont">&#xe67b;</i>qq : *********暂不公开 : (</p>
-                <p><i class="Hui-iconfont">&#xe6d1;</i>git:https://git.oschina.net/wilco</p>
-                <p><i class="Hui-iconfont">&#xe63b;</i>email : wfyv@qq.com</p>
-            </ul>
-        </div>
-
-    </div>
-</section>
-<footer class="footer mt-20">
-    <div class="container-fluid" id="foot">
-        <p>Copyright &copy; 2016-2017 www.wfyvv.com <br>
-            <a href="#" target="_blank">皖ICP备17002922号</a>  更多模板:<a href="http://www.cssmoban.com/" target="_blank">模板之家</a><br>
-        </p>
-    </div>
-</footer>
-<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
-<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
-<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
-<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
-</body>
-</html>

+ 100 - 0
src/main/webapp/about.jsp

@@ -0,0 +1,100 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/10
+  Time: 14:52
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<!DOCTYPE HTML>
+<html>
+<head>
+    <title>关于我</title>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <meta name="keywords" content="个人博客,纳进财个人博客,个人博客系统,老王博客">
+    <meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
+    <link rel="Bookmark" href="favicon.ico" >
+    <link rel="Shortcut Icon" href="favicon.ico"></link>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/h-ui/css/H-ui.min.css" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/common.css" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/pifu/pifu.css" />
+    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
+</head>
+<body>
+<header class="navbar-wrapper">
+    <div class="navbar navbar-fixed-top">
+        <div class="container cl">
+            <a class="navbar-logo hidden-xs" href="index.do">
+                <img class="logo" src="${pageContext.request.contextPath}/static/img/logo.png" alt="Lao王博客" />
+            </a>
+            <a class="logo navbar-logo-m visible-xs" href="index.do">Lao王博客</a>
+            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
+            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
+                <ul class="cl">
+                    <li> <a href="index.do" data-hover="首页">首页</a> </li>
+                    <li class="active"> <a href="about.jsp" data-hover="关于我">关于我</a> </li>
+                    <li> <a href="mood.jsp" data-hover="碎言碎语">碎言碎语</a> </li>
+                    <li><a href="article.do" data-hover="学无止尽">学无止尽</a></li>
+                    <li> <a href="board.jsp" data-hover="留言板">留言板</a> </li>
+                </ul>
+            </nav>
+            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
+                <ul class="cl">
+                    <li class="userInfo dropDown dropDown_hover">
+                        <a href="${pageContext.request.contextPath}/admin/main.jsp">后台入口</a>
+                    </li>
+                </ul>
+            </nav>
+        </div>
+    </div>
+</header>
+
+<!--导航条-->
+<nav class="breadcrumb">
+    <div class="container"> <i class="Hui-iconfont">&#xe67f;</i> <a href="index.do" class="c-primary">首页</a> <span class="c-gray en">&gt;</span>  <span class="c-gray">关于</span> </div>
+</nav>
+
+<section class="container">
+    <div class="container-fluid">
+        <div class="about">
+            <h2>Just about me</h2>
+            <ul>
+                <p>一枚正在努力进步的javaWeb程序员。专长领域为Web开发、服务器端开发,目前正在向全栈工程师进发。。。</p>
+            </ul>
+            <h2>About my blog</h2>
+            <ul>
+                <p>域  名:ftebox.cn 注册于2020年09月02日</p>
+                <p>服务器:阿里云云服务器 ,于2021年06月23日完成备案</p>
+                <p>备案号:宁ICP备2021002305号-1</p>
+                <p>本站定位为IT技术博客站,博客内容主要涉及编程语言、前端开发、服务端开发及一些热门技术等方面,同时分享实用的开发资料。</p>
+            </ul>
+            <h2>Contact  me</h2>
+            <ul>
+                <p><i class="Hui-iconfont">&#xe67b;</i>qq : *********暂不公开 : (</p>
+                <p><i class="Hui-iconfont">&#xe6d1;</i>git:https://git.oschina.net/wilco</p>
+                <p><i class="Hui-iconfont">&#xe63b;</i>email : ftebox@qq.com</p>
+            </ul>
+        </div>
+
+    </div>
+</section>
+<footer class="footer mt-20">
+    <div class="container-fluid" id="foot">
+        <p>Copyright &copy; 2017-2022 www.ftebox.cn <br>
+            <a href="#" target="_blank">基于SSM框架实现的个人博客系统</a>
+        </p>
+    </div>
+</footer>
+<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
+<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
+<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
+<script type="text/javascript" src="js/common.js"></script>
+<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
+</body>
+</html>

+ 9 - 8
src/main/webapp/admin/blogManage.jsp

@@ -6,7 +6,7 @@
   To change this template use File | Settings | File Templates.
 --%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-
+<body>
 <script type="text/javascript">
 
     function formatBlogType(val, row) {
@@ -17,14 +17,14 @@
      * 根据标题查询
      */
     function searchBlog() {
-        $("#dg").datagrid('load', {"title": $("#s_title").val()});
+        $("#b-dg").datagrid('load', {"title": $("#s_title").val()});
     }
 
     /**
      * 修改一条博客信息
      */
     function openBlogModifyTab() {
-        var selectedRows = $("#dg").datagrid("getSelections");
+        var selectedRows = $("#b-dg").datagrid("getSelections");
         if (selectedRows.length != 1) {
             $.messager.alert("系统提示", "请选择一个要修改的博客!");
             return;
@@ -37,7 +37,7 @@
      * 删除一条博客信息
      */
     function deleteBlog() {
-        var selectedRows = $("#dg").datagrid("getSelections");
+        var selectedRows = $("#b-dg").datagrid("getSelections");
         if (selectedRows.length == 0) {
             $.messager.alert("系统提示", "请选择要删除的博客!");
             return;
@@ -52,7 +52,7 @@
                 $.post("${pageContext.request.contextPath}/admin/blog/delete.do", {ids: ids}, function (result) {
                     if (result.success) {
                         $.messager.alert("系统提示", "数据已经成功删除!");
-                        $("#dg").datagrid("reload");
+                        $("#b-dg").datagrid("reload");
                     } else {
                         $.messager.alert("系统提示", "数据删除失败!");
                     }
@@ -61,8 +61,8 @@
         });
     }
 </script>
-<table id="dg" title="博客管理" class="easyui-datagrid" fitcolumns="true" pagination="true" rownumber="true"
-       toolbar="#tb" url="${pageContext.request.contextPath}/admin/blog/list.do">
+<table id="b-dg" title="博客管理" class="easyui-datagrid" fitcolumns="true" pagination="true" rownumber="true"
+       toolbar="#b-tb" url="${pageContext.request.contextPath}/admin/blog/list.do">
     <thead>
     <tr>
         <th field="cb" checkbox="true" align="center"></th>
@@ -73,7 +73,7 @@
     </tr>
     </thead>
 </table>
-<div id="tb">
+<div id="b-tb">
     <div>
         <a href="javascript:openBlogModifyTab()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
         <a href="javascript:deleteBlog()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
@@ -81,3 +81,4 @@
     &nbsp;标题:&nbsp;<input type="text" id="s_title" size="20" onkeydown="if (event.keyCode===13) searchBlog()"/>
     <a href="javascript:searchBlog()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
 </div>
+</body>

+ 19 - 18
src/main/webapp/admin/blogTypeManage.jsp

@@ -6,6 +6,7 @@
   To change this template use File | Settings | File Templates.
 --%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<body>
 <script>
     var url;
 
@@ -13,7 +14,7 @@
      * "添加"按钮的事件
      */
     function openBlogTypeAddDialog() {
-        $("#dlg").dialog("open").dialog("setTitle", "添加博客类别信息");
+        $("#btdlg").dialog("open").dialog("setTitle", "添加博客类别信息");
         url = "${pageContext.request.contextPath}/admin/blogType/save.do";
     }
 
@@ -21,14 +22,14 @@
      * "修改"按钮的事件
      */
     function openBlogTypeModifyDialog() {
-        var selectedRows = $("#dg").datagrid("getSelections");
+        var selectedRows = $("#btdg").datagrid("getSelections");
         if (selectedRows.length != 1) {
             $.messager.alert("系统提示", "请选择一条要编辑的数据!")
             return;
         }
         var row = selectedRows[0];
-        $("#dlg").dialog("open").dialog("setTitle", "修改博客类别信息");
-        $("#fm").form("load", row);
+        $("#btdlg").dialog("open").dialog("setTitle", "修改博客类别信息");
+        $("#bt-fm").form("load", row);
         url = "${pageContext.request.contextPath}/admin/blogType/save.do?id=" + row.id;
     }
 
@@ -36,7 +37,7 @@
      * 删除按钮事件
      */
     function deleteBlogType() {
-        var selectedRows = $("#dg").datagrid("getSelections");
+        var selectedRows = $("#btdg").datagrid("getSelections");
         if (selectedRows.length == 0) {
             $.messager.alert("系统提示", "请至少选择一条要编辑的数据!");
             return;
@@ -51,7 +52,7 @@
                 $.post("${pageContext.request.contextPath}/admin/blogType/delete.do", {ids: ids}, function (result) {
                     if (result.success) {
                         $.messager.alert("系统提示", "数据已经成功删除!");
-                        $("#dg").datagrid("reload");
+                        $("#btdg").datagrid("reload");
                     } else if (result.exists) {
                         $.messager.alert("系统提示", result.exists);
                     } else {
@@ -66,7 +67,7 @@
      * "保存"按钮事件
      */
     function saveBlogType() {
-        $("#fm").form("submit", {
+        $("#bt-fm").form("submit", {
             url: url,
             onSubmit: function () {
                 return $(this).form("validate");
@@ -76,11 +77,10 @@
                 if (result.success) {
                     $.messager.alert("系统提示", "保存成功!");
                     resetValue();
-                    $("#dlg").dialog("close");
-                    $("#dg").datagrid("reload");
+                    $("#btdlg").dialog("close");
+                    $("#btdg").datagrid("reload");
                 } else {
                     $.messager.alert("系统提示", "保存失败!");
-                    return;
                 }
             }
         });
@@ -90,7 +90,7 @@
      * "关闭"按钮事件
      */
     function closeBlogTypeDialog() {
-        $("#dlg").dialog("close");
+        $("#btdlg").dialog("close");
         resetValue();
     }
 
@@ -102,8 +102,8 @@
         $("#orderNo").val("");
     }
 </script>
-<table id="dg" title="博客类别管理" class="easyui-datagrid" fitcolumns="true" pagination="true" rownumbers="true"
-       url="${pageContext.request.contextPath}/admin/blogType/list.do" fit="true" toolbar="#tb">
+<table id="btdg" title="博客类别管理" class="easyui-datagrid" fitcolumns="true" pagination="true" rownumbers="true"
+       url="${pageContext.request.contextPath}/admin/blogType/list.do" fit="true" toolbar="#bttb">
     <thead>
     <tr>
         <th field="cb" checkbox="true" align="center"></th>
@@ -114,15 +114,15 @@
     </thead>
 </table>
 
-<div id="tb">
+<div id="bttb">
     <a href="javascript:openBlogTypeAddDialog()" class="easyui-linkbutton" iconcls="icon-add" plain="true">添加</a>
     <a href="javascript:openBlogTypeModifyDialog()" class="easyui-linkbutton" iconcls="icon-edit" plain="true">修改</a>
     <a href="javascript:deleteBlogType()" class="easyui-linkbutton" iconcls="icon-remove" plain="true">删除</a>
 </div>
 
-<div id="dlg" class="easyui-dialog" style="width: 350px;height: 200px;padding: 10px 20px;" closed="true"
-     buttons="dlg-buttons">
-    <form id="fm" method="post">
+<div id="btdlg" class="easyui-dialog" style="width: 350px;height: 200px;padding: 10px 20px;" closed="true"
+     buttons="bt-dlg-buttons">
+    <form id="bt-fm" method="post">
         <table cellpadding="8px" style="font-size: 14px">
             <tr>
                 <td>博客类别名称:</td>
@@ -136,10 +136,11 @@
             <tr>注意:类别根据排序序号从小到大排序</tr>
         </table>
     </form>
-    <div id="dlg-buttons">
+    <div id="bt-dlg-buttons">
         <a href="javascript:saveBlogType();" class="easyui-linkbutton" iconcls="icon-ok" style="margin-left: 14%">保存</a>
         <a href="javascript:closeBlogTypeDialog();" class="easyui-linkbutton" iconcls="icon-cancel"
            style="margin-left: 14%">取消</a>
     </div>
 </div>
+</body>
 

+ 77 - 0
src/main/webapp/admin/commentManage.jsp

@@ -0,0 +1,77 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/9
+  Time: 1:58
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<script type="text/javascript">
+    /**
+     * 显示博客标题
+     * @param val
+     * @param row
+     * @returns {*}
+     */
+    function formatBlogTitle(val, row) {
+        return val.title;
+    }
+
+    /**
+     * 显示评论状态
+     */
+    function formatState(val) {
+        if (val === 0) {
+            return "待审核";
+        } else if (val === 1) {
+            return "审核通过";
+        } else {
+            return "审核不通过";
+        }
+    }
+
+    /**
+     * 删除评论
+     */
+    function deleteComment() {
+        var selectedRows = $("#c-dg").datagrid("getSelections");
+        if (selectedRows.length === 0) {
+            $.messager.alert("系统提示", "请至少选择一条要编辑的数据!");
+            return;
+        }
+        var strIds = [];
+        for (var i = 0; i < selectedRows.length; i++) {
+            strIds.push(selectedRows[i].id);
+        }
+        var ids = strIds.join(",");
+        $.messager.confirm("系统提示", "您确定要删除这<font color=red>" + selectedRows.length + "</font>条数据吗?", function (r) {
+            if (r) {
+                $.post("${pageContext.request.contextPath}/admin/comment/delete.do", {ids: ids}, function (result) {
+                    if (result.success) {
+                        $.messager.alert("系统提示", "数据已经成功删除!");
+                        $("#c-dg").datagrid("reload");
+                    } else {
+                        $.messager.alert("系统提示", "数据删除失败!");
+                    }
+                }, "json");
+            }
+        });
+    }
+</script>
+<table id="c-dg" title="评论管理" class="easyui-datagrid" fitcolumns="true" rownumber="true" pagination="true"
+       url="${pageContext.request.contextPath}/admin/comment/list.do" fit="true" toolbar="#c-tb">
+    <thead>
+    <tr>
+        <th field="cb" checkbox="true" align="center"></th>
+        <th field="id" width="20" align="center">编号</th>
+        <th field="blog" width="200" align="center" formatter="formatBlogTitle">博客标题</th>
+        <th field="userIp" width="100" align="center">用户IP</th>
+        <th field="content" width="200" align="center">评论内容</th>
+        <th field="commentDate" width="50" align="center">评论日期</th>
+        <th field="state" width="50" align="center" formatter="formatState">评论状态</th>
+    </tr>
+    </thead>
+</table>
+<div id="c-tb">
+    <a href="javascript:deleteComment()" class="easyui-linkbutton" iconcls="icon-remove" plain="true">删除</a>
+</div>

+ 67 - 0
src/main/webapp/admin/commentReview.jsp

@@ -0,0 +1,67 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/9
+  Time: 10:10
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<script type="text/javascript">
+    /**
+     * 显示博客标题
+     * @param val
+     * @param row
+     * @returns {*}
+     */
+    function formatBlogTitle(val, row) {
+        return val.title;
+    }
+
+    /**
+     * 审核
+     */
+    function commentReview(state) {
+        var selectedRows = $("#cr-dg").datagrid("getSelections");
+        if (selectedRows.length === 0) {
+            $.messager.alert("系统提示", "请至少选择一条要编辑的数据!");
+            return;
+        }
+        var strIds = [];
+        for (var i = 0; i < selectedRows.length; i++) {
+            strIds.push(selectedRows[i].id);
+        }
+        var ids = strIds.join(",");
+        $.messager.confirm("系统提示", "您确定要审核这<font color=red>" + selectedRows.length + "</font>条数据吗?", function (r) {
+            if (r) {
+                $.post("${pageContext.request.contextPath}/admin/comment/review.do", {
+                    ids: ids,
+                    state: state
+                }, function (result) {
+                    if (result.success) {
+                        $.messager.alert("系统提示", "提交成功!");
+                        $("#cr-dg").datagrid("reload");
+                    } else {
+                        $.messager.alert("系统提示", "数据删除失败!");
+                    }
+                }, "json");
+            }
+        });
+    }
+</script>
+<table id="cr-dg" title="评论审核管理" class="easyui-datagrid" fitcolumns="true" rownumber="true" pagination="true"
+       url="${pageContext.request.contextPath}/admin/comment/list.do?state=0" fit="true" toolbar="#cr-tb">
+    <thead>
+    <tr>
+        <th field="cb" checkbox="true" align="center"></th>
+        <th field="id" width="20" align="center">编号</th>
+        <th field="blog" width="200" align="center" formatter="formatBlogTitle">博客标题</th>
+        <th field="userIp" width="100" align="center">用户IP</th>
+        <th field="content" width="200" align="center">评论内容</th>
+        <th field="commentDate" width="50" align="center">评论日期</th>
+    </tr>
+    </thead>
+</table>
+<div id="cr-tb">
+    <a href="javascript:commentReview(1)" class="easyui-linkbutton" iconcls="icon-ok" plain="true">审核通过</a>
+    <a href="javascript:commentReview(2)" class="easyui-linkbutton" iconcls="icon-no" plain="true">审核不通过</a>
+</div>

+ 154 - 0
src/main/webapp/admin/linkManage.jsp

@@ -0,0 +1,154 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/9
+  Time: 19:12
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<script>
+    var url;
+
+    /**
+     * "添加"按钮的事件
+     */
+    function openLinkAddDialog() {
+        $("#l-dlg").dialog("open").dialog("setTitle", "添加友情链接信息");
+        url = "${pageContext.request.contextPath}/admin/link/save.do";
+    }
+
+    /**
+     * "修改"按钮的事件
+     */
+    function openLinkModifyDialog() {
+
+        var selectedRows = $("#dg").datagrid("getSelections");
+        if (selectedRows.length !== 1) {
+            $.messager.alert("系统提示", "请选择一条要编辑的数据!")
+            return;
+        }
+        var row = selectedRows[0];
+        $("#l-dlg").dialog("open").dialog("setTitle", "修改友情链接信息");
+        $("#l-fm").form("load", row);
+        url = "${pageContext.request.contextPath}/admin/link/save.do?id=" + row.id;
+    }
+
+    /**
+     * 删除按钮事件
+     */
+    function deleteLink() {
+        var selectedRows = $("#dg").datagrid("getSelections");
+        if (selectedRows.length === 0) {
+            $.messager.alert("系统提示", "请至少选择一条要编辑的数据!");
+            return;
+        }
+        var strIds = [];
+        for (var i = 0; i < selectedRows.length; i++) {
+            strIds.push(selectedRows[i].id);
+        }
+        var ids = strIds.join(",");
+        $.messager.confirm("系统提示", "您确定要删除这<font color=red>" + selectedRows.length + "</font>条数据吗?", function (r) {
+            if (r) {
+                $.post("${pageContext.request.contextPath}/admin/link/delete.do", {ids: ids}, function (result) {
+                    if (result.success) {
+                        $.messager.alert("系统提示", "数据已经成功删除!");
+                        $("#dg").datagrid("reload");
+                    } else if (result.exists) {
+                        $.messager.alert("系统提示", result.exists);
+                    } else {
+                        $.messager.alert("系统提示", "数据删除失败!");
+                    }
+                }, "json");
+            }
+        });
+    }
+
+    /**
+     * "保存"按钮事件
+     */
+    function saveLink() {
+        $("#l-fm").form("submit", {
+            url: url,
+            onSubmit: function () {
+                return $(this).form("validate");
+            },
+            success: function (result) {
+                var result = eval('(' + result + ')');
+                if (result.success) {
+                    $.messager.alert("系统提示", "保存成功!");
+                    resetValue();
+                    $("#l-dlg").dialog("close");
+                    $("#dg").datagrid("reload");
+                } else {
+                    $.messager.alert("系统提示", "保存失败!");
+                }
+            }
+        });
+    }
+
+    /**
+     * "关闭"按钮事件
+     */
+    function closeLinkDialog() {
+        $("#l-dlg").dialog("close");
+        resetValue();
+    }
+
+    /**
+     * 重置弹出对话框
+     */
+    function resetValue() {
+        $("#linkName").val("");
+        $("#linkUrl").val("");
+        $("#orderNo").val("");
+    }
+</script>
+<table id="dg" title="友情链接管理" class="easyui-datagrid" fitcolumns="true" pagination="true" rownumbers="true"
+       url="${pageContext.request.contextPath}/admin/link/list.do" fit="true" toolbar="#l-tb">
+    <thead>
+    <tr>
+        <th field="cb" checkbox="true" align="center"></th>
+        <th field="id" width="30" align="center">编号</th>
+        <th field="linkName" width="100" align="center">友情链接名称</th>
+        <th field="linkUrl" width="100" align="center">友情链接地址</th>
+        <th field="orderNo" width="100" align="center">排序序号</th>
+    </tr>
+    </thead>
+</table>
+
+<div id="l-tb">
+    <a href="javascript:openLinkAddDialog()" class="easyui-linkbutton" iconcls="icon-add" plain="true">添加</a>
+    <a href="javascript:openLinkModifyDialog()" class="easyui-linkbutton" iconcls="icon-edit" plain="true">修改</a>
+    <a href="javascript:deleteLink()" class="easyui-linkbutton" iconcls="icon-remove" plain="true">删除</a>
+</div>
+
+<div id="l-dlg" class="easyui-dialog" style="width: 350px;height: 250px;padding: 10px 20px;" closed="true"
+     buttons="l-dlg-buttons">
+    <form id="l-fm" method="post">
+        <table cellpadding="8px" style="font-size: 14px">
+            <tr>
+                <td>友情链接名称:</td>
+                <td><input type="text" id="linkName" name="linkName" class="easyui-validatebox" required="true"/>
+                </td>
+            </tr>
+            <tr>
+                <td>友情链接地址:</td>
+                <td><input type="text" id="linkUrl" name="linkUrl" class="easyui-validatebox" required="true"/>
+                </td>
+            </tr>
+            <tr>
+                <td>友情链接排序:</td>
+                <td><input type="text" id="orderNo" name="orderNo" class="easyui-validatebox" required="true"/>
+                </td>
+            </tr>
+            <tr>注意:类别根据排序序号从小到大排序</tr>
+        </table>
+    </form>
+    <div id="l-dlg-buttons">
+        <a href="javascript:saveLink();" class="easyui-linkbutton" iconcls="icon-ok" style="margin-left: 14%">保存</a>
+        <a href="javascript:closeLinkDialog();" class="easyui-linkbutton" iconcls="icon-cancel"
+           style="margin-left: 14%">取消</a>
+    </div>
+</div>
+
+

+ 135 - 77
src/main/webapp/admin/main.jsp

@@ -1,3 +1,4 @@
+<%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %>
 <%--
   Created by IntelliJ IDEA.
   User: njc
@@ -37,7 +38,70 @@
                 } else {
                     $.messager.alert("系统提示", "刷新失败!!");
                 }
-            },"json");
+            }, "json");
+        }
+
+        /**
+         * 打开修改密码对话框
+         */
+        function openPasswordModifyDialog() {
+            $("#dlg").dialog("open").dialog("setTitle", "修改密码");
+            url = "${pageContext.request.contextPath}/admin/blogger/modifyPassword.do?id=${currentUser.id}"
+        }
+
+        /**
+         * 修改密码
+         */
+        function modifyPassword() {
+            $("#fm").form("submit", {
+                url: url,
+                onSubmit: function () {
+                    var newPassword = $("#newPassword").val();
+                    var renewPassword = $("#reNewPassword").val();
+                    if (!$(this).form("validate")) {
+                        return false;
+                    }
+                    if (newPassword != renewPassword) {
+                        $.messager.alert("系统提示", "两次密码不一致!")
+                        return false;
+                    }
+                    return true;
+                },
+                success: function (result) {
+                    var result = eval('(' + result + ')');
+                    if (result.success) {
+                        $.messager.alert("系统提示", "密码修改成功,下次登录生效!");
+                        closePasswordModifyDialog();
+                    } else {
+                        $.messager.alert("系统提示", "密码修改失败!");
+                    }
+                }
+            });
+        }
+
+        // 清空数据框
+        function resetValue() {
+            $("#newPassword").val("");
+            $("#reNewPassword").val("");
+        }
+
+        /**
+         * 关闭按钮
+         */
+        function closePasswordModifyDialog() {
+            resetValue();
+            $("#dlg").dialog("close");
+        }
+
+        /**
+         * 退出系统
+         */
+        function logout() {
+            $.messager.confirm("系统提示", "您确定要退出系统嘛?", function (r) {
+                if (r) {
+                    window.location.href = "${pageContext.request.contextPath}/admin/blogger/logout.do"
+                }
+            });
         }
     </script>
 </head>
@@ -49,8 +113,8 @@
         <h1>博客后台管理</h1>
     </div>
     <div class="wu-header-right">
-        <p><strong class="easyui-tooltip" title="2条未读消息">admin</strong>,欢迎您!</p>
-        <p><a href="#">网站首页</a>|<a href="#">安全退出</a></p>
+        <p><strong class="easyui-tooltip">${currentUser.userName}</strong>,欢迎您!</p>
+        <p><a href="${pageContext.request.contextPath}/index.do">网站首页</a>|<a href="javascript:logout()">安全退出</a></p>
     </div>
 </div>
 <!-- end of header -->
@@ -70,21 +134,25 @@
             </ul>
         </div>
 
-        <div title="博客类别管理" data-options="iconCls:'icon-application-form-edit'" style="padding:5px;">
-            <ul class="easyui-tree wu-side-tree">
-                <li iconCls="icon-chart-organisation">
-                    <a href="javascript:void(0)" data-icon="icon-chart-organisation"
-                       data-link="blogTypeManage.jsp" iframe="0">博客类别信息管理</a>
-                </li>
-            </ul>
-        </div>
+        <C:if test="${currentUser.userTag == 1}">
+            <div title="博客类别管理" data-options="iconCls:'icon-application-form-edit'" style="padding:5px;">
+                <ul class="easyui-tree wu-side-tree">
+                    <li iconCls="icon-chart-organisation">
+                        <a href="javascript:void(0)" data-icon="icon-chart-organisation"
+                           data-link="blogTypeManage.jsp" iframe="0">博客类别信息管理</a>
+                    </li>
+                </ul>
+            </div>
+        </C:if>
 
         <div title="评论管理" data-options="iconCls:'icon-creditcards'" style="padding:5px;">
             <ul class="easyui-tree wu-side-tree">
-                <li iconCls="icon-chart-organisation">
-                    <a href="javascript:void(0)" data-icon="icon-chart-organisation"
-                       data-link="commentReview.jsp" iframe="0">评论审核</a>
-                </li>
+                <C:if test="${currentUser.userTag == 1}">
+                    <li iconCls="icon-chart-organisation">
+                        <a href="javascript:void(0)" data-icon="icon-chart-organisation"
+                           data-link="commentReview.jsp" iframe="0">评论审核</a>
+                    </li>
+                </C:if>
                 <li iconCls="icon-users">
                     <a href="javascript:void(0)" data-icon="icon-users"
                        data-link="commentManage.jsp" iframe="0">评论信息管理</a>
@@ -100,76 +168,38 @@
                 </li>
             </ul>
         </div>
+
+        <!-- 这是新增代码 -->
+        <C:if test="${currentUser.userTag == 1}">
+            <div title="用户管理" data-options="iconCls:'icon-creditcards'" style="padding:5px;">
+                <ul class="easyui-tree wu-side-tree">
+                    <li iconCls="icon-chart-organisation">
+                        <a href="javascript:void(0)" data-icon="icon-chart-organisation"
+                           data-link="userManager.jsp" iframe="0">修改用户</a>
+                    </li>
+                    <li iconCls="icon-users">
+                        <a href="javascript:void(0)" data-icon="icon-users"
+                           data-link="userRole.jsp" iframe="0">角色修改</a>
+                    </li>
+                </ul>
+            </div>
+        </C:if>
+        <!-- 新增代码结束 -->
         <div title="系统管理" data-options="iconCls:'icon-bricks'" style="padding:5px;">
-            <a href="javascript:addTab('友情链接管理','123.jsp','icon-edit')" class="easyui-linkbutton"
-               data-options="plain:true"
-               iconCls="icon-edit">友情链接管理</a>
-            <a href="javascript:addTab('修改密码','123.jsp','icon-edit')" class="easyui-linkbutton"
+            <C:if test="${currentUser.userTag == 1}">
+                <a href="javascript:addTab('友情链接管理','linkManage.jsp','icon-edit')" class="easyui-linkbutton"
+                   data-options="plain:true"
+                   iconCls="icon-edit">友情链接管理</a>
+            </C:if>
+            <a href="javascript:openPasswordModifyDialog()" class="easyui-linkbutton"
                data-options="plain:true"
                iconCls="icon-edit">修改密码</a>
             <a iconCls="icon-refresh" href="javascript:refreshSystem()" data-options="plain:true"
                class="easyui-linkbutton">刷新系统缓存</a>
-            <a href="javascript:addTab('安全退出','123.jsp','icon-edit')" class="easyui-linkbutton"
+            <a href="javascript:logout()" class="easyui-linkbutton"
                data-options="plain:true"
                iconCls="icon-edit">安全退出</a>
         </div>
-        <%--        <div title="报表中心" data-options="iconCls:'icon-chart-curve'" style="padding:5px;">--%>
-        <%--            <ul class="easyui-tree wu-side-tree">--%>
-        <%--                <li iconCls="icon-chart-organisation">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-chart-organisation"--%>
-        <%--                       data-link="layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-users">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-users"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-user-group">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-user-group"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-book">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-book"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-cog">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-cog" data-link="temp/layout-3.html"--%>
-        <%--                       iframe="0">导航标题</a></li>--%>
-        <%--                <li iconCls="icon-application-osx-error">--%>
-        <%--                    <a href="javascript:void(0)"--%>
-        <%--                       data-icon="icon-application-osx-error"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--            </ul>--%>
-        <%--        </div>--%>
-        <%--        <div title="系统设置" data-options="iconCls:'icon-wrench'" style="padding:5px;">--%>
-        <%--            <ul class="easyui-tree wu-side-tree">--%>
-        <%--                <li iconCls="icon-chart-organisation">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-chart-organisation"--%>
-        <%--                       data-link="layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-users">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-users"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-user-group">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-user-group"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-book">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-book"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-cog">--%>
-        <%--                    <a href="javascript:void(0)" data-icon="icon-cog" data-link="temp/layout-3.html"--%>
-        <%--                       iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--                <li iconCls="icon-application-osx-error">--%>
-        <%--                    <a href="javascript:void(0)"--%>
-        <%--                       data-icon="icon-application-osx-error"--%>
-        <%--                       data-link="temp/layout-3.html" iframe="0">导航标题</a>--%>
-        <%--                </li>--%>
-        <%--            </ul>--%>
-        <%--        </div>--%>
     </div>
 </div>
 <!-- end of sidebar -->
@@ -185,6 +215,34 @@
     &copy; 2022 纳进财基于SSM实现的博客系统
 </div>
 <!-- end of footer -->
+<!-- 修改密码对话框 -->
+<div id="dlg" class="easyui-dialog" style="width: 400px;height: 200px;padding: 10px 20px;" closed="true"
+     buttons="#dlg-buttons">
+    <form id="fm" method="post">
+        <table cellspacing="8px">
+            <tr>
+                <td>用户名:</td>
+                <td><input type="text" id="userName" name="userName" readonly="readonly"
+                           value="${currentUser.userName}" style="200px"></td>
+            </tr>
+            <tr>
+                <td>新密码:</td>
+                <td><input type="password" id="newPassword" name="newPassword" class="easyui-validatebox"
+                           required="true" value="${currentUser.userName}" style="200px"></td>
+            </tr>
+            <tr>
+                <td>确认新密码:</td>
+                <td><input type="password" id="reNewPassword" name="reNewPassword" class="easyui-validatebox"
+                           required="true" value="${currentUser.userName}" style="200px"></td>
+            </tr>
+        </table>
+    </form>
+</div>
+
+<div id="dlg-buttons">
+    <a href="javascript:modifyPassword()" class="easyui-linkbutton" iconcls="icon-ok">保存</a>
+    <a href="javascript:closePasswordModifyDialog()" class="easyui-linkbutton" iconcls="icon-cancel">取消</a>
+</div>
 <script type="text/javascript">
     $(function () {
         $('.wu-side-tree a').bind("click", function () {

+ 6 - 4
src/main/webapp/admin/modifyBlog.jsp

@@ -8,6 +8,7 @@
 --%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<body>
 <script type="text/javascript">
     /**
      * 发布博客
@@ -41,7 +42,7 @@
         }
     }
 </script>
-<div id="p" class="easyui-panel" title="修改博客" style="padding: 10px">
+<div id="mb-p" class="easyui-panel" title="修改博客" style="padding: 10px">
     <table cellspacing="20px">
         <tr>
             <td width="80px">博客标题</td>
@@ -71,7 +72,7 @@
         </tr>
         <tr>
             <td></td>
-            <td><a href="javascript:submitData()" class="easyui-lunkbutton"
+            <td><a href="javascript:submitData()" class="easyui-linkbutton"
                    data-options="iconCls:'icon-submit'">提交修改</a></td>
         </tr>
     </table>
@@ -85,7 +86,7 @@
         UE.ajax.request("${pageContext.request.contextPath}/admin/blog/findById.do",
             {
                 method: "post",
-                asyc: false,
+                async: false,
                 data: {"id": "${param.id}"},
                 onsuccess: function (result) {
                     result = eval("(" + result.responseText + ")");
@@ -97,4 +98,5 @@
             }
         );
     });
-</script>
+</script>
+</body>

+ 90 - 0
src/main/webapp/admin/modifyInfo.jsp

@@ -0,0 +1,90 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/9
+  Time: 11:24
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<body>
+<script type="text/javascript">
+    /**
+     * 提交博主信息
+     */
+    function submitData() {
+        var nickName = $("#nickName").val();
+        var sign = $("#sign").val();
+        var proFile = UE.getEditor("editor").getContent();
+        console.log(proFile);
+        if (nickName == null || nickName === "") {
+            $.messager.alert("系统提示", "请输入昵称!");
+        } else if (sign == null || sign === "") {
+            $.messager.alert("系统提示", "请输入个性签名!");
+        } else if (proFile == null || proFile === "") {
+            $.messager.alert("系统提示", "请输入简介!");
+        } else {
+            $("#profile").val(proFile);
+            $("#form1").submit();
+        }
+    }
+</script>
+<div id="p" class="easyui-panel" title="修改个人信息" style="padding: 10px">
+    <form id="form1" action="${pageContext.request.contextPath}/admin/blogger/save.do" method="post"
+          enctype="multipart/form-data">
+        <input type="hidden" id="id" name="id" value="${currentUser.id}"/>
+        <input type="hidden" id="profile" name="profile"/>
+        <table cellspacing="20px">
+            <tr>
+                <td width="80px">用户名:</td>
+                <td><input type="text" id="title" name="title" style="width: 200px;" value="${currentUser.userName}"
+                           readonly="readonly"/></td>
+            </tr>
+            <tr>
+                <td>昵称:</td>
+                <td><input type="text" id="nickName" name="nickName" style="width: 200px;"
+                           value="${currentUser.nickName}"/></td>
+            </tr>
+            <tr>
+                <td>个性签名:</td>
+                <td><input type="text" id="sign" name="sign" style="width: 400px;" value="${currentUser.sign}"/></td>
+            </tr>
+            <tr>
+                <td>个人头像:</td>
+                <td><input type="file" id="imageFile" name="imageFile" style="width: 400px;"/></td>
+            </tr>
+            <tr>
+                <td>个人简介:</td>
+                <td>
+                    <script id="editor" type="text/plain" style="width: 100%;height: 500px;"></script>
+                </td>
+            </tr>
+            <tr>
+                <td></td>
+                <td><a href="javascript:submitData()" class="easyui-linkbutton"
+                       data-options="iconCls:'icon-submit'">确认修改</a></td>
+            </tr>
+        </table>
+    </form>
+</div>
+
+<script type="text/javascript">
+    // 实例化编辑器
+    var ue = UE.getEditor("editor");
+    ue.addListener("ready", function () {
+        // 通过axaj获取数据
+        UE.ajax.request("${pageContext.request.contextPath}/admin/blogger/find.do",
+            {
+                method: "post",
+                async: false,
+                data: {},
+                onsuccess: function (result) {
+                    result = eval("(" + result.responseText + ")");
+                    UE.getEditor("editor").setContent(result.profile);
+                }
+            }
+        );
+    });
+</script>
+</body>

+ 0 - 35
src/main/webapp/admin/temp/datagrid.json

@@ -1,35 +0,0 @@
-{
-	"total":30,
-	"rows":[
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
-	{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
-	{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
-	{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
-	]
-}

+ 0 - 55
src/main/webapp/admin/temp/datagrid.php

@@ -1,55 +0,0 @@
-{
-	"total":50,
-	"rows":[
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
-	{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
-	{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"},
-	{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
-	{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
-	{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
-	{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
-	{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
-	{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
-	{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
-	]
-}

+ 0 - 267
src/main/webapp/admin/temp/layout1.jsp

@@ -1,267 +0,0 @@
-<%--
-  Created by IntelliJ IDEA.
-  User: njc
-  Date: 2022/5/6
-  Time: 17:12
-  To change this template use File | Settings | File Templates.
---%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<div class="easyui-layout" data-options="fit:true">
-    <div data-options="region:'west',border:true,split:true," title="分类管理" style="width:150px; padding:5px;">
-        <ul id="wu-category-tree" class="easyui-tree"></ul>
-    </div>
-    <div data-options="region:'center',border:false">
-        <!-- Begin of toolbar -->
-        <div id="wu-toolbar">
-            <div class="wu-toolbar-button">
-                <a href="#" class="easyui-linkbutton" iconCls="icon-add" onclick="openAdd()" plain="true">添加</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="openEdit()" plain="true">修改</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-remove" onclick="remove()" plain="true">删除</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="cancel()" plain="true">取消</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-reload" onclick="reload()" plain="true">刷新</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-print" onclick="openAdd()" plain="true">打印</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-help" onclick="openEdit()" plain="true">帮助</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="remove()" plain="true">撤销</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-redo" onclick="cancel()" plain="true">重做</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-sum" onclick="reload()" plain="true">总计</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-back" onclick="reload()" plain="true">返回</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-tip" onclick="reload()" plain="true">提示</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="reload()" plain="true">保存</a>
-                <a href="#" class="easyui-linkbutton" iconCls="icon-cut" onclick="reload()" plain="true">剪切</a>
-            </div>
-            <div class="wu-toolbar-search">
-                <label>起始时间:</label><input class="easyui-datebox" style="width:100px">
-                <label>结束时间:</label><input class="easyui-datebox" style="width:100px">
-                <label>用户组:</label>
-                <select class="easyui-combobox" panelHeight="auto" style="width:100px">
-                    <option value="0">选择用户组</option>
-                    <option value="1">黄钻</option>
-                    <option value="2">红钻</option>
-                    <option value="3">蓝钻</option>
-                </select>
-                <label>关键词:</label><input class="wu-text" style="width:100px">
-                <a href="#" class="easyui-linkbutton" iconCls="icon-search">开始检索</a>
-            </div>
-        </div>
-        <!-- End of toolbar -->
-        <table id="wu-datagrid" toolbar="#wu-toolbar"></table>
-    </div>
-</div>
-<!-- Begin of easyui-dialog -->
-<div id="wu-dialog" class="easyui-dialog" data-options="closed:true,iconCls:'icon-save'" style="width:400px; padding:10px;">
-    <form id="wu-form" method="post">
-        <table>
-            <tr>
-                <td width="60" align="right">姓 名:</td>
-                <td><input type="text" name="name" class="wu-text" /></td>
-            </tr>
-            <tr>
-                <td align="right">邮 箱:</td>
-                <td><input type="text" name="email" class="wu-text" /></td>
-            </tr>
-            <tr>
-                <td align="right">主 题:</td>
-                <td><input type="text" name="subject" class="wu-text" /></td>
-            </tr>
-            <tr>
-                <td valign="top" align="right">内 容:</td>
-                <td><textarea name="content" rows="6" class="wu-textarea" style="width:260px"></textarea></td>
-            </tr>
-        </table>
-    </form>
-</div>
-<!-- End of easyui-dialog -->
-<script type="text/javascript">
-    /**
-     * Name 载入菜单树
-     */
-    $('#wu-category-tree').tree({
-        url:'temp/menu.php',
-        onClick:function(node){
-            alert(node.text);
-        }
-    });
-
-    /**
-     * Name 添加记录
-     */
-    function add(){
-        $('#wu-form').form('submit', {
-            url:'',
-            success:function(data){
-                if(data){
-                    $.messager.alert('信息提示','提交成功!','info');
-                    $('#wu-dialog').dialog('close');
-                }
-                else
-                {
-                    $.messager.alert('信息提示','提交失败!','info');
-                }
-            }
-        });
-    }
-
-    /**
-     * Name 修改记录
-     */
-    function edit(){
-        $('#wu-form').form('submit', {
-            url:'',
-            success:function(data){
-                if(data){
-                    $.messager.alert('信息提示','提交成功!','info');
-                    $('#wu-dialog').dialog('close');
-                }
-                else
-                {
-                    $.messager.alert('信息提示','提交失败!','info');
-                }
-            }
-        });
-    }
-
-    /**
-     * Name 删除记录
-     */
-    function remove(){
-        $.messager.confirm('信息提示','确定要删除该记录?', function(result){
-            if(result){
-                var items = $('#wu-datagrid').datagrid('getSelections');
-                var ids = [];
-                $(items).each(function(){
-                    ids.push(this.productid);
-                });
-                //alert(ids);return;
-                $.ajax({
-                    url:'',
-                    data:'',
-                    success:function(data){
-                        if(data){
-                            $.messager.alert('信息提示','删除成功!','info');
-                        }
-                        else
-                        {
-                            $.messager.alert('信息提示','删除失败!','info');
-                        }
-                    }
-                });
-            }
-        });
-    }
-
-    /**
-     * Name 打开添加窗口
-     */
-    function openAdd(){
-        $('#wu-form').form('clear');
-        $('#wu-dialog').dialog({
-            closed: false,
-            modal:true,
-            title: "添加信息",
-            buttons: [{
-                text: '确定',
-                iconCls: 'icon-ok',
-                handler: add
-            }, {
-                text: '取消',
-                iconCls: 'icon-cancel',
-                handler: function () {
-                    $('#wu-dialog').dialog('close');
-                }
-            }]
-        });
-    }
-
-    /**
-     * Name 打开修改窗口
-     */
-    function openEdit(){
-        $('#wu-form').form('clear');
-        var item = $('#wu-datagrid').datagrid('getSelected');
-        //alert(item.productid);return;
-        $.ajax({
-            url:'',
-            data:'',
-            success:function(data){
-                if(data){
-                    $('#wu-dialog').dialog('close');
-                }
-                else{
-                    //绑定值
-                    $('#wu-form').form('load', data)
-                }
-            }
-        });
-        $('#wu-dialog').dialog({
-            closed: false,
-            modal:true,
-            title: "修改信息",
-            buttons: [{
-                text: '确定',
-                iconCls: 'icon-ok',
-                handler: edit
-            }, {
-                text: '取消',
-                iconCls: 'icon-cancel',
-                handler: function () {
-                    $('#wu-dialog').dialog('close');
-                }
-            }]
-        });
-    }
-
-    /**
-     * Name 分页过滤器
-     */
-    function pagerFilter(data){
-        if (typeof data.length == 'number' && typeof data.splice == 'function'){// is array
-            data = {
-                total: data.length,
-                rows: data
-            }
-        }
-        var dg = $(this);
-        var opts = dg.datagrid('options');
-        var pager = dg.datagrid('getPager');
-        pager.pagination({
-            onSelectPage:function(pageNum, pageSize){
-                opts.pageNumber = pageNum;
-                opts.pageSize = pageSize;
-                pager.pagination('refresh',{pageNumber:pageNum,pageSize:pageSize});
-                dg.datagrid('loadData',data);
-            }
-        });
-        if (!data.originalRows){
-            data.originalRows = (data.rows);
-        }
-        var start = (opts.pageNumber-1)*parseInt(opts.pageSize);
-        var end = start + parseInt(opts.pageSize);
-        data.rows = (data.originalRows.slice(start, end));
-        return data;
-    }
-
-    /**
-     * Name 载入数据
-     */
-    $('#wu-datagrid').datagrid({
-        url:'temp/datagrid.php',
-        loadFilter:pagerFilter,
-        rownumbers:true,
-        singleSelect:false,
-        pageSize:20,
-        pagination:true,
-        multiSort:true,
-        fitColumns:true,
-        fit:true,
-        columns:[[
-            { checkbox:true},
-            { field:'productid',title:'productid',width:100,sortable:true},
-            { field:'productname',title:'productname',width:180,sortable:true},
-            { field:'unitcost',title:'unitcost',width:100},
-            { field:'listprice',title:'listprice',width:100},
-            { field:'attr1',title:'attr1',width:100},
-            { field:'itemid',title:'itemid',width:100},
-            { field:'status',title:'status',width:100}
-        ]]
-    });
-</script>

+ 0 - 252
src/main/webapp/admin/temp/layout2.jsp

@@ -1,252 +0,0 @@
-<%--
-  Created by IntelliJ IDEA.
-  User: njc
-  Date: 2022/5/6
-  Time: 17:19
-  To change this template use File | Settings | File Templates.
---%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<div class="easyui-layout" data-options="fit:true">
-  <!-- Begin of toolbar -->
-  <div id="wu-toolbar-2">
-    <div class="wu-toolbar-button">
-      <a href="#" class="easyui-linkbutton" iconCls="icon-add" onclick="openAdd()" plain="true">添加</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="openEdit()" plain="true">修改</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-remove" onclick="remove()" plain="true">删除</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="cancel()" plain="true">取消</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-reload" onclick="reload()" plain="true">刷新</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-print" onclick="openAdd()" plain="true">打印</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-help" onclick="openEdit()" plain="true">帮助</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="remove()" plain="true">撤销</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-redo" onclick="cancel()" plain="true">重做</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-sum" onclick="reload()" plain="true">总计</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-back" onclick="reload()" plain="true">返回</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-tip" onclick="reload()" plain="true">提示</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="reload()" plain="true">保存</a>
-      <a href="#" class="easyui-linkbutton" iconCls="icon-cut" onclick="reload()" plain="true">剪切</a>
-    </div>
-    <div class="wu-toolbar-search">
-      <label>起始时间:</label><input class="easyui-datebox" style="width:100px">
-      <label>结束时间:</label><input class="easyui-datebox" style="width:100px">
-      <label>用户组:</label>
-      <select class="easyui-combobox" panelHeight="auto" style="width:100px">
-        <option value="0">选择用户组</option>
-        <option value="1">黄钻</option>
-        <option value="2">红钻</option>
-        <option value="3">蓝钻</option>
-      </select>
-      <label>关键词:</label><input class="wu-text" style="width:100px">
-      <a href="#" class="easyui-linkbutton" iconCls="icon-search">开始检索</a>
-    </div>
-  </div>
-  <!-- End of toolbar -->
-  <table id="wu-datagrid-2" class="easyui-datagrid" toolbar="#wu-toolbar-2"></table>
-</div>
-<!-- Begin of easyui-dialog -->
-<div id="wu-dialog-2" class="easyui-dialog" data-options="closed:true,iconCls:'icon-save'" style="width:400px; padding:10px;">
-  <form id="wu-form-2" method="post">
-    <table>
-      <tr>
-        <td width="60" align="right">姓 名:</td>
-        <td><input type="text" name="name" class="wu-text" /></td>
-      </tr>
-      <tr>
-        <td align="right">邮 箱:</td>
-        <td><input type="text" name="email" class="wu-text" /></td>
-      </tr>
-      <tr>
-        <td align="right">主 题:</td>
-        <td><input type="text" name="subject" class="wu-text" /></td>
-      </tr>
-      <tr>
-        <td valign="top" align="right">内 容:</td>
-        <td><textarea name="content" rows="6" class="wu-textarea" style="width:260px"></textarea></td>
-      </tr>
-    </table>
-  </form>
-</div>
-<!-- End of easyui-dialog -->
-<script type="text/javascript">
-  /**
-   * Name 添加记录
-   */
-  function add(){
-    $('#wu-form-2').form('submit', {
-      url:'',
-      success:function(data){
-        if(data){
-          $.messager.alert('信息提示','提交成功!','info');
-          $('#wu-dialog-2').dialog('close');
-        }
-        else
-        {
-          $.messager.alert('信息提示','提交失败!','info');
-        }
-      }
-    });
-  }
-
-  /**
-   * Name 修改记录
-   */
-  function edit(){
-    $('#wu-form-2').form('submit', {
-      url:'',
-      success:function(data){
-        if(data){
-          $.messager.alert('信息提示','提交成功!','info');
-          $('#wu-dialog-2').dialog('close');
-        }
-        else
-        {
-          $.messager.alert('信息提示','提交失败!','info');
-        }
-      }
-    });
-  }
-
-  /**
-   * Name 删除记录
-   */
-  function remove(){
-    $.messager.confirm('信息提示','确定要删除该记录?', function(result){
-      if(result){
-        var items = $('#wu-datagrid-2').datagrid('getSelections');
-        var ids = [];
-        $(items).each(function(){
-          ids.push(this.productid);
-        });
-        //alert(ids);return;
-        $.ajax({
-          url:'',
-          data:'',
-          success:function(data){
-            if(data){
-              $.messager.alert('信息提示','删除成功!','info');
-            }
-            else
-            {
-              $.messager.alert('信息提示','删除失败!','info');
-            }
-          }
-        });
-      }
-    });
-  }
-
-  /**
-   * Name 打开添加窗口
-   */
-  function openAdd(){
-    $('#wu-form-2').form('clear');
-    $('#wu-dialog-2').dialog({
-      closed: false,
-      modal:true,
-      title: "添加信息",
-      buttons: [{
-        text: '确定',
-        iconCls: 'icon-ok',
-        handler: add
-      }, {
-        text: '取消',
-        iconCls: 'icon-cancel',
-        handler: function () {
-          $('#wu-dialog-2').dialog('close');
-        }
-      }]
-    });
-  }
-
-  /**
-   * Name 打开修改窗口
-   */
-  function openEdit(){
-    $('#wu-form-2').form('clear');
-    var item = $('#wu-datagrid-2').datagrid('getSelected');
-    //alert(item.productid);return;
-    $.ajax({
-      url:'',
-      data:'',
-      success:function(data){
-        if(data){
-          $('#wu-dialog-2').dialog('close');
-        }
-        else{
-          //绑定值
-          $('#wu-form-2').form('load', data)
-        }
-      }
-    });
-    $('#wu-dialog-2').dialog({
-      closed: false,
-      modal:true,
-      title: "修改信息",
-      buttons: [{
-        text: '确定',
-        iconCls: 'icon-ok',
-        handler: edit
-      }, {
-        text: '取消',
-        iconCls: 'icon-cancel',
-        handler: function () {
-          $('#wu-dialog-2').dialog('close');
-        }
-      }]
-    });
-  }
-
-  /**
-   * Name 分页过滤器
-   */
-  function pagerFilter(data){
-    if (typeof data.length == 'number' && typeof data.splice == 'function'){// is array
-      data = {
-        total: data.length,
-        rows: data
-      }
-    }
-    var dg = $(this);
-    var opts = dg.datagrid('options');
-    var pager = dg.datagrid('getPager');
-    pager.pagination({
-      onSelectPage:function(pageNum, pageSize){
-        opts.pageNumber = pageNum;
-        opts.pageSize = pageSize;
-        pager.pagination('refresh',{pageNumber:pageNum,pageSize:pageSize});
-        dg.datagrid('loadData',data);
-      }
-    });
-    if (!data.originalRows){
-      data.originalRows = (data.rows);
-    }
-    var start = (opts.pageNumber-1)*parseInt(opts.pageSize);
-    var end = start + parseInt(opts.pageSize);
-    data.rows = (data.originalRows.slice(start, end));
-    return data;
-  }
-
-  /**
-   * Name 载入数据
-   */
-  $('#wu-datagrid-2').datagrid({
-    url:'temp/datagrid.php',
-    loadFilter:pagerFilter,
-    rownumbers:true,
-    singleSelect:false,
-    pageSize:20,
-    pagination:true,
-    multiSort:true,
-    fitColumns:true,
-    fit:true,
-    columns:[[
-      { checkbox:true},
-      { field:'productid',title:'productid',width:100,sortable:true},
-      { field:'productname',title:'productname',width:180,sortable:true},
-      { field:'unitcost',title:'unitcost',width:100},
-      { field:'listprice',title:'listprice',width:100},
-      { field:'attr1',title:'attr1',width:100},
-      { field:'itemid',title:'itemid',width:100},
-      { field:'status',title:'status',width:100}
-    ]]
-  });
-</script>

+ 0 - 22
src/main/webapp/admin/temp/layout3.jsp

@@ -1,22 +0,0 @@
-<%--
-  Created by IntelliJ IDEA.
-  User: njc
-  Date: 2022/5/6
-  Time: 17:21
-  To change this template use File | Settings | File Templates.
---%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<div class="easyui-layout" data-options="fit:true">
-    <div class="easyui-panel pd5" data-options="fit:true,border:true">
-        <p style="font-size:14px">Here is the content loaded via AJAX.</p>
-        <ul>
-            <li>easyui is a collection of user-interface plugin based on jQuery.</li>
-            <li>easyui provides essential functionality for building modern, interactive, javascript applications.</li>
-            <li>using easyui you don't need to write many javascript code, writing some HTML markup.</li>
-            <li>complete framework for HTML5 web page.</li>
-            <li>easyui save your time and scales while developing your products.</li>
-            <li>easyui is very easy but powerful.</li>
-        </ul>
-    </div>
-</div>
-

+ 0 - 51
src/main/webapp/admin/temp/menu.json

@@ -1,51 +0,0 @@
-[{
-	"id":1,
-    "text":"首页",
-    "state":"",
-    "attributes":{
-		"url":"",
-		"icon":""
-	},
-    "children":[{
-    	"id":2,
-        "text":"系统管理",
-        "state":"",
-        "attributes":{
-            "url":"",
-            "icon":""
-        },
-        "children":[{
-        	"id":3,
-        	"text":"用户管理",
-            "state":"",
-            "attributes":{
-                "url":"datagrid.html",
-                "icon":""
-            }
-        },{
-        	"id":4,
-        	"text":"角色管理",
-            "state":"",
-            "attributes":{
-                "url":"_content.html",
-                "icon":""
-            }
-        },{
-        	"id":5,
-        	"text":"菜单管理",
-            "state":"",
-            "attributes":{
-                "url":"datagrid.html",
-                "icon":""
-            }
-        },{
-        	"id":6,
-        	"text":"权限管理",
-            "state":"",
-            "attributes":{
-                "url":"_content.html",
-                "icon":""
-            }
-        }]
-    }]
-}]

+ 0 - 51
src/main/webapp/admin/temp/menu.php

@@ -1,51 +0,0 @@
-[{
-	"id":1,
-    "text":"首页",
-    "state":"",
-    "attributes":{
-		"url":"",
-		"iframe":""
-	},
-    "children":[{
-    	"id":2,
-        "text":"系统管理",
-        "state":"",
-        "attributes":{
-            "url":"",
-			"iframe":""
-        },
-        "children":[{
-        	"id":3,
-        	"text":"用户管理",
-            "state":"",
-            "attributes":{
-                "url":"datagrid.html",
-				"iframe":""
-            }
-        },{
-        	"id":4,
-        	"text":"角色管理",
-            "state":"",
-            "attributes":{
-                "url":"_content.html",
-				"iframe":""
-            }
-        },{
-        	"id":5,
-        	"text":"菜单管理",
-            "state":"",
-            "attributes":{
-                "url":"datagrid.html",
-				"iframe":""
-            }
-        },{
-        	"id":6,
-        	"text":"权限管理",
-            "state":"",
-            "attributes":{
-                "url":"http://www.baidu.com",
-				"iframe":"true"
-            }
-        }]
-    }]
-}]

+ 0 - 49
src/main/webapp/admin/temp/tree.json

@@ -1,49 +0,0 @@
-[{
-	"id":1,
-	"text":"My Documents",
-	"children":[{
-		"id":11,
-		"text":"Photos",
-		"state":"closed",
-		"children":[{
-			"id":111,
-			"text":"Friend"
-		},{
-			"id":112,
-			"text":"Wife"
-		},{
-			"id":113,
-			"text":"Company"
-		}]
-	},{
-		"id":12,
-		"text":"Program Files",
-		"children":[{
-			"id":121,
-			"text":"Intel"
-		},{
-			"id":122,
-			"text":"Java",
-			"attributes":{
-				"p1":"Custom Attribute1",
-				"p2":"Custom Attribute2"
-			}
-		},{
-			"id":123,
-			"text":"Microsoft Office"
-		},{
-			"id":124,
-			"text":"Games",
-			"checked":true
-		}]
-	},{
-		"id":13,
-		"text":"index.html"
-	},{
-		"id":14,
-		"text":"about.html"
-	},{
-		"id":15,
-		"text":"welcome.html"
-	}]
-}]

+ 0 - 49
src/main/webapp/admin/temp/tree.php

@@ -1,49 +0,0 @@
-[{
-	"id":1,
-	"text":"My Documents",
-	"children":[{
-		"id":11,
-		"text":"Photos",
-		"state":"closed",
-		"children":[{
-			"id":111,
-			"text":"Friend"
-		},{
-			"id":112,
-			"text":"Wife"
-		},{
-			"id":113,
-			"text":"Company"
-		}]
-	},{
-		"id":12,
-		"text":"Program Files",
-		"children":[{
-			"id":121,
-			"text":"Intel"
-		},{
-			"id":122,
-			"text":"Java",
-			"attributes":{
-				"p1":"Custom Attribute1",
-				"p2":"Custom Attribute2"
-			}
-		},{
-			"id":123,
-			"text":"Microsoft Office"
-		},{
-			"id":124,
-			"text":"Games",
-			"checked":true
-		}]
-	},{
-		"id":13,
-		"text":"index.html"
-	},{
-		"id":14,
-		"text":"about.html"
-	},{
-		"id":15,
-		"text":"welcome.html"
-	}]
-}]

+ 151 - 0
src/main/webapp/admin/userManager.jsp

@@ -0,0 +1,151 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/28
+  Time: 10:30
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<script>
+    var url;
+
+    /**
+     * "修改"按钮的事件
+     */
+    function openLinkModifyDialog() {
+
+        var selectedRows = $("#dg").datagrid("getSelections");
+        if (selectedRows.length !== 1) {
+            $.messager.alert("系统提示", "请选择一条要编辑的数据!")
+            return;
+        }
+        var row = selectedRows[0];
+        $("#l-dlg").dialog("open").dialog("setTitle", "修改友情链接信息");
+        $("#l-fm").form("load", row);
+        url = "${pageContext.request.contextPath}/admin/blogger/modify.do?id=" + row.id;
+    }
+
+    /**
+     * 删除按钮事件
+     */
+    function deleteLink() {
+        var selectedRows = $("#dg").datagrid("getSelections");
+        if (selectedRows.length === 0) {
+            $.messager.alert("系统提示", "请至少选择一条要编辑的数据!");
+            return;
+        }
+        var strIds = [];
+        for (var i = 0; i < selectedRows.length; i++) {
+            strIds.push(selectedRows[i].id);
+        }
+        var ids = strIds.join(",");
+        $.messager.confirm("系统提示", "您确定要删除这<font color=red>" + selectedRows.length + "</font>条数据吗?", function (r) {
+            if (r) {
+                $.post("${pageContext.request.contextPath}/admin/blogger/delete.do", {ids: ids}, function (result) {
+                    if (result.success) {
+                        $.messager.alert("系统提示", "数据已经成功删除!");
+                        $("#dg").datagrid("reload");
+                    } else if (result.exists) {
+                        $.messager.alert("系统提示", result.exists);
+                    } else {
+                        $.messager.alert("系统提示", "数据删除失败!");
+                    }
+                }, "json");
+            }
+        });
+    }
+
+    /**
+     * "保存"按钮事件
+     */
+    function saveLink() {
+        $("#l-fm").form("submit", {
+            url: url,
+            onSubmit: function () {
+                return $(this).form("validate");
+            },
+            success: function (result) {
+                var result = eval('(' + result + ')');
+                if (result.success) {
+                    $.messager.alert("系统提示", "保存成功!");
+                    resetValue();
+                    $("#l-dlg").dialog("close");
+                    $("#dg").datagrid("reload");
+                } else {
+                    $.messager.alert("系统提示", "保存失败!");
+                }
+            }
+        });
+    }
+
+    /**
+     * "关闭"按钮事件
+     */
+    function closeLinkDialog() {
+        $("#l-dlg").dialog("close");
+        resetValue();
+    }
+
+    /**
+     * 重置弹出对话框
+     */
+    function resetValue() {
+        $("#linkName").val("");
+        $("#linkUrl").val("");
+        $("#orderNo").val("");
+    }
+
+    function formatRole(val, row) {
+        if (val === 1){
+            return "管理员";
+        }
+        return "普通用户";
+    }
+</script>
+<table id="dg" title="用户管理" class="easyui-datagrid" fitcolumns="true" pagination="true" rownumbers="true"
+       url="${pageContext.request.contextPath}/admin/blogger/list.do" fit="true" toolbar="#l-tb">
+    <thead>
+    <tr>
+        <th field="cb" checkbox="true" align="center"></th>
+        <th field="userTag" width="30" align="center" formatter="formatRole">用户角色</th>
+        <th field="userName" width="100" align="center">用户名</th>
+        <th field="nickName" width="100" align="center">用户昵称</th>
+        <th field="sign" width="100" align="center">用户职业</th>
+    </tr>
+    </thead>
+</table>
+
+<div id="l-tb">
+    <a href="javascript:openLinkModifyDialog()" class="easyui-linkbutton" iconcls="icon-edit" plain="true">修改</a>
+    <a href="javascript:deleteLink()" class="easyui-linkbutton" iconcls="icon-remove" plain="true">删除</a>
+</div>
+
+<div id="l-dlg" class="easyui-dialog" style="width: 350px;height: 250px;padding: 10px 20px;" closed="true"
+     buttons="l-dlg-buttons">
+    <form id="l-fm" method="post">
+        <table cellpadding="8px" style="font-size: 14px">
+            <tr>
+                <td>用户名:</td>
+                <td><input type="text" id="userName" name="userName" class="easyui-validatebox" required="true"/>
+                </td>
+            </tr>
+            <tr>
+                <td>昵称:</td>
+                <td><input type="text" id="nickName" name="nickName" class="easyui-validatebox" required="true"/>
+                </td>
+            </tr>
+            <tr>
+                <td>用户职业:</td>
+                <td><input type="text" id="sign" name="sign" class="easyui-validatebox" required="true"/>
+                </td>
+            </tr>
+        </table>
+    </form>
+    <div id="l-dlg-buttons">
+        <a href="javascript:saveLink();" class="easyui-linkbutton" iconcls="icon-ok" style="margin-left: 14%">保存</a>
+        <a href="javascript:closeLinkDialog();" class="easyui-linkbutton" iconcls="icon-cancel"
+           style="margin-left: 14%">取消</a>
+    </div>
+</div>
+
+

+ 70 - 0
src/main/webapp/admin/userRole.jsp

@@ -0,0 +1,70 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/28
+  Time: 11:34
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<script type="text/javascript">
+  /**
+   * 显示博客标题
+   * @param val
+   * @param row
+   * @returns {*}
+   */
+  function formatRole(val, row) {
+    if (val === 1){
+      return "管理员";
+    }
+    return "普通用户";
+  }
+
+  /**
+   * 审核
+   */
+  function commentReview(state) {
+    var selectedRows = $("#cr-dg").datagrid("getSelections");
+    if (selectedRows.length === 0) {
+      $.messager.alert("系统提示", "请至少选择一条要编辑的数据!");
+      return;
+    }
+    var strIds = [];
+    for (var i = 0; i < selectedRows.length; i++) {
+      strIds.push(selectedRows[i].id);
+    }
+    var ids = strIds.join(",");
+    $.messager.confirm("系统提示", "您确定要改变用户角色吗?", function (r) {
+      if (r) {
+        $.post("${pageContext.request.contextPath}/admin/blogger/review.do", {
+          ids: ids,
+          state: state
+        }, function (result) {
+          if (result.success) {
+            $.messager.alert("系统提示", "提交成功!");
+            $("#cr-dg").datagrid("reload");
+          } else {
+            $.messager.alert("系统提示", "数据删除失败!");
+          }
+        }, "json");
+      }
+    });
+  }
+</script>
+<table id="cr-dg" title="角色修改" class="easyui-datagrid" fitcolumns="true" rownumber="true" pagination="true"
+       url="${pageContext.request.contextPath}/admin/blogger/list.do" fit="true" toolbar="#cr-tb">
+  <thead>
+  <tr>
+    <th field="cb" checkbox="true" align="center"></th>
+    <th field="id" width="20" align="center">用户编号</th>
+    <th field="userName" width="200" align="center" >用户名</th>
+    <th field="userTag" width="100" align="center" formatter="formatRole">用户角色</th>
+    <th field="nickName" width="200" align="center">用户昵称</th>
+    <th field="sign" width="50" align="center">用户职业</th>
+  </tr>
+  </thead>
+</table>
+<div id="cr-tb">
+  <a href="javascript:commentReview(1)" class="easyui-linkbutton" iconcls="icon-ok" plain="true">变为管理员</a>
+  <a href="javascript:commentReview(0)" class="easyui-linkbutton" iconcls="icon-no" plain="true">变为普通用户</a>
+</div>

+ 7 - 4
src/main/webapp/admin/writeBlog.jsp

@@ -8,6 +8,7 @@
 --%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<body>
 <script type="text/javascript">
     /**
      * 发布博客
@@ -23,7 +24,7 @@
 
         if (title == null || title === '') {
             $.messager.alert("系统提示", "请输入标题!");
-        }else if (content == null || content === '') {
+        } else if (content == null || content === '') {
             $.messager.alert("系统提示", "请输入内容!");
         } else {
             $.post("${pageContext.request.contextPath}/admin/blog/save.do", {
@@ -63,7 +64,7 @@
         <tr>
             <td>博客内容:</td>
             <td>
-                <script id="editor" type="text/plain" style="width: 100%;height: 500px;"></script>
+                <script id="editor" type="text/plain" style="width: 100%;height: 400px;"></script>
             </td>
         </tr>
         <tr>
@@ -72,13 +73,15 @@
         </tr>
         <tr>
             <td></td>
-            <td><a href="javascript:submitData()" class="easyui-lunkbutton"
+            <td><a href="javascript:submitData()" class="easyui-linkbutton"
                    data-options="iconCls:'icon-submit'">发布博客</a></td>
         </tr>
+
     </table>
 </div>
 
 <script type="text/javascript">
     // 实例化编辑器
     var ue = UE.getEditor("editor");
-</script>
+</script>
+</body>

+ 0 - 347
src/main/webapp/article.html

@@ -1,347 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>学无止尽 — 一个站在java开发之路上的草根程序员个人博客网站</title>
-<meta charset="utf-8">
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
-<meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
-<LINK rel="Bookmark" href="favicon.ico" >
-<LINK rel="Shortcut Icon" href="favicon.ico" />
-<!--[if lt IE 9]>
-<script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
-<script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
-<![endif]-->
-<link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
-<link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
-<link rel="stylesheet" type="text/css" href="css/common.css" />
-<link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
-<!--[if lt IE 9]>
-<link href="/staticRes/lib/h-ui/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
-<![endif]-->
-<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
-</head>
-<body>
-<header class="navbar-wrapper">
-    <div class="navbar navbar-fixed-top">
-        <div class="container cl">
-            <a class="navbar-logo hidden-xs" href="index.html">
-                <img class="logo" src="img/logo.png" alt="Lao王博客" />
-            </a>
-            <a class="logo navbar-logo-m visible-xs" href="index.html">Lao王博客</a>
-            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
-            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
-                <ul class="cl">
-                    <li class="active"> <a href="index" data-hover="首页">首页</a> </li>
-                    <li> <a href="about.html" data-hover="关于我">关于我</a> </li>
-                    <li> <a href="mood.html" data-hover="碎言碎语">碎言碎语</a> </li>
-                    <li><a href="article.html" data-hover="学无止尽">学无止尽</a></li>
-                    <li> <a href="board.html" data-hover="留言板">留言板</a> </li>
-                </ul>
-            </nav>
-            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
-                <ul class="cl">
-                    <li class="userInfo dropDown dropDown_hover">
-                            <!--<a href="javascript:;" ><img class="avatar radius" src="img/40.jpg" alt="丶似浅 "></a>
-                            <ul class="dropDown-menu menu radius box-shadow">
-                                <li><a href="/app/loginOut">退出</a></li>
-                            </ul>-->
-                            <a href="/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" ><img class="avatar size-S" src="img/qq.jpg" title="登入">登入</a>
-                    </li>
-                </ul>
-            </nav>
-        </div>
-    </div>
-</header>
-
-<!--导航条-->
-<nav class="breadcrumb">
-    <div class="container">
-        <i class="Hui-iconfont">&#xe67f;</i><a href="index.html" class="c-primary">首页</a>
-        <span class="c-gray en">&gt;</span> <a href="article.html" class="c-primary">学无止尽</a>
-        <span class="c-gray en">&gt;</span> <span class="c-gray"><i class="Hui-iconfont">&#xe64b;</i> nginx</span>
-    </div>
-</nav>
-
-<section class="container">
-  <!--left-->
-  <div class="col-sm-9 col-md-9 mt-20">
-  	
-  		
-  	<!--article list-->
-			<ul class="index_arc">
-				<li class="index_arc_item">
-					<a href="#" class="pic">
-						<img class="lazyload" data-original="temp/art.jpg" alt="应该选" />
-					</a>
-					<h4 class="title"><a href="article_detail.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2017-02-24</span>
-						<span><a href="/article-lists/10.html">程序人生</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc">不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				
-				<li class="index_arc_item no_pic">
-					<h4 class="title"><a href="/article/5.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2个月前</span>
-						<span><a href="/article-lists/10.html">建站</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276 °</p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span id="sourceId::105" class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc"> 不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				<li class="index_arc_item">
-	            <a href="/article/4" class="pic">
-	                <img class="lazyload" data-original="temp/art.jpg" alt="centos 6.5 nginx安装及配置" >
-	            </a>
-	        <h4 class="title"><a href="/article/4">centos 6.5 nginx安装及配置</a></h4>
-	        <div class="date_hits">
-	            <span>老王</span>
-	            <span>2017-3-15</span>
-	            <span>
-	                <a href="/article?t=1">程序人生</a>
-	            </span>
-	            <p class="hits"><i class="Hui-iconfont" title="点击量"></i> 13° </p>
-	            <p class="commonts"><i class="Hui-iconfont" title="评论"></i> <span class="cy_cmt_count">0</span></p>
-	        </div>
-	        <div class="desc">linux环境中nginx安装及配置简要概述。。。</div>
-	    </li>
-         
-         <li class="index_arc_item">
-					<a href="#" class="pic">
-						<img class="lazyload" data-original="temp/art.jpg" alt="应该选" />
-					</a>
-					<h4 class="title"><a href="article_detail.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2017-02-24</span>
-						<span><a href="/article-lists/10.html">程序人生</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc">不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				
-				<li class="index_arc_item no_pic">
-					<h4 class="title"><a href="/article/5.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2个月前</span>
-						<span><a href="/article-lists/10.html">建站</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276 °</p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span id="sourceId::105" class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc"> 不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				<li class="index_arc_item">
-	            <a href="/article/4" class="pic">
-	                <img class="lazyload" data-original="temp/art.jpg" alt="centos 6.5 nginx安装及配置" >
-	            </a>
-	        <h4 class="title"><a href="/article/4">centos 6.5 nginx安装及配置</a></h4>
-	        <div class="date_hits">
-	            <span>老王</span>
-	            <span>2017-3-15</span>
-	            <span>
-	                <a href="/article?t=1">程序人生</a>
-	            </span>
-	            <p class="hits"><i class="Hui-iconfont" title="点击量"></i> 13° </p>
-	            <p class="commonts"><i class="Hui-iconfont" title="评论"></i> <span class="cy_cmt_count">0</span></p>
-	        </div>
-	        <div class="desc">linux环境中nginx安装及配置简要概述。。。</div>
-	    </li>
-          
-          <li class="index_arc_item">
-					<a href="#" class="pic">
-						<img class="lazyload" data-original="temp/art.jpg" alt="应该选" />
-					</a>
-					<h4 class="title"><a href="article_detail.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2017-02-24</span>
-						<span><a href="/article-lists/10.html">程序人生</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc">不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				
-				<li class="index_arc_item no_pic">
-					<h4 class="title"><a href="/article/5.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2个月前</span>
-						<span><a href="/article-lists/10.html">建站</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276 °</p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span id="sourceId::105" class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc"> 不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				<li class="index_arc_item">
-	            <a href="/article/4" class="pic">
-	                <img class="lazyload" data-original="temp/art.jpg" alt="centos 6.5 nginx安装及配置" >
-	            </a>
-	        <h4 class="title"><a href="/article/4">centos 6.5 nginx安装及配置</a></h4>
-	        <div class="date_hits">
-	            <span>老王</span>
-	            <span>2017-3-15</span>
-	            <span>
-	                <a href="/article?t=1">程序人生</a>
-	            </span>
-	            <p class="hits"><i class="Hui-iconfont" title="点击量"></i> 13° </p>
-	            <p class="commonts"><i class="Hui-iconfont" title="评论"></i> <span class="cy_cmt_count">0</span></p>
-	        </div>
-	        <div class="desc">linux环境中nginx安装及配置简要概述。。。</div>
-	    </li>
-          
-          <li class="index_arc_item">
-					<a href="#" class="pic">
-						<img class="lazyload" data-original="temp/art.jpg" alt="应该选" />
-					</a>
-					<h4 class="title"><a href="article_detail.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2017-02-24</span>
-						<span><a href="/article-lists/10.html">程序人生</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc">不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				
-				<li class="index_arc_item no_pic">
-					<h4 class="title"><a href="/article/5.html">个人博客应该选择什么样的域名和域名后缀</a></h4>
-					<div class="date_hits">
-						<span>老王</span>
-						<span>2个月前</span>
-						<span><a href="/article-lists/10.html">建站</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276 °</p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span id="sourceId::105" class="cy_cmt_count">20</span></p>
-					</div>
-					<div class="desc"> 不论搭建什么样的网站,选择一个好的域名都是很有必要的,选择一个好的域名对网站的意义也是不言而喻的。每一个网站都有之对应的域名,就像人的名字一样。每个人都想自己有个好听的名字,网站也是一样。一个网站可以有多个域名,但是一个域名只能对应一个网站。&nbsp;一、域名要好记,方便输入&nbsp; &nbsp; &nbsp; &nbsp;域名本身的意义就是为了人们方便记忆才使用的,不然都用IP地址就好了。所以,网站域名一定要选择好记忆的。因为域名是</div>
-				</li>
-				
-				<li class="index_arc_item">
-	            <a href="/article/4" class="pic">
-	                <img class="lazyload" data-original="temp/art.jpg" alt="centos 6.5 nginx安装及配置" >
-	            </a>
-	        <h4 class="title"><a href="/article/4">centos 6.5 nginx安装及配置</a></h4>
-	        <div class="date_hits">
-	            <span>老王</span>
-	            <span>2017-3-15</span>
-	            <span>
-	                <a href="/article?t=1">程序人生</a>
-	            </span>
-	            <p class="hits"><i class="Hui-iconfont" title="点击量"></i> 13° </p>
-	            <p class="commonts"><i class="Hui-iconfont" title="评论"></i> <span class="cy_cmt_count">0</span></p>
-	        </div>
-	        <div class="desc">linux环境中nginx安装及配置简要概述。。。</div>
-	    </li>
-          
-				</ul>
-  		<div class="text-c mb-20" id="moreBlog">
-            <a class="btn  radius btn-block " href="javascript:" onclick="moreBlog('${blogType.id}','${tag.name}');">点击加载更多</a>
-            <a class="btn  radius btn-block hidden" href="javascript:">加载中……</a>
-        </div>		
-  </div>
-  
-  <!--right-->
-  <div class="col-sm-3 col-md-3 mt-20">
-  	
-  	<!--导航-->
-  	<div class="panel panel-primary mb-20">
-			<div class="panel-body">
-				<input class="btn btn-primary radius nav-btn" type="button" value="杂谈">
-				<input class="btn btn-primary-outline radius nav-btn" type="button" value="java">
-				<input class="btn btn-primary-outline radius nav-btn" type="button" value="框架">
-				<input class="btn btn-primary-outline radius nav-btn" type="button" value="服务域名">
-			</div>
-		</div>
-  	
-  	<!--热门推荐-->
-  	<div class="bg-fff box-shadow radius mb-20">
-			<div class="tab-category">
-				<a href=""><strong>热门推荐</strong></a>
-			</div>
-			<div class="tab-category-item">
-				<ul class="index_recd">
-					<li>
-						<a href="#">阻止a标签href默认跳转事件</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-					</li>
-					<li >
-						<a href="#">PHP面试题汇总</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-					</li>
-					<li >
-						<a href="#">阻止a标签href默认跳转事件</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-					</li>
-					<li >
-						<a href="#">阻止a标签href默认跳转事件</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-					</li>
-					<li >
-						<a href="#">PHP面试题汇总</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-					</li>
-				</ul>
-			</div>
-		</div>
-	
-<!--标签-->
-		<div class="bg-fff box-shadow radius mb-20">
-			<div class="tab-category">
-				<a href=""><strong>标签云</strong></a>
-			</div>
-			<div class="tab-category-item">
-				<div class="tags"> <a href="http://www.h-ui.net/">H-ui前端框架</a> <a href="http://www.h-ui.net/websafecolors.shtml">Web安全色</a> <a href="http://www.h-ui.net/Hui-4.4-Unslider.shtml">jQuery轮播插件</a> <a href="http://idc.likejianzhan.com/vhost/korea_hosting.php">韩国云虚拟主机</a> <a href="http://www.h-ui.net/bug.shtml">IEbug</a> <a href="http://www.h-ui.net/site.shtml">IT网址导航</a> <a href="http://www.h-ui.net/icon/index.shtml">网站常用小图标</a> <a href="http://www.h-ui.net/tools/jsformat.shtml">web工具箱</a> <a href="http://www.h-ui.net/bg/index.shtml">网站常用背景素材</a> <a href="http://www.h-ui.net/yuedu/chm.shtml">H-ui阅读</a> <a href="http://www.h-ui.net/easydialog-v2.0/index.html">弹出层插件</a> <a href="http://www.h-ui.net/SuperSlide2.1/demo.html">SuperSlide插件</a> <a href="http://www.h-ui.net/TouchSlide1.1/demo.html">TouchSlide</a></div>
-			</div>
-		</div>
-  </div>
-  
-</section>
-<footer class="footer mt-20">
-    <div class="container-fluid" id="foot">
-        <p>Copyright &copy; 2016-2017 www.wfyvv.com <br>
-            <a href="#" target="_blank">皖ICP备17002922号</a>  更多模板:<a href="http://www.cssmoban.com/" target="_blank">模板之家</a><br>
-        </p>
-    </div>
-</footer>
-<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
-<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
-<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
-<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
-<script>
-$(function(){
-//标签
-	$(".tags a").each(function(){
-		var x = 9;
-		var y = 0;
-		var rand = parseInt(Math.random() * (x - y + 1) + y);
-		$(this).addClass("tags"+rand)
-	});
-	
-	$("img.lazyload").lazyload({failurelimit : 3});
-});
-
-</script> 
-</body>
-</html>

+ 234 - 0
src/main/webapp/article.jsp

@@ -0,0 +1,234 @@
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/10
+  Time: 18:53
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<!DOCTYPE HTML>
+<html>
+<head>
+    <title>学无止尽</title>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <meta name="keywords" content="个人博客,纳进财个人博客,个人博客系统,老王博客">
+    <meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
+    <link rel="Bookmark" href="favicon.ico">
+    <link rel="Shortcut Icon" href="favicon.ico"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/plugin/h-ui/css/H-ui.min.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/plugin/Hui-iconfont/1.0.8/iconfont.min.css"/>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/common.css"/>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/pifu/pifu.css"/>
+    <script type="application/x-javascript"> addEventListener("load", function () {
+        setTimeout(hideURLbar, 0);
+    }, false);
+
+    function hideURLbar() {
+        window.scrollTo(0, 1);
+    }
+
+    function showSide() {
+        $('.navbar-nav').toggle();
+    }</script>
+</head>
+<body>
+<header class="navbar-wrapper">
+    <div class="navbar navbar-fixed-top">
+        <div class="container cl">
+            <a class="navbar-logo hidden-xs" href="index.do">
+                <img class="logo" src="${pageContext.request.contextPath}/static/img/logo.png" alt="Lao王博客"/>
+            </a>
+            <a class="logo navbar-logo-m visible-xs" href="index.do">Lao王博客</a>
+            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);"
+               onclick="showSide();">&#xe667;</a>
+            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
+                <ul class="cl">
+                    <li><a href="index.do" data-hover="首页">首页</a></li>
+                    <li><a href="about.jsp" data-hover="关于我">关于我</a></li>
+                    <li><a href="mood.jsp" data-hover="碎言碎语">碎言碎语</a></li>
+                    <li class="active"><a href="article.do" data-hover="学无止尽">学无止尽</a></li>
+                    <li><a href="board.jsp" data-hover="留言板">留言板</a></li>
+                </ul>
+            </nav>
+            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
+                <ul class="cl">
+                    <li class="userInfo dropDown dropDown_hover">
+                        <a href="${pageContext.request.contextPath}/admin/main.jsp">后台入口</a>
+                    </li>
+                </ul>
+            </nav>
+        </div>
+    </div>
+</header>
+
+<!--导航条-->
+<nav class="breadcrumb">
+    <div class="container">
+        <i class="Hui-iconfont">&#xe67f;</i><a href="index.do" class="c-primary">首页</a>
+        <span class="c-gray en">&gt;</span> <a href="article.do" class="c-primary">学无止尽</a>
+        <span class="c-gray en">&gt;</span> <span class="c-gray"><i class="Hui-iconfont">&#xe64b;</i> nginx</span>
+    </div>
+</nav>
+
+<section class="container">
+    <!--left-->
+    <div class="col-sm-9 col-md-9 mt-20">
+
+
+        <!--article list-->
+        <ul class="index_arc">
+            <c:forEach items="${blogList}" var="blog">
+<%--                <li class="index_arc_item">--%>
+<%--                    <a href="#" class="pic">--%>
+<%--                        <img class="lazyload" data-original="temp/art.jpg" alt="应该选"/>--%>
+<%--                    </a>--%>
+<%--                    <h4 class="title"><a--%>
+<%--                            href="${pageContext.request.contextPath}/article_datali.do?id=${blog.id}">${blog.title}</a>--%>
+<%--                    </h4>--%>
+<%--                    <div class="date_hits">--%>
+<%--                        <span>老王</span>--%>
+<%--                        <span><fmt:formatDate value="${blog.releaseDate}" type="date" pattern="yyyy年MM月dd日"/></span>--%>
+<%--                        <span><a href="/article-lists/10.jsp">${blog.blogType.typeName}</a></span>--%>
+<%--                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i>${blog.clickHit}</p>--%>
+<%--                        <p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span--%>
+<%--                                class="cy_cmt_count">${blog.replyHit}</span>--%>
+<%--                        </p>--%>
+<%--                    </div>--%>
+<%--                    <div class="desc">--%>
+<%--                            ${blog.summary}--%>
+<%--                    </div>--%>
+<%--                </li>--%>
+
+                <li class="index_arc_item no_pic">
+                    <h4 class="title"><a
+                            href="${pageContext.request.contextPath}/article_datali.do?id=${blog.id}">${blog.title}</a>
+                    </h4>
+                    <div class="date_hits">
+                        <span>老王</span>
+                        <span><fmt:formatDate value="${blog.releaseDate}" type="date" pattern="yyyy年MM月dd日"/></span>
+                        <span><a href="/article-lists/10.jsp">${blog.blogType.typeName}</a></span>
+                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i>${blog.clickHit}</p>
+                        <p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span id="sourceId::105"
+                                                                                                   class="cy_cmt_count">${blog.replyHit}</span>
+                        </p>
+                    </div>
+                    <div class="desc">
+                            ${blog.summary}
+                    </div>
+                </li>
+            </c:forEach>
+        </ul>
+        <div class="text-c mb-20" id="moreBlog">
+            ${pageCode}
+        </div>
+    </div>
+
+    <!--right-->
+    <div class="col-sm-3 col-md-3 mt-20">
+
+        <!--导航-->
+        <div class="panel panel-primary mb-20">
+            <div class="panel-body">
+                <input class="btn btn-primary radius nav-btn" type="button" value="杂谈">
+                <input class="btn btn-primary-outline radius nav-btn" type="button" value="java">
+                <input class="btn btn-primary-outline radius nav-btn" type="button" value="框架">
+                <input class="btn btn-primary-outline radius nav-btn" type="button" value="服务域名">
+            </div>
+        </div>
+
+        <!--热门推荐-->
+        <div class="bg-fff box-shadow radius mb-20">
+            <div class="tab-category">
+                <a href=""><strong>热门推荐</strong></a>
+            </div>
+            <div class="tab-category-item">
+                <ul class="index_recd">
+                    <li>
+                        <a href="#">阻止a标签href默认跳转事件</a>
+                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
+                    </li>
+                    <li>
+                        <a href="#">PHP面试题汇总</a>
+                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
+                    </li>
+                    <li>
+                        <a href="#">阻止a标签href默认跳转事件</a>
+                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
+                    </li>
+                    <li>
+                        <a href="#">阻止a标签href默认跳转事件</a>
+                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
+                    </li>
+                    <li>
+                        <a href="#">PHP面试题汇总</a>
+                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
+                    </li>
+                </ul>
+            </div>
+        </div>
+
+        <!--标签-->
+        <div class="bg-fff box-shadow radius mb-20">
+            <div class="tab-category">
+                <a href=""><strong>标签云</strong></a>
+            </div>
+            <div class="tab-category-item">
+                <div class="tags"><a href="http://www.h-ui.net/">H-ui前端框架</a> <a
+                        href="http://www.h-ui.net/websafecolors.shtml">Web安全色</a> <a
+                        href="http://www.h-ui.net/Hui-4.4-Unslider.shtml">jQuery轮播插件</a> <a
+                        href="http://idc.likejianzhan.com/vhost/korea_hosting.php">韩国云虚拟主机</a> <a
+                        href="http://www.h-ui.net/bug.shtml">IEbug</a> <a
+                        href="http://www.h-ui.net/site.shtml">IT网址导航</a> <a href="http://www.h-ui.net/icon/index.shtml">网站常用小图标</a>
+                    <a href="http://www.h-ui.net/tools/jsformat.shtml">web工具箱</a> <a
+                            href="http://www.h-ui.net/bg/index.shtml">网站常用背景素材</a> <a
+                            href="http://www.h-ui.net/yuedu/chm.shtml">H-ui阅读</a> <a
+                            href="http://www.h-ui.net/easydialog-v2.0/index.html">弹出层插件</a> <a
+                            href="http://www.h-ui.net/SuperSlide2.1/demo.html">SuperSlide插件</a> <a
+                            href="http://www.h-ui.net/TouchSlide1.1/demo.html">TouchSlide</a></div>
+            </div>
+        </div>
+    </div>
+
+</section>
+<footer class="footer mt-20">
+    <div class="container-fluid" id="foot">
+        <p>Copyright &copy; 2017-2022 www.ftebox.cn <br>
+            <a href="#" target="_blank">基于SSM框架实现的个人博客系统</a>
+        </p>
+    </div>
+</footer>
+<script type="text/javascript"
+        src="${pageContext.request.contextPath}/static/plugin/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/layer/3.0/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/h-ui/js/H-ui.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/pifu/pifu.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common.js"></script>
+<script> $(function () {
+    $(window).on("scroll", backToTopFun);
+    backToTopFun();
+}); </script>
+<script>
+    $(function () {
+//标签
+        $(".tags a").each(function () {
+            var x = 9;
+            var y = 0;
+            var rand = parseInt(Math.random() * (x - y + 1) + y);
+            $(this).addClass("tags" + rand)
+        });
+
+        $("img.lazyload").lazyload({failurelimit: 3});
+    });
+
+</script>
+</body>
+</html>

+ 281 - 0
src/main/webapp/article_datali.jsp

@@ -0,0 +1,281 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/10
+  Time: 19:42
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<html>
+<head>
+    <title>老王个人博客</title>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <meta name="keywords" content="个人博客,纳进财个人博客,个人博客系统,老王博客,王风宇">
+    <meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
+    <link rel="Bookmark" href="favicon.ico">
+    <link rel="Shortcut Icon" href="favicon.ico"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/plugin/h-ui/css/H-ui.min.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/plugin/Hui-iconfont/1.0.8/iconfont.min.css"/>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/common.css"/>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/pifu/pifu.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/plugin/wangEditor/css/wangEditor.min.css">
+    <script type="application/x-javascript"> addEventListener("load", function () {
+        setTimeout(hideURLbar, 0);
+    }, false);
+
+    function hideURLbar() {
+        window.scrollTo(0, 1);
+    }
+
+    function showSide() {
+        $('.navbar-nav').toggle();
+    }
+    </script>
+</head>
+<body>
+<header class="navbar-wrapper">
+    <div class="navbar navbar-fixed-top">
+        <div class="container cl">
+            <a class="navbar-logo hidden-xs" href="index.do">
+                <img class="logo" src="${pageContext.request.contextPath}/static/img/logo.png" alt="Lao王博客"/>
+            </a>
+            <a class="logo navbar-logo-m visible-xs" href="index.do">Lao王博客</a>
+            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);"
+               onclick="showSide();">&#xe667;</a>
+            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
+                <ul class="cl">
+                    <li class="active"><a href="index.do" data-hover="首页">首页</a></li>
+                    <li><a href="about.jsp" data-hover="关于我">关于我</a></li>
+                    <li><a href="mood.jsp" data-hover="碎言碎语">碎言碎语</a></li>
+                    <li><a href="article.jsp" data-hover="学无止尽">学无止尽</a></li>
+                    <li><a href="board.jsp" data-hover="留言板">留言板</a></li>
+                </ul>
+            </nav>
+            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
+                <ul class="cl">
+                    <li class="userInfo dropDown dropDown_hover">
+                        <a href="${pageContext.request.contextPath}/admin/main.jsp">后台入口</a>
+                    </li>
+                </ul>
+            </nav>
+        </div>
+    </div>
+</header>
+
+<!--导航条-->
+<nav class="breadcrumb">
+    <div class="container"><i class="Hui-iconfont">&#xe67f;</i> <a href="index.do" class="c-primary">首页</a> <span
+            class="c-gray en">&gt;</span> <span class="c-gray">文章</span> <span class="c-gray en">&gt;</span> <span
+            class="c-gray">个人博客应该选择什么样的域名和域名后缀</span></div>
+</nav>
+
+<section class="container pt-20">
+
+    <div class="row w_main_row">
+
+
+        <div class="col-lg-9 col-md-9 w_main_left">
+            <div class="panel panel-default  mb-20">
+                <div class="panel-body pt-10 pb-10">
+                    <h2 class="c_titile">${blog.title}</h2>
+                    <p class="box_c"><span class="d_time">发布时间:<fmt:formatDate value="${blog.releaseDate}" type="date"
+                                                                               pattern="yyyy年MM月dd日"/></span><span>编辑:<a
+                            href="mailto:wfyv@qq.com">wilco</a></span><span>阅读${blog.clickHit}</span></p>
+                    <ul class="infos">
+                        ${blog.content}
+                    </ul>
+                    <div class="keybq">
+                        <p><span>关键字</span>:<a class="label label-default">${blog.keyWord}</a></p>
+                    </div>
+                    <div class="nextinfo">
+                        <p class="last">上一篇:<a href="#">免费收录网站搜索引擎登录口大全</a></p>
+                        <p class="next">下一篇:<a href="#">javascript显示年月日时间代码</a></p>
+                    </div>
+
+                </div>
+            </div>
+
+            <div class="panel panel-default  mb-20">
+                <div class="tab-category">
+                    <a href=""><strong>评论区</strong></a>
+                </div>
+                <div class="panel-body">
+                    <div class="panel-body" style="margin: 0 3%;">
+                        <div class="mb-20">
+                            <ul class="commentList">
+                                <c:choose>
+                                    <c:when test="${commentList.size() == 0}">
+                                        <li class="item cl">
+                                            <p>暂无评论</p>
+                                        </li>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:forEach var="comment" items="${commentList}" varStatus="status">
+                                            <li class="item cl">
+                                                <a href="#"><i class="avatar size-L radius">
+                                                    <img alt=""
+                                                         src="http://qzapp.qlogo.cn/qzapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
+                                                <div class="comment-main">
+                                                    <header class="comment-header">
+                                                        <div class="comment-meta">
+                                                            <a class="comment-author"
+                                                               href="#">${comment.userIp}</a>
+                                                            <time class="f-r">
+                                                                <fmt:formatDate value="${comment.commentDate}"
+                                                                                type="date"
+                                                                                pattern="yyyy年MM月dd日hh时"/>
+                                                            </time>
+                                                        </div>
+                                                    </header>
+                                                    <div class="comment-body">
+                                                        <p>${comment.content}</p>
+                                                    </div>
+                                                </div>
+                                            </li>
+                                        </c:forEach>
+                                    </c:otherwise>
+                                </c:choose>
+                            </ul>
+                        </div>
+                        <div class="line"></div>
+                        <!--用于评论-->
+                        <div class="mt-20" id="ct">
+                            <div id="err" class="Huialert Huialert-danger hidden radius">成功状态提示</div>
+                            <textarea id="textarea1" name="comment" style="height:200px;"
+                                      placeholder="看完不留一发?">
+                            </textarea>
+                            <div class="text-r mt-10">
+                                <button onclick="getPlainTxt()" class="btn btn-primary radius">发表评论</button>
+                            </div>
+                        </div>
+                        <%--                        <!--用于回复-->--%>
+                        <%--                        <div class="comment hidden mt-20">--%>
+                        <%--                            <div id="err2" class="Huialert Huialert-danger hidden radius">成功状态提示</div>--%>
+                        <%--                            <textarea class="textarea" style="height:100px;"> </textarea>--%>
+                        <%--                            <button onclick="hf(this);" type="button" class="btn btn-primary radius mt-10">回复</button>--%>
+                        <%--                            <a class="cancelReply f-r mt-10">取消回复</a>--%>
+                        <%--                        </div>--%>
+
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="col-lg-3 col-md-3">
+            <!--热门推荐-->
+            <div class="bg-fff box-shadow radius mb-20">
+                <div class="tab-category">
+                    <a href=""><strong>热门推荐</strong></a>
+                </div>
+                <div class="tab-category-item">
+                    <ul class="index_recd">
+                        <li>
+                            <a href="#">阻止a标签href默认跳转事件</a>
+                            <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
+                        </li>
+                        <li>
+                            <a href="#">PHP面试题汇总</a>
+                            <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
+                        </li>
+                        <li>
+                            <a href="#">阻止a标签href默认跳转事件</a>
+                            <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
+                        </li>
+                        <li>
+                            <a href="#">阻止a标签href默认跳转事件</a>
+                            <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
+                        </li>
+                        <li>
+                            <a href="#">PHP面试题汇总</a>
+                            <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+
+            <!--图片-->
+            <div class="bg-fff box-shadow radius mb-20">
+                <div class="tab-category">
+                    <a href=""><strong>扫我关注</strong></a>
+                </div>
+                <div class="tab-category-item">
+                    <img data-original="temp/gg.jpg" class="img-responsive lazyload" alt="响应式图片">
+                </div>
+            </div>
+
+        </div>
+    </div>
+
+</section>
+<footer class="footer mt-20">
+    <p>Copyright &copy; 2017-2022 www.ftebox.cn <br>
+        <a href="#" target="_blank">基于SSM框架实现的个人博客系统</a>
+    </p>
+</footer>
+<script type="text/javascript"
+        src="${pageContext.request.contextPath}/static/plugin/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/layer/3.0/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/h-ui/js/H-ui.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/pifu/pifu.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common.js"></script>
+<script> $(function () {
+    $(window).on("scroll", backToTopFun);
+    backToTopFun();
+}); </script>
+<script type="text/javascript"
+        src="${pageContext.request.contextPath}/static/plugin/wangEditor/js/wangEditor.min.js"></script>
+<script type="text/javascript">
+    $(function () {
+        $("img.lazyload").lazyload({failurelimit: 3});
+
+        wangEditor.config.printLog = false;
+        var editor1 = new wangEditor('textarea1');
+        editor1.config.menus = ['insertcode', 'quote', 'bold', '|', 'img', 'emotion', '|', 'undo', 'fullscreen'];
+        editor1.config.emotions = {
+            'default': {
+                title: '老王表情',
+                data: '${pageContext.request.contextPath}/static/plugin/wangEditor/emotions1.data'
+            },
+            'default2': {
+                title: '老王心情',
+                data: '${pageContext.request.contextPath}/static/plugin/wangEditor/emotions3.data'
+            },
+            'default3': {
+                title: '顶一顶',
+                data: '${pageContext.request.contextPath}/static/plugin/wangEditor/emotions2.data'
+            }
+        };
+        editor1.create();
+    });
+
+    function getPlainTxt() {
+        var text = $("#textarea1").val();
+
+        // ----测试代码----
+        console.log(text);
+        //----------------
+        $.post("${pageContext.request.contextPath}/comment/save.do",
+            {'content':text,'blog.id':'${blog.id}'},
+            function (result) {
+                if(result.success){
+                    window.location.reload();
+                    alert("提交成功,等待审核!")
+                }else {
+                    alert("提交失败,请重新提交!")
+                }
+            },"json");
+    }
+
+</script>
+</body>
+</html>
+

+ 0 - 250
src/main/webapp/article_detail.html

@@ -1,250 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>老王个人博客 — 一个站在java开发之路上的草根程序员个人博客网站</title>
-<meta charset="utf-8">
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
-<meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
-<LINK rel="Bookmark" href="favicon.ico" >
-<LINK rel="Shortcut Icon" href="favicon.ico" />
-<!--[if lt IE 9]>
-<script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
-<script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
-<![endif]-->
-<link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
-<link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
-<link rel="stylesheet" type="text/css" href="css/common.css" />
-<link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
-<link rel="stylesheet" type="text/css" href="plugin/wangEditor/css/wangEditor.min.css">
-<!--[if lt IE 9]>
-<link href="/staticRes/lib/h-ui/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
-<![endif]-->
-<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
-</head>
-<body>
-<header class="navbar-wrapper">
-    <div class="navbar navbar-fixed-top">
-        <div class="container cl">
-            <a class="navbar-logo hidden-xs" href="index">
-                <img class="logo" src="img/logo.png" alt="Lao王博客" />
-            </a>
-            <a class="logo navbar-logo-m visible-xs" href="index.html">Lao王博客</a>
-            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
-            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
-                <ul class="cl">
-                    <li class="active"> <a href="index" data-hover="首页">首页</a> </li>
-                    <li> <a href="about.html" data-hover="关于我">关于我</a> </li>
-                    <li> <a href="mood.html" data-hover="碎言碎语">碎言碎语</a> </li>
-                    <li><a href="article.html" data-hover="学无止尽">学无止尽</a></li>
-                    <li> <a href="board.html" data-hover="留言板">留言板</a> </li>
-                </ul>
-            </nav>
-            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
-                <ul class="cl">
-                    <li class="userInfo dropDown dropDown_hover">
-                            <!--<a href="javascript:;" ><img class="avatar radius" src="img/40.jpg" alt="丶似浅 "></a>
-                            <ul class="dropDown-menu menu radius box-shadow">
-                                <li><a href="/app/loginOut">退出</a></li>
-                            </ul>-->
-                            <a href="/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" ><img class="avatar size-S" src="img/qq.jpg" title="登入">登入</a>
-                    </li>
-                </ul>
-            </nav>
-        </div>
-    </div>
-</header>
-
-<!--导航条-->
-<nav class="breadcrumb">
-  <div class="container"> <i class="Hui-iconfont">&#xe67f;</i> <a href="index.html" class="c-primary">首页</a> <span class="c-gray en">&gt;</span>  <span class="c-gray">文章</span> <span class="c-gray en">&gt;</span>  <span class="c-gray">个人博客应该选择什么样的域名和域名后缀</span></div>
-</nav>
-
-<section class="container pt-20">
-	
-	<div class="row w_main_row">
-				
-				
-				<div class="col-lg-9 col-md-9 w_main_left">
-					<div class="panel panel-default  mb-20">
-						<div class="panel-body pt-10 pb-10">
-							<h2 class="c_titile">我的个人博客之——阿里云空间选择</h2>
-							<p class="box_c"><span class="d_time">发布时间:2017-02-05</span><span>编辑:<a href="mailto:wfyv@qq.com">wilco</a></span><span>阅读(88646)</span></p>
-							<ul class="infos">
-								      <p>之前服务器放在电信机房, 联通用户访问速度很不稳定,经常出现访问速度慢的问题,换到阿里云解决了之前的问题。很多人都问我的博客选得什么空间,一年的费用得多少钱,今天我列个表出来,供大家参考。</p>
-								<p>&nbsp;<img src="temp/at1.png" alt="个人博客阿里云空间选择" width="700" height="886"></p>
-								<p>对于访问量不大,小型网站带宽可以选择1M的,每个月<span class="cny" style="margin: 0px 1px; padding: 0px; border: 0px; font-family: Arial; line-height: 20px; font-size: 20px; vertical-align: baseline; color: rgb(255, 102, 0); white-space: nowrap;">¥</span><span class="money" style="margin: 0px; padding: 0px; border: 0px; font-family: 微软雅黑, 'Microsoft Yahei', 'Hiragino Sans GB', tahoma, arial, 宋体; line-height: 20px; font-size: 20px; vertical-align: baseline; color: rgb(255, 102, 0); white-space: nowrap;">56.80</span>一年也就568块钱,每天投入也就不到2块钱。</p>
-								<p><img src="temp/at2.png" alt="个人博客阿里云空间选择"></p>
-								<p><strong>1、为什么选Linux?</strong></p>
-								<p>程序用PHP,速度快,配置低(windows必选1G的内存Linux选512MB能同样达到要求)。Linux的系统安全性非常高。Linux服务器的维护与扩展到性价比和性能都高于Windows。</p>
-								<p>1) 最流行的服务器端操作系统,强大的安全性和稳定性</p>
-								<p>2) 免费且开源,轻松建立和编译源代码</p>
-								<p>3) 通过SSH方式远程访问您的云服务器</p>
-								<p>4) 一般用于高性能web等服务器应用,支持常见的PHP/Python等编程语言,支持MySQL等数据库(需自行安装)</p>
-								<p><strong>2、操作系统为什么选CentOS 安全加固版(推荐)?</strong></p>
-								<p>在原 CentOS镜像的基础上,系统进一步安全加固,安装了阿里云独有的入侵防御系统,系统中会出现aegis进程,该系统增加了实时后门,Webshell检测,更加智能的暴力破解防御和多种入侵行为监控,让服务器更加安全可靠。</p>
-								<p><a href="http://www.aliyun.com/product/ecs" target="_blank"><strong><span style="color: rgb(0, 0, 255);">前往阿里云官网购买&gt;&gt;</span></strong></a></p>
-								<p>&nbsp;</p><p align="center" class="pageLink"></p>
-								
-							</ul>
-															
-							<div class="keybq">
-						    	<p><span>关键字</span>:<a class="label label-default">个人博客</a><a class="label label-default">阿里云</a><a class="label label-default">空间</a></p>    
-						    </div>
-							
-							
-							
-							<div class="nextinfo">
-								<p class="last">上一篇:<a href="#">免费收录网站搜索引擎登录口大全</a></p>
-								<p class="next">下一篇:<a href="#">javascript显示年月日时间代码</a></p>
-						    </div>
-							
-						</div>
-					</div>
-					
-					<div class="panel panel-default  mb-20">
-						<div class="tab-category">
-                <a href=""><strong>评论区</strong></a>
-            </div>
-						<div class="panel-body">
-							<div class="panel-body" style="margin: 0 3%;">
-                    <div class="mb-20">
-                    	<ul class="commentList">
-                            <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
-                                <div class="comment-main">
-                                    <header class="comment-header">
-                                        <div class="comment-meta"><a class="comment-author" href="#">老王</a>
-                                            <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
-                                        </div>
-                                    </header>
-                                    <div class="comment-body">
-                                        <p> 是的</p>
-                                    </div>
-                                </div>
-                            </li>
-                            <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/696C8A17B3383B88804BA92ECBAA5D81/100"></i></a>
-                                <div class="comment-main">
-                                    <header class="comment-header">
-                                        <div class="comment-meta"><a class="comment-author" href="#">老王</a>
-                                            <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
-                                        </div>
-                                    </header>
-                                    <div class="comment-body">
-                                        <p> +1</p>
-                                    </div>
-                                </div>
-                            </li>
-
-                        </ul>
-    
-                    </div>
-                    <div class="line"></div>
-                    <!--用于评论-->
-                    <div class="mt-20" id="ct">
-                        <div id="err" class="Huialert Huialert-danger hidden radius">成功状态提示</div>
-                        <textarea id="textarea1" name="comment" style="height:200px;" placeholder="看完不留一发?"> </textarea>
-                        <div class="text-r mt-10">
-                            <button onclick="getPlainTxt()" class="btn btn-primary radius" > 发表评论</button>
-                        </div>
-                    </div>
-                    <!--用于回复-->
-                    <div class="comment hidden mt-20">
-                        <div id="err2" class="Huialert Huialert-danger hidden radius">成功状态提示</div>
-                            <textarea class="textarea" style="height:100px;" > </textarea>
-                            <button onclick="hf(this);" type="button" class="btn btn-primary radius mt-10">回复</button>
-                            <a class="cancelReply f-r mt-10">取消回复</a>
-                    </div>
-
-                </div>
-						</div>
-					</div>
-				</div>
-				<div class="col-lg-3 col-md-3">
-					<!--热门推荐-->
-  	<div class="bg-fff box-shadow radius mb-20">
-			<div class="tab-category">
-				<a href=""><strong>热门推荐</strong></a>
-			</div>
-			<div class="tab-category-item">
-				<ul class="index_recd">
-					<li>
-						<a href="#">阻止a标签href默认跳转事件</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
-					</li>
-					<li >
-						<a href="#">PHP面试题汇总</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
-					</li>
-					<li >
-						<a href="#">阻止a标签href默认跳转事件</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
-					</li>
-					<li >
-						<a href="#">阻止a标签href默认跳转事件</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
-					</li>
-					<li >
-						<a href="#">PHP面试题汇总</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 276 </p>
-					</li>
-				</ul>
-			</div>
-		</div>
-						
-					<!--图片-->
-		<div class="bg-fff box-shadow radius mb-20">
-			<div class="tab-category">
-				<a href=""><strong>扫我关注</strong></a>
-			</div>
-			<div class="tab-category-item">
-				<img data-original="temp/gg.jpg" class="img-responsive lazyload" alt="响应式图片">
-			</div>
-		</div>
-					
-				</div>
-			</div>
-	
-</section>
-<footer class="footer mt-20">
-		<p>Copyright &copy;2017 wfyvv.com All Rights Reserved. <br>
-			<a href="http://www.miitbeian.gov.cn/" target="_blank" rel="nofollow">皖ICP备17002922号</a>  更多模板:<a href="http://www.cssmoban.com/" target="_blank">模板之家</a><br>
-		</p>
-</footer>
-<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
-<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
-<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
-<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
-<script type="text/javascript" src="plugin/wangEditor/js/wangEditor.min.js"></script>
-<script type="text/javascript">
-    $(function () {
-    		$("img.lazyload").lazyload({failurelimit : 3});
-    	
-        wangEditor.config.printLog = false;
-        var editor1 = new wangEditor('textarea1');
-        editor1.config.menus = ['insertcode', 'quote', 'bold', '|', 'img', 'emotion', '|', 'undo', 'fullscreen'];
-        editor1.config.emotions = { 'default': { title: '老王表情', data: 'plugin/wangEditor/emotions1.data'}, 'default2': { title: '老王心情', data: 'plugin/wangEditor/emotions3.data'}, 'default3': { title: '顶一顶', data: 'plugin/wangEditor/emotions2.data'}};
-        editor1.create();
-
-        //show reply
-        $(".hf").click(function () {
-            pId = $(this).attr("name");
-            $(this).parents(".commentList").find(".cancelReply").trigger("click");
-            $(this).parent(".comment-body").append($(".comment").clone(true));
-            $(this).parent(".comment-body").find(".comment").removeClass("hidden");
-            $(this).hide();
-        });
-        //cancel reply
-        $(".cancelReply").on('click',function () {
-            $(this).parents(".comment-body").find(".hf").show();
-            $(this).parents(".comment-body").find(".comment").remove();
-        });
-    });
-
-</script>
-</body>
-</html>

+ 0 - 191
src/main/webapp/board.html

@@ -1,191 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<title>留言板 — 一个站在java开发之路上的草根程序员个人博客网站</title>
-<meta charset="utf-8">
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
-<meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
-<LINK rel="Bookmark" href="favicon.ico" >
-<LINK rel="Shortcut Icon" href="favicon.ico" />
-<!--[if lt IE 9]>
-<script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
-<script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
-<![endif]-->
-<link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
-<link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
-<link rel="stylesheet" type="text/css" href="css/common.css" />
-<link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
-<link rel="stylesheet" type="text/css" href="plugin/wangEditor/css/wangEditor.min.css">
-<!--[if lt IE 9]>
-<link href="/staticRes/lib/h-ui/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
-<![endif]-->
-<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
-</head>
-<body>
-<header class="navbar-wrapper">
-    <div class="navbar navbar-fixed-top">
-        <div class="container cl">
-            <a class="navbar-logo hidden-xs" href="index">
-                <img class="logo" src="img/logo.png" alt="Lao王博客" />
-            </a>
-            <a class="logo navbar-logo-m visible-xs" href="index">Lao王博客</a>
-            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
-            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
-                <ul class="cl">
-                    <li class="active"> <a href="index.html" data-hover="首页">首页</a> </li>
-                    <li> <a href="about.html" data-hover="关于我">关于我</a> </li>
-                    <li> <a href="mood.html" data-hover="碎言碎语">碎言碎语</a> </li>
-                    <li><a href="article.html" data-hover="学无止尽">学无止尽</a></li>
-                    <li> <a href="board.html" data-hover="留言板">留言板</a> </li>
-                </ul>
-            </nav>
-            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
-                <ul class="cl">
-                    <li class="userInfo dropDown dropDown_hover">
-                            <!--<a href="javascript:;" ><img class="avatar radius" src="img/40.jpg" alt="丶似浅 "></a>
-                            <ul class="dropDown-menu menu radius box-shadow">
-                                <li><a href="/app/loginOut">退出</a></li>
-                            </ul>-->
-                            <a href="/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" ><img class="avatar size-S" src="img/qq.jpg" title="登入">登入</a>
-                    </li>
-                </ul>
-            </nav>
-        </div>
-    </div>
-</header>
-
-<!--导航条-->
-<nav class="breadcrumb">
-    <div class="container"> <i class="Hui-iconfont">&#xe67f;</i> <a href="index.html" class="c-primary">首页</a> <span class="c-gray en">&gt;</span>  <span class="c-gray">留言板</span> </div>
-</nav>
-
-<section class="container">
-    <div class="col-xs-12 col-md-10 col-md-offset-1 mt-20">
-        <!--用于评论-->
-        <div class="mt-20" id="ct">
-            <div id="err" class="Huialert Huialert-danger hidden radius">成功状态提示</div>
-            <textarea id="textarea1" name="comment" style="height:200px;" placeholder="看完不留一发?"> </textarea>
-            <div class="text-r mt-10">
-                <button onclick="getPlainTxt()" class="btn btn-primary radius" > 发表评论</button>
-            </div>
-        </div>
-
-        <div class="line"></div>
-
-        <ul class="commentList mt-50">
-
-          <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://q.qlogo.cn/qqapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
-                <div class="comment-main">
-                    <header class="comment-header">
-                        <div class="comment-meta"><a class="comment-author" href="#">老王</a>
-                            <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
-                        </div>
-                    </header>
-                    <div class="comment-body">
-                        你是猴子派来的救兵吗?
-
-                        <ul class="commentList">
-                            <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
-                                <div class="comment-main">
-                                    <header class="comment-header">
-                                        <div class="comment-meta"><a class="comment-author" href="#">老王</a>
-                                            <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
-                                        </div>
-                                    </header>
-                                    <div class="comment-body">
-                                        <p> 是的</p>
-                                    </div>
-                                </div>
-                            </li>
-                            <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/696C8A17B3383B88804BA92ECBAA5D81/100"></i></a>
-                                <div class="comment-main">
-                                    <header class="comment-header">
-                                        <div class="comment-meta"><a class="comment-author" href="#">老王</a>
-                                            <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
-                                        </div>
-                                    </header>
-                                    <div class="comment-body">
-                                        <p> +1</p>
-                                    </div>
-                                </div>
-                            </li>
-
-                        </ul>
-
-                        <button class="hf f-r btn btn-default size-S mt-10" name="2">回复</button>
-
-                    </div>
-                </div>
-            </li>
-            <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
-                <div class="comment-main">
-                    <header class="comment-header">
-                        <div class="comment-meta"><a class="comment-author" href="#">老王</a>
-                            <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
-                        </div>
-                    </header>
-                    <div class="comment-body">
-                        你是猴子派来的救兵吗?
-
-                        <button class="hf f-r btn btn-default size-S mt-10" name="3">回复</button>
-
-                    </div>
-                </div>
-            </li>
-
-        </ul>
-        <!--用于回复-->
-        <div class="comment hidden mt-20">
-            <div id="err2" class="Huialert Huialert-danger hidden radius">成功状态提示</div>
-            <textarea class="textarea" style="height:100px;" > </textarea>
-            <button onclick="hf(this);" type="button" class="btn btn-primary radius mt-10">回复</button>
-            <a class="cancelReply f-r mt-10">取消回复</a>
-        </div>
-
-    </div>
-</section>
-<footer class="footer mt-20">
-    <div class="container-fluid" id="foot">
-        <p>Copyright &copy; 2016-2017 www.wfyvv.com <br>
-            <a href="#" target="_blank">皖ICP备17002922号</a>  更多模板:<a href="http://www.cssmoban.com/" target="_blank">模板之家</a><br>
-        </p>
-    </div>
-</footer>
-<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
-<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
-<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
-<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
-<script type="text/javascript" src="plugin/wangEditor/js/wangEditor.min.js"></script>
-
-<script type="text/javascript">
-    $(function () {
-        wangEditor.config.printLog = false;
-        var editor1 = new wangEditor('textarea1');
-        editor1.config.menus = ['insertcode', 'quote', 'bold', '|', 'img', 'emotion', '|', 'undo', 'fullscreen'];
-        editor1.config.emotions = { 'default': { title: '老王表情', data: 'plugin/wangEditor/emotions1.data'}, 'default2': { title: '老王心情', data: 'plugin/wangEditor/emotions3.data'}, 'default3': { title: '顶一顶', data: 'plugin/wangEditor/emotions2.data'}};
-        editor1.create();
-
-        //show reply
-        $(".hf").click(function () {
-            pId = $(this).attr("name");
-            $(this).parents(".commentList").find(".cancelReply").trigger("click");
-            $(this).parent(".comment-body").append($(".comment").clone(true));
-            $(this).parent(".comment-body").find(".comment").removeClass("hidden");
-            $(this).hide();
-        });
-        //cancel reply
-        $(".cancelReply").on('click',function () {
-            $(this).parents(".comment-body").find(".hf").show();
-            $(this).parents(".comment-body").find(".comment").remove();
-        });
-    });
-
-</script>
-
-</body>
-</html>

+ 188 - 0
src/main/webapp/board.jsp

@@ -0,0 +1,188 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/10
+  Time: 19:17
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+<head>
+<title>留言板</title>
+<meta charset="utf-8">
+<meta name="renderer" content="webkit|ie-comp|ie-stand">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+<meta http-equiv="Cache-Control" content="no-siteapp" />
+<meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
+<meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
+<link rel="Bookmark" href="favicon.ico" >
+<link rel="Shortcut Icon" href="favicon.ico" />
+<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/h-ui/css/H-ui.min.css" />
+<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
+<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/common.css" />
+<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/pifu/pifu.css" />
+<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/wangEditor/css/wangEditor.min.css">
+<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
+</head>
+<body>
+<header class="navbar-wrapper">
+  <div class="navbar navbar-fixed-top">
+    <div class="container cl">
+      <a class="navbar-logo hidden-xs" href="index.do">
+        <img class="logo" src="${pageContext.request.contextPath}/static/img/logo.png" alt="Lao王博客" />
+      </a>
+      <a class="logo navbar-logo-m visible-xs" href="index.do">Lao王博客</a>
+      <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
+      <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
+        <ul class="cl">
+          <li> <a href="index.do" data-hover="首页">首页</a> </li>
+          <li> <a href="about.jsp" data-hover="关于我">关于我</a> </li>
+          <li> <a href="mood.jsp" data-hover="碎言碎语">碎言碎语</a> </li>
+          <li><a href="article.do" data-hover="学无止尽">学无止尽</a></li>
+          <li class="active"> <a href="board.jsp" data-hover="留言板">留言板</a> </li>
+        </ul>
+      </nav>
+      <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
+        <ul class="cl">
+          <li class="userInfo dropDown dropDown_hover">
+            <a href="${pageContext.request.contextPath}/admin/main.jsp">后台入口</a>
+          </li>
+        </ul>
+      </nav>
+    </div>
+  </div>
+</header>
+
+<!--导航条-->
+<nav class="breadcrumb">
+  <div class="container"> <i class="Hui-iconfont">&#xe67f;</i> <a href="index.do" class="c-primary">首页</a> <span class="c-gray en">&gt;</span>  <span class="c-gray">留言板</span> </div>
+</nav>
+
+<section class="container">
+  <div class="col-xs-12 col-md-10 col-md-offset-1 mt-20">
+    <!--用于评论-->
+    <div class="mt-20" id="ct">
+      <div id="err" class="Huialert Huialert-danger hidden radius">成功状态提示</div>
+      <textarea id="textarea1" name="comment" style="height:200px;" placeholder="看完不留一发?"> </textarea>
+      <div class="text-r mt-10">
+        <button onclick="getPlainTxt()" class="btn btn-primary radius" > 发表评论</button>
+      </div>
+    </div>
+
+    <div class="line"></div>
+
+    <ul class="commentList mt-50">
+
+      <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://q.qlogo.cn/qqapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
+        <div class="comment-main">
+          <header class="comment-header">
+            <div class="comment-meta"><a class="comment-author" href="#">老王</a>
+              <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
+            </div>
+          </header>
+          <div class="comment-body">
+            你是猴子派来的救兵吗?
+
+            <ul class="commentList">
+              <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
+                <div class="comment-main">
+                  <header class="comment-header">
+                    <div class="comment-meta"><a class="comment-author" href="#">老王</a>
+                      <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
+                    </div>
+                  </header>
+                  <div class="comment-body">
+                    <p> 是的</p>
+                  </div>
+                </div>
+              </li>
+              <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/696C8A17B3383B88804BA92ECBAA5D81/100"></i></a>
+                <div class="comment-main">
+                  <header class="comment-header">
+                    <div class="comment-meta"><a class="comment-author" href="#">老王</a>
+                      <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
+                    </div>
+                  </header>
+                  <div class="comment-body">
+                    <p> +1</p>
+                  </div>
+                </div>
+              </li>
+
+            </ul>
+
+            <button class="hf f-r btn btn-default size-S mt-10" name="2">回复</button>
+
+          </div>
+        </div>
+      </li>
+      <li class="item cl"> <a href="#"><i class="avatar size-L radius"><img alt="" src="http://qzapp.qlogo.cn/qzapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/100"></i></a>
+        <div class="comment-main">
+          <header class="comment-header">
+            <div class="comment-meta"><a class="comment-author" href="#">老王</a>
+              <time title="2014年8月31日 下午3:20" datetime="2014-08-31T03:54:20" class="f-r">2014-8-31 15:20</time>
+            </div>
+          </header>
+          <div class="comment-body">
+            你是猴子派来的救兵吗?
+
+            <button class="hf f-r btn btn-default size-S mt-10" name="3">回复</button>
+
+          </div>
+        </div>
+      </li>
+
+    </ul>
+    <!--用于回复-->
+    <div class="comment hidden mt-20">
+      <div id="err2" class="Huialert Huialert-danger hidden radius">成功状态提示</div>
+      <textarea class="textarea" style="height:100px;" > </textarea>
+      <button onclick="hf(this);" type="button" class="btn btn-primary radius mt-10">回复</button>
+      <a class="cancelReply f-r mt-10">取消回复</a>
+    </div>
+
+  </div>
+</section>
+<footer class="footer mt-20">
+  <div class="container-fluid" id="foot">
+    <p>Copyright &copy; 2017-2022 www.ftebox.cn <br>
+      <a href="#" target="_blank">基于SSM框架实现的个人博客系统</a>
+    </p>
+  </div>
+</footer>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/layer/3.0/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/h-ui/js/H-ui.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/pifu/pifu.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common.js"></script>
+<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/wangEditor/js/wangEditor.min.js"></script>
+
+<script type="text/javascript">
+  $(function () {
+    wangEditor.config.printLog = false;
+    var editor1 = new wangEditor('textarea1');
+    editor1.config.menus = ['insertcode', 'quote', 'bold', '|', 'img', 'emotion', '|', 'undo', 'fullscreen'];
+    editor1.config.emotions = { 'default': { title: '老王表情', data: 'plugin/wangEditor/emotions1.data'}, 'default2': { title: '老王心情', data: 'plugin/wangEditor/emotions3.data'}, 'default3': { title: '顶一顶', data: 'plugin/wangEditor/emotions2.data'}};
+    editor1.create();
+
+    //show reply
+    $(".hf").click(function () {
+      pId = $(this).attr("name");
+      $(this).parents(".commentList").find(".cancelReply").trigger("click");
+      $(this).parent(".comment-body").append($(".comment").clone(true));
+      $(this).parent(".comment-body").find(".comment").removeClass("hidden");
+      $(this).hide();
+    });
+    //cancel reply
+    $(".cancelReply").on('click',function () {
+      $(this).parents(".comment-body").find(".hf").show();
+      $(this).parents(".comment-body").find(".comment").remove();
+    });
+  });
+
+</script>
+
+</body>
+</html>

+ 0 - 254
src/main/webapp/index.html

@@ -1,254 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=utf-8"
-		 pageEncoding="utf-8"%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>老王个人博客 — 一个站在java开发之路上的草根程序员个人博客网站</title>
-<meta charset="utf-8">
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
-<meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
-<LINK rel="Bookmark" href="favicon.ico" >
-<LINK rel="Shortcut Icon" href="favicon.ico" />
-<!--[if lt IE 9]>
-<script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
-<script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
-<![endif]-->
-<link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
-<link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
-<link rel="stylesheet" type="text/css" href="css/common.css" />
-<link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
-<!--[if lt IE 9]>
-<link href="/staticRes/lib/h-ui/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
-<![endif]-->
-<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
-</head>
-<body>
-<header class="navbar-wrapper">
-    <div class="navbar navbar-fixed-top">
-        <div class="container cl">
-            <a class="navbar-logo hidden-xs" href="index.html">
-                <img class="logo" src="img/logo.png" alt="Lao王博客" />
-            </a>
-            <a class="logo navbar-logo-m visible-xs" href="index.html">Lao王博客</a>
-            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
-            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
-                <ul class="cl">
-                    <li class="active"> <a href="index" data-hover="首页">首页</a> </li>
-                    <li> <a href="about.html" data-hover="关于我">关于我</a> </li>
-                    <li> <a href="mood.html" data-hover="碎言碎语">碎言碎语</a> </li>
-                    <li><a href="article.html" data-hover="学无止尽">学无止尽</a></li>
-                    <li> <a href="board.html" data-hover="留言板">留言板</a> </li>
-                </ul>
-            </nav>
-            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
-                <ul class="cl">
-                    <li class="userInfo dropDown dropDown_hover">
-                            <!--<a href="javascript:;" ><img class="avatar radius" src="img/40.jpg" alt="丶似浅 "></a>
-                            <ul class="dropDown-menu menu radius box-shadow">
-                                <li><a href="/app/loginOut">退出</a></li>
-                            </ul>-->
-                            <a href="/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" ><img class="avatar size-S" src="img/qq.jpg" title="登入">登入</a>
-                    </li>
-                </ul>
-            </nav>
-        </div>
-    </div>
-</header>
-
-<section class="container pt-20">
-	<!--<div class="Huialert Huialert-info"><i class="Hui-iconfont">&#xe6a6;</i>成功状态提示</div>-->
-  <!--left-->
-  <div class="col-sm-9 col-md-9">
-  	<!--滚动图-->
-  	<div class="slider_main">
-            <div class="slider">
-                <div class="bd">
-                    <ul>
-                        <li><a href="#" target="_blank"><img src="img/temp/banner1.jpg"></a></li>
-                        <li><a href="#" target="_blank"><img src="img/temp/banner8.png"></a></li>
-                    </ul>
-                </div>
-                <ol class="hd cl dots">
-                    <li>1</li>
-                    <li>2</li>
-                </ol>
-                <a class="slider-arrow prev" href="javascript:void(0)"></a>
-                <a class="slider-arrow next" href="javascript:void(0)"></a>
-            </div>
-        </div>
-  		
-		<div class="mt-20 bg-fff box-shadow radius mb-5">
-			<div class="tab-category">
-				<a href=""><strong class="current">最新发布</strong></a>
-			</div>
-		</div>
-		<div class="art_content">
-			<ul class="index_arc">
-				<!-- 开始 -->
-                <c:forEach items="${list}" var="news">
-				<li class="index_arc_item">
-					<a href="#" class="pic">
-						<img class="lazyload" data-original="${news.newsImg}" alt="应该选" />
-					</a>
-					<h4 class="title"><a href="article_detail.html">${news.newsTitle}</a></h4>
-					<div class="date_hits">
-						<span>${news.newsAuthor}</span>
-						<span>${news.newsDate}</span>
-						<span><a href="/article-lists/10.html">${news.newsSort}</a></span>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> ${news.newsHot}° </p>
-						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span class="cy_cmt_count">${news.newsComment}</span></p>
-					</div>
-					<div class="desc">${news.newsText}</div>
-				</li>
-                </c:forEach>
-				<!-- 结束 -->
-				</ul>
-  		<div class="text-c mb-20" id="moreBlog">
-	        <a class="btn  radius btn-block " href="javascript:" onclick="moreBlog();">点击加载更多</a>
-	        <a class="btn  radius btn-block hidden" href="javascript:">加载中……</a>
-	    </div>
-		</div>
-  </div>
-  
-  <!--right-->
-  <div class="col-sm-3 col-md-3">
-  	
-  	<!--站点声明-->
-        <div class="panel panel-default mb-20">
-            <div class="panel-body">
-                <i class="Hui-iconfont" style="float: left;">&#xe62f;&nbsp;</i>
-                <div class="slideTxtBox">
-                    <div class="bd">
-                        <ul>
-                            <li><a href="javascript:void(0);">Lao博客测试版上线,欢迎访问</a></li>
-                            <li><a href="javascript:void(0);">内容如有侵犯,请立即联系管理员删除</a></li>
-                            <li><a href="javascript:void(0);">本站内容仅供学习和参阅,不做任何商业用途</a></li>
-                        </ul>
-                    </div>
-                </div>
-            </div>
-        </div>
-        
-  	<!--博主信息-->
-        <div class="bg-fff box-shadow radius mb-20">
-            <div class="tab-category">
-                <a href=""><strong>博主信息</strong></a>
-            </div>
-            <div class="tab-category-item">
-                <ul class="index_recd">
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe653;</i>姓名:${blogger.bloggerName}</li>
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe70d;</i>职业:${blogger.bloggerPro}</li>
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe63b;</i>邮箱:<a href="${blogger.bloggerEmail}">${blogger.bloggerEmail}</a></li>
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe671;</i>定位:${blogger.bloggerAddress}</li>
-                </ul>
-            </div>
-        </div>
-
-      <!--图片-->
-      <div class="bg-fff box-shadow radius mb-20">
-          <div class="tab-category">
-              <a href=""><strong>扫我关注</strong></a>
-          </div>
-          <div class="tab-category-item">
-              <img data-original="temp/gg.jpg" class="img-responsive lazyload" alt="响应式图片">
-          </div>
-      </div>
-  	
-  	<!--热门推荐-->
-  	<div class="bg-fff box-shadow radius mb-20">
-			<div class="tab-category">
-				<a href=""><strong>Linux相关</strong></a>
-			</div>
-			<div class="tab-category-item">
-				<ul class="index_recd">
-                    <c:forEach items="${lists}" var="news">
-					<li>
-						<a href="#">${news.newsTitle}</a>
-						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i>777  </p>
-					</li>
-                    </c:forEach>
-				</ul>
-			</div>
-		</div>
-		
-		<!--点击排行-->
-        <div class="bg-fff box-shadow radius mb-20">
-            <div class="tab-category">
-                <a href=""><strong>代码相关</strong></a>
-            </div>
-            <div class="tab-category-item">
-                <ul class="index_recd clickTop">
-                    <li>
-                        <a href="#">AJAX的刷新和前进后退问题解决</a>
-                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-                    </li>
-                </ul>
-            </div>
-        </div>
-		
-		<!--友情链接-->
-		<div class="bg-fff box-shadow radius mb-20">
-			<div class="tab-category">
-				<a href=""><strong>隔壁邻居</strong></a>
-			</div>
-			<div class="tab-category-item">
-				<span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">小破站</a></span>
-				<span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">GitHub</a></span>
-				<span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">恩山论坛</a></span>
-				<span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">个人网盘</a></span>
-			</div>
-		</div>
-
-		<!--分享-->
-        <div class="bg-fff box-shadow radius mb-20">
-            <div class="tab-category">
-                <a href=""><strong>站点分享</strong></a>
-            </div>
-            <div class="panel-body">
-                <div class="bdsharebuttonbox Hui-share"><a href="#" class="bds_weixin Hui-iconfont" data-cmd="weixin" title="分享到微信">&#xe694;</a><a href="#" class="bds_qzone Hui-iconfont" data-cmd="qzone" title="分享到QQ空间">&#xe6c8;</a> <a href="#" class="bds_sqq Hui-iconfont" data-cmd="sqq" title="分享到QQ好友">&#xe67b;</a> <a href="#" class="bds_tsina Hui-iconfont" data-cmd="tsina" title="分享到新浪微博">&#xe6da;</a> <a href="#" class="bds_tqq Hui-iconfont" data-cmd="tqq" title="分享到腾讯微博">&#xe6d9;</a></div>
-            </div>
-        </div>
-  </div>
-  
-</section>
-<footer class="footer mt-20">
-    <div class="container-fluid" id="foot">
-        <p>Copyright &copy; 2016-2017 www.wfyvv.com <br>
-            <a href="#" target="_blank">皖ICP备17002922号</a>  更多模板:<a href="http://www.cssmoban.com/" target="_blank">模板之家</a><br>
-        </p>
-    </div>
-</footer>
-<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
-<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
-<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
-<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
-<script type="text/javascript" src="plugin/jquery.SuperSlide/2.1.1/jquery.SuperSlide.min.js"></script>
-
-<script>
-$(function(){
-//幻灯片
-jQuery(".slider_main .slider").slide({mainCell: ".bd ul", titCell: ".hd li", trigger: "mouseover", effect: "leftLoop", autoPlay: true, delayTime: 700, interTime: 2000, pnLoop: true, titOnClassName: "active"})
-//tips
-jQuery(".slideTxtBox").slide({titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "top", autoPlay: true});
-//标签
-	$(".tags a").each(function(){
-		var x = 9;
-		var y = 0;
-		var rand = parseInt(Math.random() * (x - y + 1) + y);
-		$(this).addClass("tags"+rand)
-	});
-	
-	$("img.lazyload").lazyload({failurelimit : 3});
-});
-
-</script> 
-
-</body>
-</html>

+ 128 - 104
src/main/webapp/index.jsp

@@ -1,58 +1,63 @@
 <%@ page language="java" contentType="text/html; charset=utf-8"
-         pageEncoding="utf-8"%>
+         pageEncoding="utf-8" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
 <!DOCTYPE HTML>
 <html>
 <head>
-    <title>老王个人博客 — 一个站在java开发之路上的草根程序员个人博客网站</title>
+    <title>老王个人博客</title>
     <meta charset="utf-8">
     <meta name="renderer" content="webkit|ie-comp|ie-stand">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-    <meta http-equiv="Cache-Control" content="no-siteapp" />
-    <meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <meta name="keywords" content="个人博客,纳进财个人博客,个人博客系统">
     <meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
-    <LINK rel="Bookmark" href="favicon.ico" >
-    <LINK rel="Shortcut Icon" href="favicon.ico" />
-    <!--[if lt IE 9]>
-    <script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
-    <script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
-    <![endif]-->
-    <link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
-    <link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
-    <link rel="stylesheet" type="text/css" href="css/common.css" />
-    <link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
-    <!--[if lt IE 9]>
-    <link href="/staticRes/lib/h-ui/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
-    <![endif]-->
-    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
+    <link rel="Bookmark" href="favicon.ico">
+    <link rel="Shortcut Icon" href="favicon.ico"></link>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/plugin/h-ui/css/H-ui.min.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/plugin/Hui-iconfont/1.0.8/iconfont.min.css"/>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/common.css"/>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/pifu/pifu.css"/>
+    <script type="application/x-javascript"> addEventListener("load", function () {
+        setTimeout(hideURLbar, 0);
+    }, false);
+
+    function hideURLbar() {
+        window.scrollTo(0, 1);
+    }
+
+    function showSide() {
+        $('.navbar-nav').toggle();
+    }</script>
 </head>
 <body>
 <header class="navbar-wrapper">
     <div class="navbar navbar-fixed-top">
         <div class="container cl">
-            <a class="navbar-logo hidden-xs" href="index.html">
-                <img class="logo" src="img/logo.png" alt="Lao王博客" />
+            <a class="navbar-logo hidden-xs" href="index.do">
+                <img class="logo" src="${pageContext.request.contextPath}/static/img/logo.png" alt="Lao王博客"/>
             </a>
-            <a class="logo navbar-logo-m visible-xs" href="index.html">Lao王博客</a>
-            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
+            <a class="logo navbar-logo-m visible-xs" href="index.do">Lao王博客</a>
+            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);"
+               onclick="showSide();">&#xe667;</a>
             <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
                 <ul class="cl">
-                    <li class="active"> <a href="index" data-hover="首页">首页</a> </li>
-                    <li> <a href="about.html" data-hover="关于我">关于我</a> </li>
-                    <li> <a href="mood.html" data-hover="碎言碎语">碎言碎语</a> </li>
-                    <li><a href="article.html" data-hover="学无止尽">学无止尽</a></li>
-                    <li> <a href="board.html" data-hover="留言板">留言板</a> </li>
+                    <li class="active"><a href="index.do" data-hover="首页">首页</a></li>
+                    <li><a href="about.jsp" data-hover="关于我">关于我</a></li>
+                    <li><a href="mood.jsp" data-hover="碎言碎语">碎言碎语</a></li>
+                    <li><a href="article.do" data-hover="学无止尽">学无止尽</a></li>
+                    <li><a href="board.jsp" data-hover="留言板">留言板</a></li>
                 </ul>
             </nav>
             <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
                 <ul class="cl">
                     <li class="userInfo dropDown dropDown_hover">
-                        <!--<a href="javascript:;" ><img class="avatar radius" src="img/40.jpg" alt="丶似浅 "></a>
-                        <ul class="dropDown-menu menu radius box-shadow">
-                            <li><a href="/app/loginOut">退出</a></li>
-                        </ul>-->
-                        <a href="/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" ><img class="avatar size-S" src="img/qq.jpg" title="登入">登入</a>
+                        <a href="${pageContext.request.contextPath}/admin/main.jsp">后台入口</a>
                     </li>
                 </ul>
             </nav>
@@ -69,8 +74,10 @@
             <div class="slider">
                 <div class="bd">
                     <ul>
-                        <li><a href="#" target="_blank"><img src="img/temp/banner1.jpg"></a></li>
-                        <li><a href="#" target="_blank"><img src="img/temp/banner8.png"></a></li>
+                        <li><a href="#" target="_blank"><img
+                                src="${pageContext.request.contextPath}/static/img/temp/banner1.jpg"></a></li>
+                        <li><a href="#" target="_blank"><img
+                                src="${pageContext.request.contextPath}/static/img/temp/banner8.png"></a></li>
                     </ul>
                 </div>
                 <ol class="hd cl dots">
@@ -90,27 +97,27 @@
         <div class="art_content">
             <ul class="index_arc">
                 <!-- 开始 -->
-                <c:forEach items="${list}" var="news">
+                <c:forEach items="${blogList}" var="blog">
                     <li class="index_arc_item">
                         <a href="#" class="pic">
-                            <img class="lazyload" data-original="${news.newsImg}" alt="应该选" />
+                            <img class="lazyload" data-original="/static/uploader/image/111.jpg" alt="这是图片"/>
                         </a>
-                        <h4 class="title"><a href="article_detail.html">${news.newsTitle}</a></h4>
+                        <h4 class="title"><a href="${pageContext.request.contextPath}/article_datali.do?id=${blog.id}">${blog.title}</a></h4>
                         <div class="date_hits">
-                            <span>${news.newsAuthor}</span>
-                            <span>${news.newsDate}</span>
-                            <span><a href="/article-lists/10.html">${news.newsSort}</a></span>
-                            <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> ${news.newsHot}° </p>
-                            <p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span class="cy_cmt_count">${news.newsComment}</span></p>
+                            <span>发表日期:</span>
+                            <span><fmt:formatDate value="${blog.releaseDate}" type="date" pattern="yyyy年MM月dd日"/></span>
+                            <span><a href="${pageContext.request.contextPath}/article_datali.do?id=${blog.id}">查看详情</a></span>
+                            <p class="hits"><i class="Hui-iconfont" title="点击量">${blog.clickHit}&#xe6c1;</i></p>
+                            <p class="commonts"><i class="Hui-iconfont" title="回复数">${blog.replyHit}&#xe622;</i> <span
+                                    class="cy_cmt_count"></span></p>
                         </div>
-                        <div class="desc">${news.newsText}</div>
+                        <div class="desc">${blog.summary}</div>
                     </li>
                 </c:forEach>
                 <!-- 结束 -->
             </ul>
             <div class="text-c mb-20" id="moreBlog">
-                <a class="btn  radius btn-block " href="javascript:" onclick="moreBlog();">点击加载更多</a>
-                <a class="btn  radius btn-block hidden" href="javascript:">加载中……</a>
+                ${pageCode}
             </div>
         </div>
     </div>
@@ -134,62 +141,52 @@
             </div>
         </div>
 
-        <!--博主信息-->
-        <div class="bg-fff box-shadow radius mb-20">
-            <div class="tab-category">
-                <a href=""><strong>博主信息</strong></a>
-            </div>
-            <div class="tab-category-item">
-                <ul class="index_recd">
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe653;</i>姓名:${blogger.bloggerName}</li>
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe70d;</i>职业:${blogger.bloggerPro}</li>
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe63b;</i>邮箱:<a href="${blogger.bloggerEmail}">${blogger.bloggerEmail}</a></li>
-                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe671;</i>定位:${blogger.bloggerAddress}</li>
-                </ul>
-            </div>
-        </div>
-
-        <!--图片-->
+        <!-- 头像 -->
         <div class="bg-fff box-shadow radius mb-20">
             <div class="tab-category">
                 <a href=""><strong>扫我关注</strong></a>
             </div>
             <div class="tab-category-item">
-                <img data-original="temp/gg.jpg" class="img-responsive lazyload" alt="响应式图片">
+                <img data-original="${pageContext.request.contextPath}/static/uploader/image/${blogger.imageName}"
+                     class="img-responsive lazyload" alt="响应式图片">
             </div>
         </div>
 
-        <!--热门推荐-->
+        <!--博主信息-->
         <div class="bg-fff box-shadow radius mb-20">
             <div class="tab-category">
-                <a href=""><strong>Linux相关</strong></a>
+                <a href=""><strong>博主信息</strong></a>
             </div>
             <div class="tab-category-item">
                 <ul class="index_recd">
-                    <c:forEach items="${lists}" var="news">
-                        <li>
-                            <a href="#">${news.newsTitle}</a>
-                            <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i>777  </p>
-                        </li>
-                    </c:forEach>
+                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe653;</i>用户名:${blogger.userName}</li>
+                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe70d;</i>昵&nbsp;&nbsp;称:${blogger.nickName}
+                    </li>
+                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe63b;</i>职&nbsp;&nbsp;业:${blogger.sign}</li>
+                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe671;</i>定&nbsp;&nbsp;位:甘肃兰州</li>
                 </ul>
             </div>
         </div>
 
-        <!--点击排行-->
-        <div class="bg-fff box-shadow radius mb-20">
-            <div class="tab-category">
-                <a href=""><strong>代码相关</strong></a>
-            </div>
-            <div class="tab-category-item">
-                <ul class="index_recd clickTop">
-                    <li>
-                        <a href="#">AJAX的刷新和前进后退问题解决</a>
-                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
-                    </li>
-                </ul>
+        <c:forEach var="blogType" items="${blogTypeCountList}">
+            <div class="bg-fff box-shadow radius mb-20">
+                <div class="tab-category">
+                    <a href=""><strong>${blogType.typeName}</strong></a>
+                </div>
+                <div class="tab-category-item">
+                    <ul class="index_recd">
+                        <c:forEach items="${blogList}" var="blog">
+                            <c:if test="${blog.blogType.id == blogType.id}">
+                                <li>
+                                    <a href="#">${blog.title}</a>
+                                    <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i>${blog.clickHit}</p>
+                                </li>
+                            </c:if>
+                        </c:forEach>
+                    </ul>
+                </div>
             </div>
-        </div>
+        </c:forEach>
 
         <!--友情链接-->
         <div class="bg-fff box-shadow radius mb-20">
@@ -197,10 +194,9 @@
                 <a href=""><strong>隔壁邻居</strong></a>
             </div>
             <div class="tab-category-item">
-                <span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">小破站</a></span>
-                <span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">GitHub</a></span>
-                <span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">恩山论坛</a></span>
-                <span><i class="Hui-iconfont">&#xe6f1;</i><a href="#" class="btn-link">个人网盘</a></span>
+                <c:forEach items="${linkList}" var="linkList">
+                    <span><i class="Hui-iconfont">&#xe6f1;</i><a href="${linkList.linkUrl}" class="btn-link">${linkList.linkName}</a></span>
+                </c:forEach>
             </div>
         </div>
 
@@ -210,7 +206,14 @@
                 <a href=""><strong>站点分享</strong></a>
             </div>
             <div class="panel-body">
-                <div class="bdsharebuttonbox Hui-share"><a href="#" class="bds_weixin Hui-iconfont" data-cmd="weixin" title="分享到微信">&#xe694;</a><a href="#" class="bds_qzone Hui-iconfont" data-cmd="qzone" title="分享到QQ空间">&#xe6c8;</a> <a href="#" class="bds_sqq Hui-iconfont" data-cmd="sqq" title="分享到QQ好友">&#xe67b;</a> <a href="#" class="bds_tsina Hui-iconfont" data-cmd="tsina" title="分享到新浪微博">&#xe6da;</a> <a href="#" class="bds_tqq Hui-iconfont" data-cmd="tqq" title="分享到腾讯微博">&#xe6d9;</a></div>
+                <div class="bdsharebuttonbox Hui-share">
+                    <a href="#" class="bds_weixin Hui-iconfont" data-cmd="weixin"
+                       title="分享到微信">&#xe694;</a>
+                    <a href="#" class="bds_qzone Hui-iconfont" data-cmd="qzone" title="分享到QQ空间">&#xe6c8;</a>
+                    <a href="#" class="bds_sqq Hui-iconfont" data-cmd="sqq" title="分享到QQ好友">&#xe67b;</a>
+                    <a href="#" class="bds_tsina Hui-iconfont" data-cmd="tsina" title="分享到新浪微博">&#xe6da;</a>
+                    <a href="#" class="bds_tqq Hui-iconfont" data-cmd="tqq" title="分享到腾讯微博">&#xe6d9;</a>
+                </div>
             </div>
         </div>
     </div>
@@ -218,34 +221,55 @@
 </section>
 <footer class="footer mt-20">
     <div class="container-fluid" id="foot">
-        <p>Copyright &copy; 2016-2017 www.wfyvv.com <br>
-            <a href="#" target="_blank">皖ICP备17002922号</a>  更多模板:<a href="http://www.cssmoban.com/" target="_blank">模板之家</a><br>
+        <p>Copyright &copy; 2017-2022 www.ftebox.cn <br>
+            <a href="#" target="_blank">基于SSM框架实现的个人博客系统</a>
         </p>
     </div>
 </footer>
-<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
-<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
-<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
-<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
-<script type="text/javascript" src="plugin/jquery.SuperSlide/2.1.1/jquery.SuperSlide.min.js"></script>
+<script type="text/javascript"
+        src="${pageContext.request.contextPath}/static/plugin/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/layer/3.0/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/h-ui/js/H-ui.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/pifu/pifu.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common.js"></script>
+<script> $(function () {
+    $(window).on("scroll", backToTopFun);
+    backToTopFun();
+}); </script>
+<script type="text/javascript"
+        src="${pageContext.request.contextPath}/static/plugin/jquery.SuperSlide/2.1.1/jquery.SuperSlide.min.js"></script>
 
 <script>
-    $(function(){
+    $(function () {
 //幻灯片
-        jQuery(".slider_main .slider").slide({mainCell: ".bd ul", titCell: ".hd li", trigger: "mouseover", effect: "leftLoop", autoPlay: true, delayTime: 700, interTime: 2000, pnLoop: true, titOnClassName: "active"})
+        jQuery(".slider_main .slider").slide({
+            mainCell: ".bd ul",
+            titCell: ".hd li",
+            trigger: "mouseover",
+            effect: "leftLoop",
+            autoPlay: true,
+            delayTime: 700,
+            interTime: 2000,
+            pnLoop: true,
+            titOnClassName: "active"
+        })
 //tips
-        jQuery(".slideTxtBox").slide({titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "top", autoPlay: true});
+        jQuery(".slideTxtBox").slide({
+            titCell: ".hd ul",
+            mainCell: ".bd ul",
+            autoPage: true,
+            effect: "top",
+            autoPlay: true
+        });
 //标签
-        $(".tags a").each(function(){
+        $(".tags a").each(function () {
             var x = 9;
             var y = 0;
             var rand = parseInt(Math.random() * (x - y + 1) + y);
-            $(this).addClass("tags"+rand)
+            $(this).addClass("tags" + rand)
         });
 
-        $("img.lazyload").lazyload({failurelimit : 3});
+        $("img.lazyload").lazyload({failurelimit: 3});
     });
 
 </script>

+ 2 - 2
src/main/webapp/login.jsp

@@ -210,10 +210,10 @@
 
         <div style="height: 50px;line-height: 50px;margin-top: 30px;border-top: 1px solid #e7e7e7;">
             <p style="margin: 0 35px 20px 45px;">
-                <span style="float: left"><a href="${pageContext.request.contextPath}/index.jsp" style="color:#ccc;">返回主页</a></span>
+                <span style="float: left"><a href="${pageContext.request.contextPath}/index.do" style="color:#ccc;">返回主页</a></span>
                 <span><font color="red" id="error">${errorInfo}</font></span>
                 <span style="float: right">
-                    <a href="#" style="color:#ccc;margin-right:10px;">注册</a>
+                    <a href="${pageContext.request.contextPath}/register.jsp" style="color:#ccc;margin-right:10px;">注册</a>
                     <button type="submit" style="background: #008ead;padding: 7px 10px;border-radius: 4px;border: 1px solid #1a7598;color: #FFF;font-weight: bold;">登录</button>
                 </span>
             </p>

+ 0 - 240
src/main/webapp/mood.html

@@ -1,240 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>碎言碎语 — 一个站在java开发之路上的草根程序员个人博客网站</title>
-<meta charset="utf-8">
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<meta name="keywords" content="个人博客,王风宇个人博客,个人博客系统,老王博客,王风宇">
-<meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
-<LINK rel="Bookmark" href="favicon.ico" >
-<LINK rel="Shortcut Icon" href="favicon.ico" />
-<!--[if lt IE 9]>
-<script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
-<script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
-<![endif]-->
-<link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
-<link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
-<link rel="stylesheet" type="text/css" href="css/common.css" />
-<link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
-<link rel="stylesheet" type="text/css" href="css/timeline.css" />
-<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
-</head>
-<body>
-<header class="navbar-wrapper">
-    <div class="navbar navbar-fixed-top">
-        <div class="container cl">
-            <a class="navbar-logo hidden-xs" href="/">
-                <img class="logo" src="img/logo.png" alt="Lao王博客" />
-            </a>
-            <a class="logo navbar-logo-m visible-xs" href="index">Lao王博客</a>
-            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
-            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
-                <ul class="cl">
-                    <li class="active"> <a href="index" data-hover="首页">首页</a> </li>
-                    <li> <a href="about.html" data-hover="关于我">关于我</a> </li>
-                    <li> <a href="mood.html" data-hover="碎言碎语">碎言碎语</a> </li>
-                    <li><a href="article.html" data-hover="学无止尽">学无止尽</a></li>
-                    <li> <a href="board.html" data-hover="留言板">留言板</a> </li>
-                </ul>
-            </nav>
-            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
-                <ul class="cl">
-                    <li class="userInfo dropDown dropDown_hover">
-                            <!--<a href="javascript:;" ><img class="avatar radius" src="img/40.jpg" alt="丶似浅 "></a>
-                            <ul class="dropDown-menu menu radius box-shadow">
-                                <li><a href="/app/loginOut">退出</a></li>
-                            </ul>-->
-                            <a href="/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" ><img class="avatar size-S" src="img/qq.jpg" title="登入">登入</a>
-                    </li>
-                </ul>
-            </nav>
-        </div>
-    </div>
-</header>
-
-<!--导航条-->
-<nav class="breadcrumb">
-    <div class="container"><i class="Hui-iconfont">&#xe67f;</i> <a href="index.html" class="c-primary">首页</a> <span class="c-gray en">&gt;</span> <span class="c-gray">碎言碎语</span></div>
-</nav>
-
-<section class="container mt-20">
-    <div class="container-fluid">
-        <div class="timeline">
-        	
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					<div class="cd-timeline-block">
-					    <div class="cd-timeline-img cd-picture">
-					        <img src="css/timeline/cd-icon-location.svg" alt="position">
-					    </div>
-					    <div class="cd-timeline-content">
-					        <h4>测试测试</h4>
-					        <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
-					        <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
-					        <span class="cd-date">2017年1月01日</span>
-					    </div>
-					</div>
-					
-        </div>
-    </div>
-
-</section>
-<footer class="footer mt-20">
-    <div class="container-fluid" id="foot">
-        <p>Copyright &copy; 2016-2017 www.wfyvv.com <br>
-            <a href="#" target="_blank">皖ICP备17002922号</a>  更多模板:<a href="http://www.cssmoban.com/" target="_blank">模板之家</a><br>
-        </p>
-    </div>
-</footer>
-<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
-<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
-<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
-<script type="text/javascript" src="plugin/pifu/pifu.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
-<script>
-    $(function () {
-        //on scolling, show/animate timeline blocks when enter the viewport
-        $(window).on('scroll', function () {
-            $('.cd-timeline-block').each(function () {
-                if ($(this).offset().top <= $(window).scrollTop() + $(window).height() * 0.75 && $(this).find('.cd-timeline-img').hasClass('is-hidden')) {
-                    $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in');
-                }
-                if ($(window).scrollTop() - $(this).offset().top > 0) {
-                    $(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden').removeClass('bounce-in');
-                }
-                
-            });
-           $('.cd-timeline-block').each(function(){
-                if($(this).offset().top < $(window).scrollTop()+$(window).height()*0.75) {
-                    $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden');
-                }
-            });
-        });
-    });
-
-</script>
-</body>
-</html>

+ 239 - 0
src/main/webapp/mood.jsp

@@ -0,0 +1,239 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/10
+  Time: 19:12
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<!DOCTYPE HTML>
+<html>
+<head>
+    <title>碎言碎语 — 一个站在java开发之路上的草根程序员个人博客网站</title>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <meta name="keywords" content="个人博客,纳进财个人博客,个人博客系统,老王博客">
+    <meta name="description" content="Lao王博客系统,一个站在java开发之路上的草根程序员个人博客网站。">
+    <link rel="Bookmark" href="favicon.ico" >
+    <link rel="Shortcut Icon" href="favicon.ico" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/h-ui/css/H-ui.min.css" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/common.css" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/plugin/pifu/pifu.css" />
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/timeline.css" />
+    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
+</head>
+<body>
+<header class="navbar-wrapper">
+    <div class="navbar navbar-fixed-top">
+        <div class="container cl">
+            <a class="navbar-logo hidden-xs" href="/">
+                <img class="logo" src="${pageContext.request.contextPath}/static/img/logo.png" alt="Lao王博客" />
+            </a>
+            <a class="logo navbar-logo-m visible-xs" href="index.do">Lao王博客</a>
+            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
+            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
+                <ul class="cl">
+                    <li> <a href="index.do" data-hover="首页">首页</a> </li>
+                    <li> <a href="about.jsp" data-hover="关于我">关于我</a> </li>
+                    <li class="active"> <a href="mood.jsp" data-hover="碎言碎语">碎言碎语</a> </li>
+                    <li><a href="article.do" data-hover="学无止尽">学无止尽</a></li>
+                    <li> <a href="board.jsp" data-hover="留言板">留言板</a> </li>
+                </ul>
+            </nav>
+            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
+                <ul class="cl">
+                    <li class="userInfo dropDown dropDown_hover">
+                        <a href="${pageContext.request.contextPath}/admin/main.jsp">后台入口</a>
+                    </li>
+                </ul>
+            </nav>
+        </div>
+    </div>
+</header>
+
+<!--导航条-->
+<nav class="breadcrumb">
+    <div class="container"><i class="Hui-iconfont">&#xe67f;</i> <a href="index.do" class="c-primary">首页</a> <span class="c-gray en">&gt;</span> <span class="c-gray">碎言碎语</span></div>
+</nav>
+
+<section class="container mt-20">
+    <div class="container-fluid">
+        <div class="timeline">
+
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+            <div class="cd-timeline-block">
+                <div class="cd-timeline-img cd-picture">
+                    <img src="css/timeline/cd-icon-location.svg" alt="position">
+                </div>
+                <div class="cd-timeline-content">
+                    <h4>测试测试</h4>
+                    <p>Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。Lao王博客测试版本上线。。</p>
+                    <a href="http://www.wfyvv.com" class="f-r"><input class="btn btn-success size-S" type="button" value="更多"></a>
+                    <span class="cd-date">2017年1月01日</span>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</section>
+<footer class="footer mt-20">
+    <div class="container-fluid" id="foot">
+        <p>Copyright &copy; 2017-2022 www.ftebox.cn <br>
+            <a href="#" target="_blank">基于SSM框架实现的个人博客系统</a>
+        </p>
+    </div>
+</footer>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/layer/3.0/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/h-ui/js/H-ui.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/plugin/pifu/pifu.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common.js"></script>
+<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
+<script>
+    $(function () {
+        //on scolling, show/animate timeline blocks when enter the viewport
+        $(window).on('scroll', function () {
+            $('.cd-timeline-block').each(function () {
+                if ($(this).offset().top <= $(window).scrollTop() + $(window).height() * 0.75 && $(this).find('.cd-timeline-img').hasClass('is-hidden')) {
+                    $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in');
+                }
+                if ($(window).scrollTop() - $(this).offset().top > 0) {
+                    $(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden').removeClass('bounce-in');
+                }
+
+            });
+            $('.cd-timeline-block').each(function(){
+                if($(this).offset().top < $(window).scrollTop()+$(window).height()*0.75) {
+                    $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden');
+                }
+            });
+        });
+    });
+
+</script>
+</body>
+</html>

+ 237 - 0
src/main/webapp/register.jsp

@@ -0,0 +1,237 @@
+<%--@elvariable id="blogger" type="org.springframework.remoting.jaxws.JaxWsPortClientInterceptor"--%>
+<%--@elvariable id="errorInfo" type="cn"--%>
+<%--
+  Created by IntelliJ IDEA.
+  User: njc
+  Date: 2022/5/5
+  Time: 14:47
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+<head>
+    <title>注册界面</title>
+    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
+    <style>
+        body {
+            background: #ebebeb;
+            font-family: "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", "\9ED1\4F53", Arial, sans-serif;
+            color: #222;
+            font-size: 12px;
+        }
+
+        * {
+            padding: 0;
+            margin: 0;
+        }
+
+        .top_div {
+            background: #008ead;
+            width: 100%;
+            height: 400px;
+        }
+
+        .ipt {
+            border: 1px solid #d3d3d3;
+            width: 330px;
+            border-radius: 4px;
+            padding: 10px 10px 10px 40px;
+            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+            box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+            -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+            -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+            transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s
+        }
+
+        .ipt:focus {
+            border-color: #66afe9;
+            outline: 0;
+            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
+            box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)
+        }
+
+        .u_logo {
+            background: url("${pageContext.request.contextPath}/static/img/username.png") no-repeat;
+            padding: 10px 10px;
+            position: absolute;
+            top: 43px;
+            left: 50px;
+
+        }
+
+        .p_logo {
+            background: url("${pageContext.request.contextPath}/static/img/password.png") no-repeat;
+            padding: 10px 10px;
+            position: absolute;
+            top: 12px;
+            left: 50px;
+        }
+
+        a {
+            text-decoration: none;
+        }
+
+        .tou {
+            background: url("${pageContext.request.contextPath}/static/img/tou.png") no-repeat;
+            width: 97px;
+            height: 92px;
+            position: absolute;
+            top: -87px;
+            left: 140px;
+        }
+
+        .left_hand {
+            background: url("${pageContext.request.contextPath}/static/img/left_hand.png") no-repeat;
+            width: 32px;
+            height: 37px;
+            position: absolute;
+            top: -38px;
+            left: 150px;
+        }
+
+        .right_hand {
+            background: url("${pageContext.request.contextPath}/static/img/right_hand.png") no-repeat;
+            width: 32px;
+            height: 37px;
+            position: absolute;
+            top: -38px;
+            right: -64px;
+        }
+
+        .initial_left_hand {
+            background: url("${pageContext.request.contextPath}/static/img/hand.png") no-repeat;
+            width: 30px;
+            height: 20px;
+            position: absolute;
+            top: -12px;
+            left: 100px;
+        }
+
+        .initial_right_hand {
+            background: url("${pageContext.request.contextPath}/static/img/hand.png") no-repeat;
+            width: 30px;
+            height: 20px;
+            position: absolute;
+            top: -12px;
+            right: -112px;
+        }
+
+        .left_handing {
+            background: url("${pageContext.request.contextPath}/static/img/left-handing.png") no-repeat;
+            width: 30px;
+            height: 20px;
+            position: absolute;
+            top: -24px;
+            left: 139px;
+        }
+
+        .right_handinging {
+            background: url("${pageContext.request.contextPath}/static/img/right_handing.png") no-repeat;
+            width: 30px;
+            height: 20px;
+            position: absolute;
+            top: -21px;
+            left: 210px;
+        }
+
+    </style>
+    <script type="text/javascript">
+        $(function () {
+            //得到焦点
+            $("#password").focus(function () {
+                $("#left_hand").animate({
+                    left: "150",
+                    top: " -38"
+                }, {
+                    step: function () {
+                        if (parseInt($("#left_hand").css("left")) > 140) {
+                            $("#left_hand").attr("class", "left_hand");
+                        }
+                    }
+                }, 2000);
+                $("#right_hand").animate({
+                    right: "-64",
+                    top: "-38px"
+                }, {
+                    step: function () {
+                        if (parseInt($("#right_hand").css("right")) > -70) {
+                            $("#right_hand").attr("class", "right_hand");
+                        }
+                    }
+                }, 2000);
+            });
+            //失去焦点
+            $("#password").blur(function () {
+                $("#left_hand").attr("class", "initial_left_hand");
+                $("#left_hand").attr("style", "left:100px;top:-12px;");
+                $("#right_hand").attr("class", "initial_right_hand");
+                $("#right_hand").attr("style", "right:-112px;top:-12px");
+            });
+        });
+
+        /**
+         * 用户密码验证
+         */
+        function checkForm() {
+            var userName = $("#userName").val();
+            console.log(userName);
+            var password = $("#password").val();
+            console.log(password);
+            if (userName == null || userName === "") {
+                alert("用户名不能为空!");
+                return false;
+            }
+            if (password == null || password === "") {
+                alert("密码不能为空!");
+                return false;
+            }
+            return true;
+        }
+
+        function reg() {
+            var userName = $("#userName").val();
+            var password = $("#password").val();
+            $.post("${pageContext.request.contextPath}/blogger/register.do",
+                {'userName':userName,'password':password},
+                function (result) {
+                    if(result.success){
+                        window.location.reload();
+                        alert("注册成功,请登录!")
+                    }else {
+                        alert("注册失败,请重新提交!")
+                    }
+                },"json");
+        }
+    </script>
+</head>
+<body>
+<div class="top_div"></div>
+    <div style="width: 400px;height: 200px;background: #ffffff;text-align: center;margin: -100px auto auto;border: 1px solid #e7e7e7">
+        <div style="width: 165px;height: 96px;position: absolute">
+            <div class="tou"></div>
+            <div id="left_hand" class="initial_left_hand"></div>
+            <div id="right_hand" class="initial_right_hand"></div>
+        </div>
+
+        <p style="padding: 30px 0 10px 0;position: relative;">
+            <span class="u_logo"></span>
+            <input class="ipt" type="text" name="userName" id="userName" placeholder="请输入用户名或邮箱">
+        </p>
+        <p style="position: relative;">
+            <span class="p_logo"></span>
+            <input id="password" class="ipt" name="password" type="password" placeholder="请输入密码">
+        </p>
+
+        <div style="height: 50px;line-height: 50px;margin-top: 30px;border-top: 1px solid #e7e7e7;">
+            <p style="margin: 0 35px 20px 45px;">
+                <span style="float: left"><a href="${pageContext.request.contextPath}/index.do" style="color:#ccc;">返回主页</a></span>
+                <span><font color="red" id="error">${errorInfo}</font></span>
+                <span style="float: right">
+                    <button type="submit" onclick="reg()" style="background: #008ead;padding: 7px 10px;border-radius: 4px;border: 1px solid #1a7598;color: #FFF;font-weight: bold;">注册</button>
+                    <a href="login.jsp" style="color:#ccc;margin-right:10px;">登录</a>
+                </span>
+            </p>
+        </div>
+    </div>
+</body>
+</html>

BIN
src/main/webapp/static/uploader/image/111.jpg


BIN
src/main/webapp/static/uploader/image/9.png


+ 0 - 20
src/main/webapp/test.jsp

@@ -1,20 +0,0 @@
-<%--
-  Created by IntelliJ IDEA.
-  User: njc
-  Date: 2022/5/5
-  Time: 23:26
-  To change this template use File | Settings | File Templates.
---%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<html>
-<head>
-    <title>Title</title>
-</head>
-<body>
-<form action="${pageContext.request.contextPath}/blogger/login.do" method="post">
-    <input name="userName" id="userName">
-    <input name="password" id="password">
-    <button type="submit">提交</button>
-</form>
-</body>
-</html>

Some files were not shown because too many files changed in this diff