├── Data.jsp ├── Index.jsp ├── about.jsp ├── ajaxGet.jsp ├── css ├── Index.css ├── about.css ├── album.css ├── data.css ├── friends.css ├── messageBoard.css ├── mobile.css ├── mystyle.css ├── recommend.css ├── search.css ├── setting.css └── visitHome.css ├── delete.jsp ├── deleteMessageBoard.jsp ├── deleteMessageBoard2.jsp ├── friends.jsp ├── images ├── .DS_Store ├── aboutWrap.jpg ├── arrows-30.png ├── avatar │ ├── default_avatar.jpeg │ ├── default_avatar.jpg │ ├── fon.jpg │ ├── hh.png │ ├── lexBurner.png │ ├── prin.png │ ├── tomato.png │ ├── xmq.jpeg │ ├── zhou.png │ ├── zhuang.jpg │ ├── zkh.jpeg │ ├── zsh.jpeg │ └── zyl.jpeg ├── back.png ├── bamboo.png ├── blogEmpty.jpg ├── boke.png ├── carousel │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── leaves.jpg │ ├── tower.jpg │ └── water.jpg ├── close.png ├── default_avatar.jpeg ├── default_avatar.jpg ├── dianzan.png ├── emoji │ ├── angry.png │ ├── astonishing.png │ ├── cool.png │ ├── embarrassed.png │ ├── ghost.png │ ├── hurt.png │ ├── laugh.png │ ├── laughcry.png │ ├── liking.png │ ├── naughty.png │ ├── sad.png │ ├── shit.png │ ├── shocking.png │ ├── skeleton.png │ ├── sleep.png │ ├── think.png │ ├── vomit.png │ ├── weap.png │ ├── ʺ.png │ ├── 受伤.png │ ├── 吐.png │ ├── 喜欢.png │ ├── 大笑.png │ ├── 尴尬.png │ ├── 屎.png │ ├── 思考.png │ ├── 惊讶.png │ ├── 流泪.png │ ├── 生气.png │ ├── 睡觉.png │ ├── 笑哭.png │ ├── 耍酷.png │ ├── 调皮.png │ ├── 难过.png │ ├── 震惊.png │ ├── 骷髅.png │ └── 鬼脸.png ├── expand-menu.png ├── expand_black.png ├── fan.png ├── guanzhu.png ├── homepic.jpeg ├── horse.png ├── icon │ ├── .DS_Store │ ├── bold.png │ ├── dataEdit.png │ ├── email.png │ ├── exit.png │ ├── gaojibianji.png │ ├── huanyuan.png │ ├── jinghao.png │ ├── level3Comment.png │ ├── link.png │ ├── maobi.png │ ├── phone.png │ ├── picture.png │ ├── quanping.png │ ├── return.png │ ├── search.png │ ├── search2.png │ ├── setting.png │ ├── submit.png │ ├── title.png │ ├── underline.png │ ├── xiaolian.png │ ├── xieti.png │ ├── zhizhang.png │ └── ziliao.png ├── navigator.png ├── pen.png ├── picture.png ├── recommend │ ├── fon.jpg │ ├── grass.jpg │ ├── hh.png │ ├── leaves.jpg │ ├── lexBurner.png │ ├── prin.png │ ├── tomato.png │ ├── tower.jpg │ ├── water.jpg │ └── zhou.png ├── team │ ├── .DS_Store │ ├── xmq.jpeg │ ├── zkh.jpeg │ ├── zsh.jpeg │ └── zyl.jpeg └── wholehomepic.jpeg ├── js ├── data.js ├── friends.js ├── general.js ├── index.js ├── loginAndRegister.js ├── messageBoard.js ├── recommend.js ├── setting.js ├── shadow.js └── visitMessageBoard.js ├── login.jsp ├── loginCheck.jsp ├── messageBoard.jsp ├── readme.md ├── recommend.jsp ├── registerCheck.jsp ├── reply.jsp ├── replyLevel3.jsp ├── search.jsp ├── setting.jsp ├── settingAjax.jsp ├── settingAjax2.jsp ├── signup.jsp ├── test.jsp ├── test2.jsp ├── visitData.jsp ├── visitHome.jsp ├── visitMessageBoard.jsp ├── visitReply.jsp └── visitReplyLevel3.jsp /about.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8");%> 3 | <%@ page import="java.io.*, java.util.*, org.apache.commons.io.*"%> 4 | <%@ page import="org.apache.commons.fileupload.*"%> 5 | <%@ page import="org.apache.commons.fileupload.disk.*"%> 6 | <%@ page import="org.apache.commons.fileupload.servlet.*"%> 7 | <% 8 | String webUser = ""; //登录用户 9 | String imageName = ""; 10 | String msg = ""; 11 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 12 | String user = "user"; 13 | String pwd = "123"; 14 | Class.forName("com.mysql.jdbc.Driver"); 15 | Connection con = DriverManager.getConnection(connectString, user, pwd); 16 | Statement stmt = con.createStatement(); 17 | 18 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 19 | if (cookies != null) { 20 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 21 | if(cookies[i].getName().equals("user")){ //如果cookie对象的名称是mrCookie 22 | webUser = cookies[i].getValue(); //获取用户名 23 | } 24 | } 25 | } 26 | 27 | if (request.getMethod().equalsIgnoreCase("post")){ 28 | request.setCharacterEncoding("utf-8"); 29 | String imagePath = ""; // 图片路径 30 | boolean isMultipart = ServletFileUpload.isMultipartContent(request); // 检查表单中是否包含文件 31 | if (isMultipart) { 32 | 33 | FileItemFactory factory = new DiskFileItemFactory(); 34 | //factory.setSizeThreshold(yourMaxMemorySize); // 设置使用的内存最大值 35 | //factory.setRepository(yourTempDirectory); // 设置文件临时目录 36 | 37 | ServletFileUpload upload = new ServletFileUpload(factory); 38 | // upload.setSizeMax(yourMaxRequestSize); // 允许的最大文件尺寸 39 | 40 | List items = upload.parseRequest(request); 41 | String Id = ""; 42 | for (int i = 0; i < items.size(); i ++) { 43 | FileItem fi = (FileItem) items.get(i); 44 | if (fi.isFormField()) { // 如果是表单字段,获取对应的id信息 45 | if (fi.getFieldName().equals("id")) { 46 | Id = fi.getString("utf-8"); 47 | } 48 | } 49 | else { 50 | DiskFileItem dfi = (DiskFileItem) fi; 51 | if (!dfi.getName().trim().equals("")) { // getName()返回文件名称或空串 52 | String fileName = application.getRealPath("/images/avatar") + System.getProperty("file.separator") + FilenameUtils.getName(dfi.getName()); 53 | imagePath = new File(fileName).getAbsolutePath(); // 获取图片路径 54 | imageName = FilenameUtils.getName(dfi.getName()); // 获取图片名字 55 | out.print(imagePath); 56 | System.out.println(new File(fileName).getAbsolutePath()); 57 | dfi.write(new File(fileName)); 58 | 59 | // 保存图片 60 | String path = imageName; 61 | try { 62 | String sql = "update users set avatar='" + imageName + "' where name='" + webUser + "'"; 63 | int cnt = stmt.executeUpdate(sql); 64 | if (cnt > 0) msg = "保存成功!"; 65 | } 66 | catch (Exception e) { 67 | msg = e.getMessage(); 68 | } 69 | } 70 | } 71 | } 72 | } 73 | } 74 | else { 75 | //String[] image = new String[1000]; 76 | ResultSet rs = stmt.executeQuery("select avatar from users where name='" + webUser + "'"); 77 | if (rs.next()) { 78 | imageName = rs.getString("avatar"); 79 | } 80 | rs.close(); 81 | } 82 | stmt.close(); con.close(); 83 | %> 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 93 | 94 | 95 | 96 | 97 | ABOUT 98 | 99 | 100 | 101 | 102 | 194 | 195 | 196 | 197 | 198 |
199 |
200 |
201 |
202 | 203 | 204 |
205 |
206 | 207 |
208 |

209 |

210 |
211 |
212 |
213 |
214 |
215 | 217 | 225 |
226 | 227 |
228 |
229 | 「About」 230 |
231 |
232 | 233 |
234 |
235 |

Show your life this moment!

236 |
237 | 240 | 243 |
244 | 245 |
246 | 纸上悲欢难堪月,轴尽待收浮生卷 247 | 248 |
249 | 250 |
251 |
252 | Introdution 253 |

人生如行路,无论是一马平川,还是荆棘丛生,都是一种体验。路上的风景,亦是人生的风景,无论驻足停留,还是匆匆而过,路上的历练,就是一次成长。

254 |

每一个人的人生经历都有所不同。择路的茫然,无助的恍惚,梦想破碎的落寞,收获成功的喜悦,甚至是生活中不经意发现的小惊喜,都值得记录,分享和回味。为什么要记录,分享和回味?

255 |

“幸福就像玻璃,平时从未察觉,只要稍微改变看的角度,就会映照出光芒!”当记录下生活的点滴,分享给不同的人,在不同的时间回味,就会得到新的收获,甚至是收获幸福!

256 |

这个博客平台建立的目的就是方便用户记录生活的点点滴滴,可以是成长的历程,学习的收获,甚至也可以是一点点生活上的吐槽。整个平台的风格基调是简约、中国水墨风,以黑、白、灰三色为主颜色。 257 |

就像我们平台的核心语句:“show your life this moment”,尽情地感受、记录和分享自己独一无二的生活吧!希望在这个平台您能收获喜悦、快乐!

258 |
259 | 260 |
261 | 262 | Our Team 263 |
264 |
Designer & Director|朱泳霖
266 |
267 |
268 |
269 | 庄少华|Project Programmer


271 |


272 |
273 |
Project 274 | Programmer|庄开鸿

275 |


276 |
277 | 谢铭琦|DB Administrator    

279 |
280 |
281 | 282 |
283 | Contact Us 284 | 285 | 电话:15989005480 286 |


287 | 288 | 邮件:1151030072@qq.com
289 |

290 | Welcome to contact us! 291 |
292 |
293 | 294 | 324 | 325 | -------------------------------------------------------------------------------- /ajaxGet.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String msg=""; 4 | String follower = request.getParameter("userId"); 5 | String followed = request.getParameter("followedId"); 6 | String conStr = "jdbc:mysql://172.18.187.10:3306/blog_15336202" 7 | + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 8 | 9 | Class.forName("com.mysql.jdbc.Driver"); // 查找数据库驱动类 10 | Connection con=DriverManager.getConnection(conStr, "user", "123"); 11 | Statement stmt=con.createStatement(); //创建MySQL语句的对象 12 | ResultSet rs=stmt.executeQuery("select * from followers where fans_id='" + follower + "' and followed_id='" + followed + "'"); 13 | 14 | //1.原先不存在关注关系->执行关注操作 15 | if (!rs.next()) { 16 | String fmt="insert into followers(fans_id, followed_id) values('%s', '%s')"; 17 | String sql = String.format(fmt, follower, followed); 18 | stmt.executeUpdate(sql); 19 | out.print("已关注"); 20 | } 21 | 22 | //2.原先存在关注关系->取关 23 | else{ 24 | int cnt = stmt.executeUpdate("delete from followers where fans_id='"+follower+"' and followed_id='" + followed + "'"); 25 | out.print("关注"); 26 | } 27 | 28 | rs.close(); stmt.close(); con.close(); 29 | %> -------------------------------------------------------------------------------- /css/Index.css: -------------------------------------------------------------------------------- 1 | #main #wrap #nav #index { 2 | color: black; 3 | } 4 | 5 | #main #wrap #nav #li_index { 6 | border-bottom: solid 2px #919191; 7 | } 8 | 9 | 10 | /****************************博客主信息分区**************************************/ 11 | #main #content #information { 12 | position: absolute; 13 | width: 14%; 14 | height: 215px; 15 | right: 20px; 16 | top: 25px; 17 | display: block; 18 | border-top-left-radius: 20px; 19 | border-bottom-right-radius: 20px; 20 | background: linear-gradient(to right, #ebebeb, #8a8a8a); 21 | } 22 | 23 | #main #content #information legend { 24 | text-shadow: 2px 2px 3px black; 25 | } 26 | 27 | #main #content #information #fan { 28 | position: relative; 29 | height: 20px; 30 | width: 120px; 31 | top: 20px; 32 | margin: 0px auto; 33 | text-align: center; 34 | } 35 | 36 | #main #content #information #guanzhu { 37 | position: relative; 38 | height: 20px; 39 | width: 120px; 40 | top: 40px; 41 | margin: 0px auto; 42 | text-align: center; 43 | } 44 | 45 | #main #content #information #blog_num { 46 | position: relative; 47 | height: 20px; 48 | width: 120px; 49 | top: 60px; 50 | margin: 0px auto; 51 | text-align: center; 52 | } 53 | 54 | #main #content #information #like { 55 | position: relative; 56 | height: 20px; 57 | width: 120px; 58 | top: 80px; 59 | margin: 0px auto; 60 | text-align: center; 61 | } 62 | 63 | /**********************博客分区**************************/ 64 | #blog_zone { 65 | position: relative; 66 | display: block; 67 | top: 80px; 68 | left: 6%; 69 | width: 70%; 70 | max-width: 70%; 71 | border-top-left-radius: 20px; 72 | border-bottom-right-radius: 20px; 73 | margin-bottom: 10px; 74 | } 75 | 76 | .blog_block { 77 | position: relative; 78 | border-radius: 5px; 79 | display: block; 80 | margin: 0px auto; 81 | margin-bottom: 20px; 82 | margin-top: 20px; 83 | padding: 12px; 84 | padding-bottom: 24px; 85 | padding-top: 24px; 86 | background: linear-gradient(to left, #8a8a8a, #ebebeb); 87 | border-radius: 20px; 88 | width: 90%; 89 | max-width: 90%; 90 | } 91 | 92 | .blog_block a { 93 | color: black; 94 | font-size: 14px; 95 | } 96 | 97 | .blog_block a:hover { 98 | text-decoration: underline; 99 | cursor: pointer; 100 | } 101 | 102 | .blog_block .blog_time { 103 | position: relative; 104 | display: inline-block; 105 | float: right; 106 | right: 0px; 107 | top: -5px; 108 | font-size: 10px; 109 | color: #ebebeb; 110 | } 111 | 112 | .blog_block .blog_content { 113 | position: relative; 114 | display: inline-block; 115 | font-size: 20px; 116 | left: 35px; 117 | width: 90%; 118 | } 119 | 120 | .blog_block .blog_operator { 121 | position: relative; 122 | display: block; 123 | bottom: 0px; 124 | width: 100%; 125 | height: 14px; 126 | font-size: 14px; 127 | } 128 | 129 | .blog_block .blog_operator .azone { 130 | position: relative; 131 | float: right; 132 | display: none; 133 | } 134 | 135 | .blog_block .replyText { 136 | position: relative; 137 | top: 20px; 138 | left: 30px; 139 | display: none; 140 | } 141 | 142 | .blog_block .replyText textarea { 143 | position: relative; 144 | border-radius: 5px; 145 | outline: none; 146 | font-size: 15px; 147 | width: 85%; 148 | height: 45px; 149 | top: -8px; 150 | } 151 | 152 | .blog_block .replyText img { 153 | position: relative; 154 | cursor: pointer; 155 | opacity: 0.5; 156 | display: "block"; 157 | } 158 | 159 | .blog_block .replyText img:hover { 160 | opacity: 1; 161 | } 162 | 163 | .blog_block .replyText .replyClose { 164 | top: -43px; 165 | } 166 | 167 | .blog_block .replyText .replyImg { 168 | left: -20px; 169 | z-index: 100; 170 | top: -8px; 171 | } 172 | 173 | .blog_block .replyText .img:hover { 174 | opacity: 1; 175 | } 176 | 177 | /************************移动端******************************/ 178 | @media only screen and (max-width: 740px) { 179 | #main #wrap #welcomeBack { 180 | display: none; 181 | } 182 | 183 | #main #content #board { 184 | top: 170px; 185 | height: 120px; 186 | } 187 | 188 | #main #content #board #board_set #msg { 189 | top: 5px; 190 | height: 70%; 191 | } 192 | 193 | #main #content #information { 194 | width: 70%; 195 | height: 100px; 196 | top: 30px; 197 | left: 0px; 198 | margin: 0px auto; 199 | } 200 | 201 | #main #content #information #fan { 202 | top: 15px; 203 | margin: 0px; 204 | left: 10%; 205 | } 206 | 207 | #main #content #information #guanzhu { 208 | top: -5px; 209 | margin: 0px; 210 | left: 50%; 211 | } 212 | 213 | #main #content #information #blog_num { 214 | top: 15px; 215 | margin: 0px; 216 | left: 10%; 217 | } 218 | 219 | #main #content #information #like { 220 | top: -5px; 221 | margin: 0px; 222 | left: 50%; 223 | } 224 | 225 | #blog_zone { 226 | top: 225px; 227 | left: 50px; 228 | } 229 | } 230 | 231 | @media only screen and (max-width: 1100px) { 232 | #main #content #information { 233 | right: 0px; 234 | } 235 | } 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | -------------------------------------------------------------------------------- /css/about.css: -------------------------------------------------------------------------------- 1 | #aboutWrap { 2 | position: relative; 3 | top: 0px; 4 | width: 80%; 5 | height: 60px; 6 | float: right; 7 | right: 0px; 8 | color: black; 9 | font-size: 25px; 10 | text-align: center; 11 | background: url("../images/aboutWrap.jpg"); 12 | background-position: 0% 20%; 13 | } 14 | 15 | #aboutMain { 16 | position: relative; 17 | float: right; 18 | right: 0px; 19 | top: 0px; 20 | width: 80%; 21 | height: 1170px; 22 | background: linear-gradient(to right, #fff, #ebebeb); 23 | color: black; 24 | } 25 | 26 | #aboutMain #introduction { 27 | position: relative; 28 | top: 20px; 29 | width: 760px; 30 | height: 260px; 31 | margin: 0px auto; 32 | background: linear-gradient(to right, #ebebeb, #8a8a8a); 33 | text-indent: 2em; 34 | padding: 40px; 35 | border-top-left-radius: 40px; 36 | border-bottom-right-radius: 40px; 37 | } 38 | 39 | #aboutMain #introduction p { 40 | font-size: 15px; 41 | } 42 | 43 | 44 | 45 | #aboutMain #contact { 46 | position: relative; 47 | background: linear-gradient(to right, #ebebeb, #8a8a8a); 48 | top: 60px; 49 | width: 800px; 50 | height: 150px; 51 | margin: 0px auto; 52 | padding: 20px; 53 | font-size: 15px; 54 | text-align: center; 55 | border-top-left-radius: 20px; 56 | border-bottom-right-radius: 20px; 57 | } 58 | 59 | #aboutMain legend { 60 | font-size: 20px; 61 | } 62 | 63 | #aboutMain #introduction #l0 { 64 | text-indent: 0; 65 | text-shadow: 2.5px 2.5px 1.5px #8a8a8a; 66 | } 67 | 68 | #aboutMain #team #l1 { 69 | text-align: center; 70 | text-shadow: 2.5px 2.5px 1.5px #8a8a8a; 71 | } 72 | 73 | #aboutMain #team .bamboo { 74 | position: absolute; 75 | left: 340px; 76 | } 77 | 78 | #aboutMain #contact #l2 { 79 | text-align: right; 80 | text-shadow: 2.5px 2.5px 1.5px #8a8a8a; 81 | } 82 | 83 | #aboutMain #team .member { 84 | position: relative; 85 | width: 270px; 86 | height: 110px; 87 | border-bottom: 1px solid black; 88 | } 89 | 90 | #aboutMain #team .member .photoZone { 91 | position: relative; 92 | top: 0px; 93 | width: 80px; 94 | height: 80px; 95 | border-radius: 50%; 96 | overflow: hidden; 97 | display: inline-block; 98 | } 99 | 100 | #aboutMain #team .member .teamPhoto { 101 | position: relative; 102 | width: 80px; 103 | cursor: pointer; 104 | } 105 | 106 | #aboutMain #team #member2 .teamPhoto { 107 | position: relative; 108 | width: 120px; 109 | left: -25px; 110 | } 111 | 112 | #aboutMain #team #member2 { 113 | top: -30px; 114 | } 115 | 116 | #aboutMain #team #member3 { 117 | top: 20px; 118 | } 119 | 120 | #aboutMain #team #member4 { 121 | top: -20px; 122 | } 123 | 124 | #aboutMain #team #member2, #member4 { 125 | float: right; 126 | } 127 | 128 | .bamboo { 129 | opacity: 0.8; 130 | } 131 | 132 | .expand { 133 | display: none; 134 | } 135 | 136 | /*for mobile devices */ 137 | 138 | -------------------------------------------------------------------------------- /css/album.css: -------------------------------------------------------------------------------- 1 | #main #wrap #nav #album { 2 | color: black; 3 | } 4 | 5 | #main #wrap #nav #li_album { 6 | border-bottom: solid 2px #919191; 7 | } -------------------------------------------------------------------------------- /css/data.css: -------------------------------------------------------------------------------- 1 | #main #wrap #nav #data { 2 | color: black; 3 | } 4 | 5 | #main #wrap #nav #li_data { 6 | border-bottom: solid 2px #919191; 7 | } 8 | 9 | #main #content #data_board { 10 | position: relative; 11 | top: 20px; 12 | left: 6%; 13 | width: 80%; 14 | border-top-left-radius: 20px; 15 | border-bottom-right-radius: 20px; 16 | min-height: 500px; 17 | max-width: 700px; 18 | } 19 | 20 | #main #content #data_board #data { 21 | position: relative; 22 | width: 80%; 23 | height: 100%; 24 | top: 18px; 25 | left: 30px; 26 | } 27 | 28 | #main #content #data_board #data, #name, #sex, #sign, #birthday, #phone, #hobby, #hometown, #email, #job, #school, #company, #sign, #resume { 29 | position: relative; 30 | width: 100%; 31 | height: 35px; 32 | } 33 | 34 | #main #content #data_board #data .dataInput { 35 | border-top-left-radius: 5px; 36 | border-bottom-right-radius: 5px; 37 | height: 15px; 38 | font-size: 15px; 39 | display: none; 40 | width: 170px; 41 | } 42 | 43 | #main #content #data_board #data #resumeText { 44 | border-top-left-radius: 5px; 45 | border-bottom-right-radius: 5px; 46 | border: #8a8a8a solid 1px; 47 | height: 50px; 48 | font-size: 15px; 49 | width: 200px; 50 | } 51 | 52 | #main #content #data_board #dataEdit { 53 | position: relative; 54 | float: right; 55 | right: 0px; 56 | top: -40px; 57 | width: 15px; 58 | height: 15px; 59 | cursor: pointer; 60 | } 61 | 62 | #main #content #data_board #saveData { 63 | position: relative; 64 | float: right; 65 | top: -40px; 66 | font-size: 10px; 67 | cursor: pointer; 68 | display: none; 69 | } 70 | 71 | #main #content #data_board #exit { 72 | position: relative; 73 | float: right; 74 | right: 0px; 75 | top: -40px; 76 | font-size: 10px; 77 | cursor: pointer; 78 | display: none; 79 | } 80 | 81 | #main #content #data_board #dataBamboo { 82 | position: relative; 83 | width: 200px; 84 | float: right; 85 | top: 150px; 86 | right: -100px; 87 | opacity: 0.8; 88 | } 89 | 90 | @media only screen and (max-width: 600px) { 91 | #main #content #data_board #dataBamboo { 92 | width: 100px; 93 | } 94 | } -------------------------------------------------------------------------------- /css/friends.css: -------------------------------------------------------------------------------- 1 | #main #wrap #nav #friends { 2 | color: black; 3 | } 4 | 5 | #main #wrap #nav #li_friends { 6 | border-bottom: solid 2px #919191; 7 | } 8 | 9 | /* 轮播图样式表 */ 10 | #content #carousel_wrap { 11 | position: relative; 12 | margin: 0 auto; 13 | width: 100%; /* 轮播图宽度 */ 14 | overflow: hidden; 15 | } 16 | 17 | #content #carousel_wrap #carousel_images { 18 | position: absolute; 19 | border: 0; 20 | outline: none; 21 | white-space: nowrap; /* 将图片一行排列 */ 22 | width: 100%; 23 | font-size: 0; /* 清除white-space间隙 */ 24 | margin: 0px; 25 | } 26 | 27 | #content #carousel_wrap #carousel_images img { 28 | width: 100%; 29 | } 30 | 31 | #content #carousel_wrap .arrow { 32 | position: absolute; 33 | font-weight: bold; 34 | font-size: 50px; 35 | color: lightgray; 36 | top: 50%; 37 | transform: translateY(-50%); 38 | cursor: pointer; 39 | transition-property: opacity; 40 | transition-duration: 0.5s; 41 | } 42 | 43 | #content #carousel_wrap .arrow:hover { 44 | opacity: 0.5; 45 | } 46 | 47 | #content #carousel_wrap .left-arrow { 48 | left: 20px; 49 | } 50 | 51 | #content #carousel_wrap .right-arrow { 52 | right: 20px; 53 | } 54 | 55 | #content #carousel_wrap #dots { 56 | position: absolute; 57 | bottom: 20px; 58 | left: 50%; 59 | transform: translateX(-50%) 60 | } 61 | 62 | #content #carousel_wrap .dot { 63 | background-color: white; 64 | display: inline-block; 65 | width: 10px; 66 | height: 10px; 67 | border-radius: 50%; 68 | margin: 4px; 69 | opacity: 0.2; 70 | cursor: pointer; 71 | } 72 | 73 | #content #carousel_wrap .active { 74 | opacity: 1; 75 | } 76 | 77 | .transition { 78 | transition-property: left; 79 | transition-duration: 1s; 80 | } 81 | 82 | 83 | @media only screen and (max-width: 600px) { 84 | #content #carousel_wrap .arrow { 85 | opacity: 0; 86 | } 87 | } 88 | /* END 轮播图样式表 */ -------------------------------------------------------------------------------- /css/messageBoard.css: -------------------------------------------------------------------------------- 1 | #main #wrap #nav #message_board { 2 | color: black; 3 | } 4 | 5 | #main #wrap #nav #li_messageBoard { 6 | border-bottom: solid 2px #919191; 7 | } 8 | 9 | #main #content #board { 10 | position: relative; 11 | top: 20px; 12 | left: 6%; 13 | width: 80%; 14 | max-width: 80%; 15 | height: 200px; 16 | } 17 | 18 | #main #content #board #board_set { 19 | position: relative; 20 | width: 100%; 21 | height: 100%; 22 | border-top-left-radius: 20px; 23 | border-bottom-right-radius: 20px; 24 | } 25 | 26 | #main #content #board #board_set #msg { 27 | position: relative; 28 | left: 10%; 29 | width: 80%; 30 | max-width: 80%; 31 | height: 80%; 32 | max-height: 80%; 33 | border-radius: 10px; 34 | border-top-left-radius: 0px; 35 | border-bottom-right-radius: 0px; 36 | font-size: 20px; 37 | } 38 | 39 | #main #content #board #board_set #btn { 40 | position: relative; 41 | border-radius: 50%; 42 | left: 9.5%; 43 | font-size: 15px; 44 | } 45 | 46 | /*留言板内容分区*/ 47 | #messageboard_zone { 48 | position: relative; 49 | display: block; 50 | top: 80px; 51 | left: 6%; 52 | width: 80%; 53 | border-top-left-radius: 20px; 54 | border-bottom-right-radius: 20px; 55 | } 56 | 57 | .messageboard_block { 58 | position: relative; 59 | border-radius: 5px; 60 | display: block; 61 | margin: 20px; 62 | padding: 12px; 63 | padding-top: 15px; 64 | background: linear-gradient(to left, #8a8a8a, #ebebeb); 65 | border-top-left-radius: 20px; 66 | border-bottom-right-radius: 20px; 67 | } 68 | 69 | .messageboard_block a { 70 | color: black; 71 | font-size: 14px; 72 | } 73 | 74 | .messageboard_block a:hover { 75 | text-decoration: underline; 76 | } 77 | 78 | .messageboard_block .messageboard_top { 79 | position: relative; 80 | display: inline-block; 81 | vertical-align: top; 82 | height: 30px; 83 | } 84 | 85 | .messageboard_block .head_portraits { 86 | position: relative; 87 | display: inline-block; 88 | border-radius: 50%; 89 | width: 30px; 90 | height: 30px; 91 | } 92 | 93 | .messageboard_block .messageboard_name { 94 | position: relative; 95 | display: inline-block; 96 | font-size: 15px; 97 | top: 3px; 98 | } 99 | 100 | .messageboard_block .messageboard_floor { 101 | position: relative; 102 | display: inline-block; 103 | font-size: 10px; 104 | top: 2px; 105 | color: #8a8a8a; 106 | } 107 | 108 | .messageboard_block .messageboard_time { 109 | position: relative; 110 | display: inline-block; 111 | float: right; 112 | right: 0px; 113 | top: 8px; 114 | font-size: 11px; 115 | color: black; 116 | } 117 | 118 | .messageboard_block .messageboard_content { 119 | position: relative; 120 | display: inline-block; 121 | font-size: 20px; 122 | left: 35px; 123 | width: 90%; 124 | } 125 | 126 | .messageboard_block .messageboard_operator { 127 | position: relative; 128 | display: block; 129 | bottom: 0px; 130 | width: 100%; 131 | height: 14px; 132 | font-size: 14px; 133 | } 134 | 135 | .messageboard_block .messageboard_operator .azone { 136 | position: relative; 137 | float: right; 138 | } -------------------------------------------------------------------------------- /css/mobile.css: -------------------------------------------------------------------------------- 1 | #shadow { 2 | position: absolute; 3 | display: block; 4 | top: 0; 5 | left: 0; 6 | z-index: 1000; 7 | background-color: gray; 8 | opacity: 0.5; 9 | } 10 | 11 | #head_portrait_box { 12 | color: black; 13 | z-index: 10000; 14 | width: 250px; 15 | height: 200px; 16 | left: 50%; 17 | top: 50%; 18 | border: 1px solid black; 19 | background: PapayaWhip; 20 | box-shadow: 6px 8px 4px #808080; 21 | box-sizing: border-box; 22 | display: none; 23 | position: fixed; 24 | } 25 | 26 | #head_portrait_box #upload_img, #select_upload_img { 27 | width: 130px; 28 | height: 32px; 29 | border: 1px solid black; 30 | line-height: 32px; 31 | position: absolute; 32 | top: 10px; 33 | left: 50%; 34 | transform: translateX(-50%); 35 | } 36 | 37 | #head_portrait_box #upload_img { 38 | display: none; 39 | } 40 | 41 | input.upload_img { 42 | caret-color: #999fac; 43 | font: 16px "Helvetica", "Arial", "sans-serif"; 44 | } 45 | 46 | #head_portrait_box #select_upload img { 47 | width: 80px; 48 | height: 80px; 49 | border-radius: 50px; 50 | border: 1px solid #c8cccf; 51 | background: white; 52 | color: black; 53 | text-indent: 50px; 54 | position: absolute; 55 | left: 80px; 56 | top: 70px; 57 | } 58 | 59 | #head_portrait_box #submit_ok { 60 | position: absolute; 61 | left: 30%; 62 | transform: translateX(-30%); 63 | bottom: 10px; 64 | } 65 | 66 | #head_portrait_box #button { 67 | position: absolute; 68 | left: 70%; 69 | transform: translateX(-70%); 70 | bottom: 10px; 71 | } 72 | 73 | #mobile_shadow { 74 | position: fixed; 75 | display: none; 76 | top: 0px; 77 | left: 0px; 78 | z-index: 1000; 79 | background-color: black; 80 | opacity: 0.5; 81 | width: 600px; 82 | height: 100%; 83 | } 84 | 85 | #mobile_box { 86 | z-index: 1200; 87 | position: fixed; 88 | display: none; 89 | width: 120px; 90 | height: 300px; 91 | float: right; 92 | top: 0px; 93 | right: 50px; 94 | line-height: 30px; 95 | } 96 | 97 | .mobile_link { 98 | position: relative; 99 | right: 1px; 100 | top: 50px; 101 | display: block; 102 | color: white; 103 | text-align: right; 104 | } 105 | 106 | #mobile_back { 107 | position: fixed; 108 | display: inline-block; 109 | top: 15px; 110 | float: right; 111 | right: 4.5%; 112 | width: 20px; 113 | height: 20px; 114 | animation: backAnimate 1s; 115 | cursor: pointer; 116 | } 117 | 118 | @keyframes backAnimate 119 | { 120 | from { transform: rotateZ(0deg); } 121 | to { transform: rotateZ(90deg); } 122 | } 123 | 124 | #mobile_box a:hover { 125 | color: black; 126 | } 127 | 128 | #mobile_wrap { 129 | position: fixed; 130 | width: 100%; 131 | display: none; 132 | height: 50px; 133 | } 134 | 135 | #mobile_wrap #mobile_head_portrait { 136 | position: fixed; 137 | display: inline-block; 138 | top: 12px; 139 | left: 5%; 140 | width: 30px; 141 | height: 30px; 142 | border-radius: 50px; 143 | } 144 | 145 | #mobile_wrap #mobile_head_portrait #mobile_select_upload { 146 | position: absolute; 147 | width: 32px; 148 | height: 32px; 149 | border-radius: 50px; 150 | display: block; 151 | } 152 | 153 | #mobile_wrap #mobile_head_portrait #mobile_select_upload:hover { 154 | background-color: grey; 155 | opacity: 0.1; 156 | } 157 | 158 | #mobile_wrap #mobile_head_portrait #mobile_upload_img { 159 | position: absolute; 160 | display: block; 161 | width: 30px; 162 | height: 30px; 163 | border-radius: 50px; 164 | opacity: 0; 165 | } 166 | 167 | #mobile_wrap #mobile_head_portrait #mobile_upload_img:hover { 168 | cursor: pointer; 169 | } 170 | 171 | #mobile_wrap a { 172 | position: relative; 173 | font-family: Brush Script MT; 174 | font-size: 30px; 175 | top: 4px; 176 | left: 50%; 177 | display: inline-block; 178 | transform: translateX(-48%); 179 | } 180 | 181 | #mobile_wrap #expand-menu { 182 | position: relative; 183 | top: 15px; 184 | float: right; 185 | right: 5%; 186 | width: 23px; 187 | height: 24px; 188 | cursor: pointer; 189 | } 190 | 191 | @media only screen and (max-width: 800px) { 192 | #home #com a { 193 | font-size: 23px; 194 | } 195 | 196 | #welcomeBack { 197 | display: none; 198 | } 199 | } 200 | 201 | @media only screen and (max-width: 700px) { 202 | #home #com a { 203 | font-size: 20px; 204 | } 205 | } 206 | 207 | @media only screen and (max-width: 600px) { 208 | #mobile_wrap { 209 | z-index: 100; 210 | position: fixed; 211 | top: 0px; 212 | width: 100%; 213 | display: block; 214 | height: 54px; 215 | background-color: #999fac; 216 | } 217 | 218 | #main { 219 | margin: 0px; 220 | bottom: 2px; 221 | width: 100%; 222 | height: 93%; 223 | left: 0%; 224 | } 225 | 226 | #main #wrap { 227 | display: none; 228 | } 229 | 230 | #home { 231 | display: none; 232 | width: 0%; 233 | height: 0%; 234 | } 235 | 236 | #main #content { 237 | width: 100%; 238 | height: 100%; 239 | } 240 | 241 | #quanping { 242 | display: none; 243 | } 244 | } 245 | 246 | @media only screen and (max-height: 490px) { 247 | #main #content { 248 | top: 25px; 249 | } 250 | } -------------------------------------------------------------------------------- /css/mystyle.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: STKaiti, YouYuan, sans-serif; 3 | /*不要设置全部字体颜色,否则其他会出错*/ 4 | /*cursor: url(https://images2015.cnblogs.com/blog/961272/201607/961272-20160719145928310-806072030.gif), default!important;*/ 5 | } 6 | 7 | a { 8 | text-decoration: none; 9 | color: black; 10 | } 11 | 12 | a:hover { 13 | color: black; 14 | } 15 | 16 | li { 17 | list-style-type: none; 18 | } 19 | 20 | textarea { 21 | resize: none; 22 | } 23 | 24 | /*.tip {*/ 25 | /*border: 2px solid #ddd;*/ 26 | /*padding: 8px;*/ 27 | /*background: #f1f1f1;*/ 28 | /*color:#666;*/ 29 | /*}*/ 30 | 31 | body { 32 | color: #fff; 33 | font-size: 1em; 34 | margin: 0px; 35 | padding: 0px; 36 | width: 100%; 37 | height: 100%; 38 | background: url('') no-repeat center fixed; 39 | background-size: cover; 40 | } 41 | 42 | #home { 43 | position: fixed; 44 | display: block; 45 | width: 20%; 46 | height: 100%; 47 | background: url("../images/homepic.jpeg"); 48 | background-size: cover; 49 | float: left; 50 | z-index: 20; 51 | left: 0px; 52 | min-height: 600px; 53 | } 54 | 55 | #home #com { 56 | position: relative; 57 | top: 1%; 58 | text-align: center; 59 | font-size: 28px; 60 | } 61 | 62 | #home #com a { 63 | text-decoration: none; 64 | color: #fff; 65 | font-family: Brush Script MT; 66 | } 67 | 68 | #home #com a:hover { 69 | color: black; 70 | } 71 | 72 | #home #head_portrait { 73 | position: relative; 74 | top: 70px; 75 | left: 50%; 76 | transform: translateX(-50%); 77 | display: block; 78 | width: 80px; 79 | height: 80px; 80 | border-radius: 50px; 81 | } 82 | 83 | #home #head_portrait #select_upload { 84 | position: absolute; 85 | width: 82px; 86 | height: 82px; 87 | border-radius: 50px; 88 | display: block; 89 | } 90 | 91 | #home #head_portrait #select_upload:hover { 92 | background-color: grey; 93 | opacity: 0.1; 94 | cursor: pointer; 95 | } 96 | 97 | #home #head_portrait #upload_img { 98 | position: absolute; 99 | display: inline-block; 100 | width: 80px; 101 | height: 80px; 102 | border-radius: 50px; 103 | background-color: black; 104 | overflow: hidden; 105 | } 106 | 107 | input[type='file'] { 108 | position: absolute; 109 | cursor: pointer; 110 | font-size: 0px; 111 | opacity: 0; 112 | } 113 | 114 | #home #head_portrait #upload_img:hover { 115 | cursor: pointer; 116 | } 117 | 118 | #home #personal_signature { 119 | position: relative; 120 | top: 10%; 121 | text-align: center; 122 | font-size: 20px; 123 | color: black; 124 | width: auto; 125 | height: 20px; 126 | } 127 | 128 | #home #personal_signature p { 129 | font-family: Brush Script MT; 130 | } 131 | 132 | #home #menu { 133 | position: relative; 134 | top: 200px; 135 | text-align: center; 136 | width: 100%; 137 | } 138 | 139 | #home #menu a { 140 | color: #fff; 141 | font-size: 20px; 142 | font-family: STKaiti, YouYuan; 143 | } 144 | 145 | #home #menu a:hover { 146 | color: black; 147 | } 148 | 149 | #home #menu img:hover { 150 | opacity: 1!important; 151 | } 152 | 153 | #main { 154 | position: fixed; 155 | left: 20%; 156 | width: 80%; 157 | height: 100%; 158 | /* 如果mystyle.css中使用overflow:auto->含有滚动条宽度; 故使用overflow:scroll */ 159 | overflow-y: scroll; 160 | background: linear-gradient(to right, #fff, #ebebeb); 161 | } 162 | 163 | #main #wrap { 164 | background-color: #fff; 165 | position: relative; 166 | top: 0px; 167 | left: 0px; 168 | height: 52px; 169 | width: 100%; 170 | z-index: 1000; 171 | display: block; 172 | } 173 | 174 | #main #wrap #nav { 175 | position: relative; 176 | width: 375px; 177 | height: 60%; 178 | background-color: #fff; 179 | font-size: 10px; 180 | display: inline-block; 181 | } 182 | 183 | #main #wrap #nav li { 184 | position: relative; 185 | height: 100%; 186 | display: inline-block; 187 | text-align: center; 188 | } 189 | 190 | #main #wrap #nav li:hover { 191 | border-bottom: solid 2px #919191; 192 | } 193 | 194 | #main #wrap #nav li:hover a { 195 | color: black; 196 | } 197 | 198 | #main #wrap #nav a { 199 | color: #919191; 200 | font-size: 18px; 201 | font-family: STKaiti, YouYuan; 202 | line-height: 30px; 203 | } 204 | 205 | #main #wrap #nav a:hover { 206 | color: #000000; 207 | } 208 | 209 | #main #wrap #welcomeBack { 210 | position: relative; 211 | display: inline-block; 212 | top: 20px; 213 | float: right; 214 | width: 150px; 215 | height: 50%; 216 | color: #8a8a8a; 217 | background-color: #fff; 218 | font-size: 12px; 219 | z-index: 1000; 220 | } 221 | 222 | #main #content { 223 | position: relative; 224 | color: black; 225 | top: 0px; 226 | height: 92%; 227 | width: 100%; 228 | float: right; 229 | right: 0px; 230 | background: linear-gradient(to right, #fff, #ebebeb); 231 | } 232 | 233 | 234 | #footer { 235 | position: absolute; 236 | text-align: center; 237 | bottom: 10px; 238 | width: 100%; 239 | height: 20px; 240 | } 241 | 242 | #footer span { 243 | text-align: center; 244 | color: #fff; 245 | font-size: 12px; 246 | } 247 | 248 | /*编辑内容部分*/ 249 | 250 | 251 | #main #content #board { 252 | position: relative; 253 | top: 20px; 254 | left: 6%; 255 | width: 70%; 256 | max-width: 70%; 257 | height: 200px; 258 | } 259 | 260 | #main #content #board #board_set { 261 | position: relative; 262 | width: 100%; 263 | max-width: 100%; 264 | height: 110%; 265 | border-top-left-radius: 20px; 266 | border-bottom-right-radius: 20px; 267 | } 268 | 269 | #main #content #board #board_set #msg { 270 | position: relative; 271 | border: 1px solid black; 272 | outline: none; 273 | padding-top: 2px; 274 | padding-left: 2px; 275 | padding-right: 2px; 276 | left: 10%; 277 | width: 80%; 278 | max-width: 300px; 279 | min-width: 80%; 280 | height: 80%; 281 | border-radius: 10px; 282 | border-top-left-radius: 0px; 283 | border-bottom-right-radius: 0px; 284 | font-size: 20px; 285 | overflow-y: auto; 286 | color: black; 287 | } 288 | 289 | #main #content #board #board_set #msg a { 290 | text-decoration: underline; 291 | color: blue; 292 | } 293 | 294 | @media only screen and (max-width: 600px) { 295 | #main #content #board { 296 | width: 400px; 297 | left: 12%; 298 | } 299 | 300 | #main #content #board #board_set #msg { 301 | max-width: 300px; 302 | } 303 | } 304 | 305 | #main #content #board #board_set #bianji { 306 | position: relative; 307 | width: 81%; 308 | max-width: 81%; 309 | height: 30px; 310 | left: 10%; 311 | bottom: 5px; 312 | } 313 | 314 | #main #content #board #board_set #bianji img { 315 | opacity: 0.5; 316 | } 317 | 318 | #main #content #board #board_set #bianji #btn { 319 | position: relative; 320 | border-radius: 50%; 321 | font-size: 15px; 322 | display: inline-block; 323 | top: 0px; 324 | float: right; 325 | } 326 | 327 | #main #content #board #board_set #bianji #jinghao { 328 | position: relative; 329 | width: 17px; 330 | height: 17px; 331 | cursor: pointer; 332 | top: -1.1px; 333 | } 334 | 335 | #main #content #board #board_set #bianji #xiaolian, #gaojibianji, #quanping, #huanyuan, #picture { 336 | position: relative; 337 | width: 20px; 338 | height: 20px; 339 | cursor: pointer; 340 | } 341 | 342 | #main #content #board #board_set #huanyuan { 343 | display: none; 344 | } 345 | 346 | #main #content #board #edit { 347 | position: relative; 348 | border: 1px solid #8a8a8a; 349 | border-radius: 5px; 350 | display: inline-block; 351 | width: 143px; 352 | display: none; 353 | height: 22px; 354 | } 355 | 356 | #main #content #board #edit #etitle, #exieti, #ebold, #eunderline, #elink { 357 | position: relative; 358 | width: 20px; 359 | height: 20px; 360 | cursor: pointer; 361 | } 362 | 363 | #main #content #board #emojis { 364 | position: relative; 365 | display: block; 366 | width: 180px; 367 | height: 85px; 368 | border: 1px solid #8a8a8a; 369 | border-radius: 5px; 370 | background-color: #fff; 371 | display: none; 372 | } 373 | 374 | #main #content #board #emojis .emoji { 375 | position: relative; 376 | left: 2.5px; 377 | top: 2px; 378 | width: 25px; 379 | height: 25px; 380 | cursor: pointer; 381 | } 382 | 383 | #main #content #board #emojis .emoji:hover { 384 | width: 26px; 385 | height: 26px; 386 | } 387 | 388 | #etitle { 389 | left: 3px; 390 | } 391 | 392 | #exieti { 393 | left: -5px; 394 | } 395 | 396 | #eunderline { 397 | left: -8px; 398 | } 399 | 400 | #elink { 401 | left: -2px; 402 | } 403 | 404 | #main #content #board #edit #ecolor { 405 | position: relative; 406 | display: inline-block; 407 | background-color: black; 408 | width: 18px; 409 | height: 18px; 410 | top: -6px; 411 | cursor: pointer; 412 | left: -5px; 413 | border-top-left-radius: 5px; 414 | border-bottom-right-radius: 5px; 415 | } 416 | 417 | #main #content #board #submit { 418 | position: relative; 419 | width: 20px; 420 | height: 20px; 421 | cursor: pointer; 422 | float: right; 423 | display: inline-block; 424 | } 425 | 426 | #main #content #board #colorBar { 427 | position: relative; 428 | display: block; 429 | width: 200px; 430 | height: 22px; 431 | border: 1px solid #8a8a8a; 432 | left: 10.5%; 433 | border-radius: 5px; 434 | background-color: #fff; 435 | display: none; 436 | } 437 | 438 | .colors { 439 | position: relative; 440 | display: inline-block; 441 | width: 18px; 442 | height: 18px; 443 | background-color: black; 444 | top: 0.5px; 445 | left: 14px; 446 | cursor: pointer; 447 | border-top-left-radius: 5px; 448 | border-bottom-right-radius: 5px; 449 | } 450 | 451 | #red_block { 452 | background-color: red; 453 | } 454 | 455 | #orange_block { 456 | background-color: orange; 457 | } 458 | 459 | #yellow_block { 460 | background-color: yellow; 461 | } 462 | 463 | #green_block { 464 | background-color: green; 465 | } 466 | 467 | #blue_block { 468 | background-color: blue; 469 | } 470 | 471 | #purple_block { 472 | background-color: purple; 473 | } 474 | 475 | #black_block { 476 | background-color: black; 477 | } 478 | 479 | #brown_block { 480 | background-color: brown; 481 | } 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | -------------------------------------------------------------------------------- /css/recommend.css: -------------------------------------------------------------------------------- 1 | #main { 2 | background-color: red!important; 3 | } 4 | 5 | #main #wrap #nav #recommend { 6 | color: black; 7 | } 8 | 9 | #main #wrap #nav #li_recommend { 10 | border-bottom: solid 2px #919191; 11 | } 12 | 13 | /* 轮播图样式表 */ 14 | #content #carousel_wrap { 15 | position: relative; 16 | margin: 0 auto; 17 | width: 100%; /* 轮播图宽度 */ 18 | overflow: hidden; 19 | } 20 | 21 | #content #carousel_wrap #carousel_images { 22 | position: absolute; 23 | border: 0; 24 | outline: none; 25 | white-space: nowrap; /* 将图片一行排列 */ 26 | width: 100%; 27 | font-size: 0; /* 清除white-space间隙 */ 28 | margin: 0px; 29 | } 30 | 31 | #content #carousel_wrap #carousel_images img { 32 | width: 100%;http://localhost:8080/Web-project7/images/carousel/3.jpg 33 | } 34 | 35 | #content #carousel_wrap .arrow { 36 | position: absolute; 37 | font-weight: bold; 38 | font-size: 50px; 39 | color: lightgray; 40 | top: 50%; 41 | transform: translateY(-50%); 42 | cursor: pointer; 43 | transition-property: opacity; 44 | transition-duration: 0.5s; 45 | } 46 | 47 | #content #carousel_wrap .arrow:hover { 48 | opacity: 0.5; 49 | } 50 | 51 | #content #carousel_wrap .left-arrow { 52 | left: 20px; 53 | } 54 | 55 | #content #carousel_wrap .right-arrow { 56 | right: 20px; 57 | } 58 | 59 | #content #carousel_wrap #dots { 60 | position: absolute; 61 | bottom: 20px; 62 | left: 50%; 63 | transform: translateX(-50%) 64 | } 65 | 66 | #content #carousel_wrap .dot { 67 | background-color: white; 68 | display: inline-block; 69 | width: 10px; 70 | height: 10px; 71 | border-radius: 50%; 72 | margin: 4px; 73 | opacity: 0.2; 74 | cursor: pointer; 75 | } 76 | 77 | #content #carousel_wrap .active { 78 | opacity: 1; 79 | } 80 | 81 | .transition { 82 | transition-property: left; 83 | transition-duration: 1s; 84 | } 85 | 86 | #inner_content { 87 | width: 1245px; 88 | margin: 20px auto; 89 | } 90 | 91 | #inner_content:after { 92 | content: ''; 93 | clear: both; 94 | display: block; 95 | } 96 | 97 | #inner_content .inner_user:after { 98 | content: ''; 99 | clear: both; 100 | display: block; 101 | } 102 | 103 | #inner_content .inner_item { 104 | cursor: pointer; 105 | /* 实现动画放大效果 */ 106 | transition-property: all; 107 | transition-delay: 0.1s; 108 | transition-duration: 0.4s; 109 | } 110 | 111 | #inner_content .inner_item:hover { 112 | /* 实现动画放大效果 */ 113 | transform: scale(1.013); 114 | } 115 | 116 | #inner_content .inner_item { 117 | width: 600px; 118 | height: 400px; 119 | box-shadow: 0px 7px 10px lightgray; 120 | margin: 10px; 121 | display: inline-block; 122 | } 123 | 124 | #inner_content .inner_img { 125 | height: 250px; 126 | background-position: center center; 127 | background-size: 110%; 128 | } 129 | 130 | #inner_content .inner_user { 131 | /* border: 1px solid green; */ 132 | height: 50px; 133 | } 134 | 135 | #inner_content .inner_user .inner_avatar { 136 | float: left; 137 | } 138 | 139 | #inner_content .inner_avatar { 140 | width: 40px; 141 | height: 40px; 142 | margin: 5px 5px 5px 15px; 143 | border-radius: 50%; 144 | border: 1px solid lightgray; 145 | background-position: 50% 50%; 146 | background-size: 100%; 147 | } 148 | 149 | #inner_content .inner_username { 150 | font-size: 11px; 151 | font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; 152 | float: left; 153 | width: 100px; 154 | height: 20px; 155 | margin: 10px; 156 | } 157 | 158 | #inner_content .inner_intro { 159 | margin: 10px 15px; 160 | font-size: 25px; 161 | font-family: 微软雅黑; 162 | font-weight: bold; 163 | } 164 | 165 | @media only screen and (max-width: 600px) { 166 | #content #carousel_wrap .arrow { 167 | opacity: 0; 168 | } 169 | 170 | #inner_content { 171 | width: 100%; 172 | } 173 | 174 | #inner_content .inner_item { 175 | width: 95%; 176 | height: 400px; 177 | box-shadow: 0px 7px 10px lightgray; 178 | margin: 10px; 179 | } 180 | 181 | #inner_content .inner_img { 182 | height: 250px; 183 | background-position: center center; 184 | background-size: 110%; 185 | } 186 | 187 | #inner_content .inner_user { 188 | /* border: 1px solid green; */ 189 | height: 50px; 190 | } 191 | 192 | #inner_content .inner_user .inner_avatar { 193 | float: left; 194 | } 195 | 196 | #inner_content .inner_avatar { 197 | width: 40px; 198 | height: 40px; 199 | margin: 5px 5px 5px 15px; 200 | border-radius: 50%; 201 | border: 1px solid lightgray; 202 | background-position: 60% 20%; 203 | background-size: 170%; 204 | } 205 | 206 | #inner_content .inner_username { 207 | font-size: 11px; 208 | font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; 209 | float: left; 210 | width: 100px; 211 | height: 20px; 212 | margin: 10px; 213 | } 214 | 215 | #inner_content .inner_intro { 216 | margin: 10px 15px; 217 | font-size: 25px; 218 | font-family: 微软雅黑; 219 | font-weight: bold; 220 | } 221 | } 222 | /* END 轮播图样式表 */ -------------------------------------------------------------------------------- /css/search.css: -------------------------------------------------------------------------------- 1 | #container { 2 | margin-left: 30px; 3 | } 4 | 5 | #container form #search_inner { 6 | margin-top: 20px; 7 | } 8 | 9 | .user_searched { 10 | margin-top: 20px; 11 | } 12 | 13 | #search_borad { 14 | border: 1px solid lightgray; 15 | border-radius: 15px; 16 | position: relative; 17 | width: 140px; 18 | margin-top: 20px; 19 | line-height: 30px; 20 | transition-property: border; 21 | transition-duration: 0.5s; 22 | display: inline-block; 23 | } 24 | 25 | #search_borad input { 26 | font-size: 15px; 27 | margin-left: 10px; 28 | border: none; 29 | width: 100px; 30 | } 31 | 32 | #search_borad a img { 33 | width: 30px; 34 | position: absolute; 35 | opacity: 0.5; 36 | right: 0; 37 | } 38 | 39 | #search_borad:hover { 40 | border: 1px solid black; 41 | } 42 | 43 | #search_borad a:hover img { 44 | opacity: 1; 45 | } 46 | 47 | .search_active { 48 | border: 1px solid black!important; 49 | } 50 | 51 | 52 | .user_avatar { 53 | /* float: left; */ 54 | margin-right: 20px; 55 | line-height: 100px; 56 | position: relative; 57 | top: 20px; 58 | display: inline-block; 59 | } 60 | 61 | .user_content { 62 | /* margin-left: 30px; */ 63 | line-height: 100px; 64 | width: 80%; 65 | display: inline-block; 66 | } 67 | 68 | .user_content .user_name { 69 | font-size: 18px; 70 | font-weight: bold; 71 | font-family: 微软雅黑; 72 | } 73 | 74 | .user_content .user_hobby { 75 | margin-left: 10px; 76 | } 77 | 78 | .user_content .user_follow { 79 | position: absolute; 80 | right: 30px; 81 | } 82 | 83 | .user_content .user_follow button { 84 | /* TODO 关注按钮样式*/ 85 | } 86 | 87 | .user_item:first-child { 88 | border-top: 1px solid lightgray; 89 | } 90 | 91 | .user_item { 92 | /* float: left; */ 93 | display: block; 94 | border-bottom: 1px solid lightgray; 95 | /* border-color: black; */ 96 | } 97 | 98 | .user_item:after { 99 | content: ''; 100 | clear: both; 101 | display: block; 102 | } 103 | 104 | .follow_button { 105 | outline: none; 106 | cursor: pointer; 107 | border: 1px solid lightgray; 108 | width: 75px; 109 | line-height: 30px; 110 | border-radius: 5px; 111 | } 112 | 113 | .followed { 114 | background-color: rgb(229, 233, 239); 115 | } 116 | 117 | .follow_button:hover { 118 | border-color: black; 119 | } 120 | 121 | .follow_button:hover a { 122 | color: black; 123 | } 124 | 125 | .follow_button a { 126 | color: gray; 127 | font-family: 微软雅黑; 128 | } 129 | 130 | @media only screen and (max-width: 700px) { 131 | .user_content .user_hobby { 132 | display: none; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /css/setting.css: -------------------------------------------------------------------------------- 1 | #main #content #settingBoard { 2 | position: relative; 3 | top: 20px; 4 | width: 760px; 5 | height: 260px; 6 | margin: 0px auto; 7 | background: linear-gradient(to right, #ebebeb, #8a8a8a); 8 | padding: 40px; 9 | border-top-left-radius: 40px; 10 | border-bottom-right-radius: 40px; 11 | } 12 | 13 | #main #content #settingBoard legend { 14 | font-size: 20px; 15 | text-shadow: 2px 2px 2px #8a8a8a; 16 | } 17 | 18 | 19 | #main #content #settingBoard .settingRow { 20 | position: relative; 21 | left: 20px; 22 | width: 300px; 23 | height: 25px; 24 | border-bottom: 1px black solid; 25 | top: -20px; 26 | } 27 | 28 | #main #content #settingBoard #banAccess { 29 | top: 0px; 30 | } 31 | 32 | #main #content #settingBoard #uploadHead { 33 | top: 20px; 34 | } 35 | 36 | #main #content #settingBoard #updatePassword { 37 | top: 40px; 38 | } 39 | 40 | #main #content #settingBoard #updateData { 41 | top: 60px; 42 | } 43 | 44 | #main #content #settingBoard #exitLogin { 45 | top: 80px; 46 | } 47 | 48 | #main #content #settingBoard .fonts:hover { 49 | color: #8a8a8a; 50 | cursor: pointer; 51 | } 52 | 53 | .slideButton { 54 | position: relative; 55 | float: right; 56 | top: 2px; 57 | width: 30px; 58 | height: 16px; 59 | background-color: #fff; 60 | border-radius: 20px; 61 | cursor: pointer; 62 | border: 1px #8a8a8a solid; 63 | outline: none; 64 | } 65 | 66 | .slideButton .smallButton { 67 | position: relative; 68 | border-radius: 20px; 69 | border: 1px #8a8a8a solid; 70 | background-color: #8a8a8a; 71 | width: 16px; 72 | height: 16px; 73 | top: -1px; 74 | left: -1px; 75 | } 76 | 77 | .slideButton .colorSlide { 78 | position: absolute; 79 | height: 100%; 80 | width: 0px; 81 | background-color: #8a8a8a; 82 | border-radius: 20px; 83 | background-color: #336699; 84 | } 85 | 86 | #horse { 87 | position: absolute; 88 | right: 30px; 89 | top: 20px; 90 | opacity: 0.5; 91 | } 92 | 93 | @media only screen and (max-width: 600px) { 94 | #horse { 95 | left: 40px; 96 | opacity: 0.2; 97 | } 98 | 99 | #hideHome { 100 | display: none; 101 | } 102 | } 103 | 104 | .password { 105 | position: relative; 106 | display: block; 107 | height: 20px; 108 | font-size: 15px; 109 | border-radius: 5px; 110 | width: 200px; 111 | display: none; 112 | top: 15px; 113 | left: 20px; 114 | outline: none; 115 | } 116 | 117 | #password2 { 118 | top: 20px; 119 | } 120 | 121 | #password3 { 122 | top: 25px; 123 | } 124 | 125 | .buttons { 126 | position: absolute; 127 | top: 203px; 128 | left: 170px; 129 | cursor: pointer; 130 | outline: none; 131 | border-radius: 5px; 132 | width: 45px; 133 | height: 20px; 134 | display: none; 135 | } 136 | 137 | #button2 { 138 | left: 225px; 139 | } 140 | 141 | .alert { 142 | font-size: 15px; 143 | color: red; 144 | } 145 | 146 | .alert { 147 | position: relative; 148 | top: -5px; 149 | left: 240px; 150 | } 151 | 152 | 153 | -------------------------------------------------------------------------------- /css/visitHome.css: -------------------------------------------------------------------------------- 1 | #main #wrap #nav #index { 2 | color: black; 3 | } 4 | 5 | #main #wrap #nav #li_index { 6 | border-bottom: solid 2px #919191; 7 | } 8 | 9 | #main #content #information { 10 | position: absolute; 11 | width: 14%; 12 | height: 215px; 13 | right: 20px; 14 | top: 25px; 15 | display: block; 16 | border-top-left-radius: 20px; 17 | border-bottom-right-radius: 20px; 18 | background: linear-gradient(to right, #ebebeb, #8a8a8a); 19 | } 20 | 21 | #main #content #information legend { 22 | text-shadow: 2px 2px 3px black; 23 | } 24 | 25 | #main #content #information #fan { 26 | position: relative; 27 | height: 20px; 28 | width: 80px; 29 | top: 20px; 30 | margin: 0px auto; 31 | } 32 | 33 | #main #content #information #guanzhu { 34 | position: relative; 35 | height: 20px; 36 | width: 80px; 37 | top: 40px; 38 | margin: 0px auto; 39 | } 40 | 41 | #main #content #information #blog_num { 42 | position: relative; 43 | height: 20px; 44 | width: 80px; 45 | top: 60px; 46 | margin: 0px auto; 47 | } 48 | 49 | #main #content #information #like { 50 | position: relative; 51 | height: 20px; 52 | width: 80px; 53 | top: 80px; 54 | margin: 0px auto; 55 | } 56 | 57 | @media only screen and (max-width: 740px) { 58 | #main #wrap #welcomeBack { 59 | display: none; 60 | } 61 | 62 | #main #content #board { 63 | top: 170px; 64 | height: 120px; 65 | } 66 | 67 | #main #content #board #board_set #msg { 68 | top: 5px; 69 | height: 70%; 70 | } 71 | 72 | #main #content #information { 73 | width: 70%; 74 | height: 100px; 75 | top: 30px; 76 | left: 0px; 77 | margin: 0px auto; 78 | } 79 | 80 | #main #content #information #fan { 81 | top: 15px; 82 | margin: 0px; 83 | left: 60px; 84 | } 85 | 86 | #main #content #information #guanzhu { 87 | top: -5px; 88 | margin: 0px; 89 | left: 200px; 90 | } 91 | 92 | #main #content #information #blog_num { 93 | top: 15px; 94 | margin: 0px; 95 | left: 60px; 96 | } 97 | 98 | #main #content #information #like { 99 | top: -5px; 100 | margin: 0px; 101 | left: 200px; 102 | } 103 | } 104 | 105 | @media only screen and (max-width: 1100px) { 106 | #main #content #information { 107 | right: 0px; 108 | } 109 | } 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /delete.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | if (request.getMethod().equalsIgnoreCase("post")) { 24 | String date = request.getParameter("deleteButton"); 25 | try { 26 | int cnt = stmt.executeUpdate("delete from blog where date='"+date+"'"); 27 | if (cnt > 0) { 28 | msg = "删除该blog成功!"; 29 | response.sendRedirect("index.jsp?userId=" + userId); 30 | } 31 | } 32 | catch (Exception e) { 33 | msg = e.getMessage(); 34 | } 35 | } 36 | stmt.close(); con.close(); 37 | %> -------------------------------------------------------------------------------- /deleteMessageBoard.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | String visitName = ""; //要访问用户 24 | visitName = request.getParameter("visitName"); 25 | 26 | if (request.getMethod().equalsIgnoreCase("post")) { 27 | String date = request.getParameter("deleteBoard"); 28 | try { 29 | int cnt = stmt.executeUpdate("delete from messageBoard where date='"+date+"'"); 30 | if (cnt > 0) { 31 | msg = "删除该block成功!"; 32 | } 33 | response.sendRedirect("visitMessageBoard.jsp?visitName=" + visitName); 34 | } 35 | catch (Exception e) { 36 | msg = e.getMessage(); 37 | } 38 | } 39 | stmt.close(); con.close(); 40 | %> 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |

<%=msg%>

49 | 50 | -------------------------------------------------------------------------------- /deleteMessageBoard2.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | String boardOwner = request.getParameter("messageOwner"); 24 | 25 | if (request.getMethod().equalsIgnoreCase("post")) { 26 | String date = request.getParameter("deleteBoard"); 27 | try { 28 | int cnt = stmt.executeUpdate("delete from messageBoard where visitName='"+boardOwner+"' and date='"+date+"'"); 29 | if (cnt > 0) { 30 | msg = "删除该block成功!"; 31 | } 32 | response.sendRedirect("messageBoard.jsp"); 33 | } 34 | catch (Exception e) { 35 | msg = e.getMessage(); 36 | } 37 | } 38 | stmt.close(); con.close(); 39 | %> 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |

<%=msg%>

48 | 49 | -------------------------------------------------------------------------------- /friends.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String userId = request.getParameter("userId"); 4 | String msg = ""; 5 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 6 | String user = "user"; 7 | String pwd = "123"; 8 | Class.forName("com.mysql.jdbc.Driver"); 9 | Connection con = DriverManager.getConnection(connectString, user, pwd); 10 | Statement stmt = con.createStatement(); 11 | 12 | String webUser = ""; //登录用户 13 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 14 | if (cookies != null) { 15 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 16 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 17 | webUser = cookies[i].getValue(); //获取用户名 18 | } 19 | } 20 | } 21 | 22 | //查看是否隐藏边栏 23 | String showHome = ""; 24 | ResultSet rHome = stmt.executeQuery("select * from users where name='"+webUser+"'"); 25 | while (rHome.next()) { 26 | showHome = rHome.getString("showHome"); 27 | } 28 | rHome.close(); 29 | 30 | //加载签名 31 | String sign_value = ""; 32 | ResultSet rsign = stmt.executeQuery("select * from users where name='"+webUser+"'"); 33 | while (rsign.next()) { 34 | sign_value = rsign.getString("sign"); 35 | } 36 | rsign.close(); 37 | %> 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | Lifeblog.com 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |
62 | 64 | 72 |
73 |
74 |
75 | 76 |
77 | 「Lifeblog.com」 78 | 79 |
80 | 81 | 82 |
83 |
84 | 「Lifeblog.com」 85 |
86 |
87 |
88 | 89 |
90 | 91 |
92 |
93 |

<%=sign_value%>

94 |
95 | 99 | 102 |
103 | 104 |
105 |
106 | 117 |
118 | 欢迎回来!  119 | 123 |
124 |
125 |
126 |
127 |
128 | 129 | 130 | 131 | 139 | 140 | -------------------------------------------------------------------------------- /images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/.DS_Store -------------------------------------------------------------------------------- /images/aboutWrap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/aboutWrap.jpg -------------------------------------------------------------------------------- /images/arrows-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/arrows-30.png -------------------------------------------------------------------------------- /images/avatar/default_avatar.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/default_avatar.jpeg -------------------------------------------------------------------------------- /images/avatar/default_avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/default_avatar.jpg -------------------------------------------------------------------------------- /images/avatar/fon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/fon.jpg -------------------------------------------------------------------------------- /images/avatar/hh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/hh.png -------------------------------------------------------------------------------- /images/avatar/lexBurner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/lexBurner.png -------------------------------------------------------------------------------- /images/avatar/prin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/prin.png -------------------------------------------------------------------------------- /images/avatar/tomato.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/tomato.png -------------------------------------------------------------------------------- /images/avatar/xmq.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/xmq.jpeg -------------------------------------------------------------------------------- /images/avatar/zhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/zhou.png -------------------------------------------------------------------------------- /images/avatar/zhuang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/zhuang.jpg -------------------------------------------------------------------------------- /images/avatar/zkh.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/zkh.jpeg -------------------------------------------------------------------------------- /images/avatar/zsh.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/zsh.jpeg -------------------------------------------------------------------------------- /images/avatar/zyl.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/avatar/zyl.jpeg -------------------------------------------------------------------------------- /images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/back.png -------------------------------------------------------------------------------- /images/bamboo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/bamboo.png -------------------------------------------------------------------------------- /images/blogEmpty.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/blogEmpty.jpg -------------------------------------------------------------------------------- /images/boke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/boke.png -------------------------------------------------------------------------------- /images/carousel/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/carousel/1.jpg -------------------------------------------------------------------------------- /images/carousel/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/carousel/2.jpg -------------------------------------------------------------------------------- /images/carousel/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/carousel/3.jpg -------------------------------------------------------------------------------- /images/carousel/leaves.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/carousel/leaves.jpg -------------------------------------------------------------------------------- /images/carousel/tower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/carousel/tower.jpg -------------------------------------------------------------------------------- /images/carousel/water.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/carousel/water.jpg -------------------------------------------------------------------------------- /images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/close.png -------------------------------------------------------------------------------- /images/default_avatar.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/default_avatar.jpeg -------------------------------------------------------------------------------- /images/default_avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/default_avatar.jpg -------------------------------------------------------------------------------- /images/dianzan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/dianzan.png -------------------------------------------------------------------------------- /images/emoji/angry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/angry.png -------------------------------------------------------------------------------- /images/emoji/astonishing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/astonishing.png -------------------------------------------------------------------------------- /images/emoji/cool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/cool.png -------------------------------------------------------------------------------- /images/emoji/embarrassed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/embarrassed.png -------------------------------------------------------------------------------- /images/emoji/ghost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/ghost.png -------------------------------------------------------------------------------- /images/emoji/hurt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/hurt.png -------------------------------------------------------------------------------- /images/emoji/laugh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/laugh.png -------------------------------------------------------------------------------- /images/emoji/laughcry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/laughcry.png -------------------------------------------------------------------------------- /images/emoji/liking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/liking.png -------------------------------------------------------------------------------- /images/emoji/naughty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/naughty.png -------------------------------------------------------------------------------- /images/emoji/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/sad.png -------------------------------------------------------------------------------- /images/emoji/shit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/shit.png -------------------------------------------------------------------------------- /images/emoji/shocking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/shocking.png -------------------------------------------------------------------------------- /images/emoji/skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/skeleton.png -------------------------------------------------------------------------------- /images/emoji/sleep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/sleep.png -------------------------------------------------------------------------------- /images/emoji/think.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/think.png -------------------------------------------------------------------------------- /images/emoji/vomit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/vomit.png -------------------------------------------------------------------------------- /images/emoji/weap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/weap.png -------------------------------------------------------------------------------- /images/emoji/ʺ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/ʺ.png -------------------------------------------------------------------------------- /images/emoji/受伤.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/受伤.png -------------------------------------------------------------------------------- /images/emoji/吐.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/吐.png -------------------------------------------------------------------------------- /images/emoji/喜欢.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/喜欢.png -------------------------------------------------------------------------------- /images/emoji/大笑.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/大笑.png -------------------------------------------------------------------------------- /images/emoji/尴尬.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/尴尬.png -------------------------------------------------------------------------------- /images/emoji/屎.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/屎.png -------------------------------------------------------------------------------- /images/emoji/思考.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/思考.png -------------------------------------------------------------------------------- /images/emoji/惊讶.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/惊讶.png -------------------------------------------------------------------------------- /images/emoji/流泪.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/流泪.png -------------------------------------------------------------------------------- /images/emoji/生气.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/生气.png -------------------------------------------------------------------------------- /images/emoji/睡觉.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/睡觉.png -------------------------------------------------------------------------------- /images/emoji/笑哭.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/笑哭.png -------------------------------------------------------------------------------- /images/emoji/耍酷.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/耍酷.png -------------------------------------------------------------------------------- /images/emoji/调皮.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/调皮.png -------------------------------------------------------------------------------- /images/emoji/难过.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/难过.png -------------------------------------------------------------------------------- /images/emoji/震惊.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/震惊.png -------------------------------------------------------------------------------- /images/emoji/骷髅.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/骷髅.png -------------------------------------------------------------------------------- /images/emoji/鬼脸.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/emoji/鬼脸.png -------------------------------------------------------------------------------- /images/expand-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/expand-menu.png -------------------------------------------------------------------------------- /images/expand_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/expand_black.png -------------------------------------------------------------------------------- /images/fan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/fan.png -------------------------------------------------------------------------------- /images/guanzhu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/guanzhu.png -------------------------------------------------------------------------------- /images/homepic.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/homepic.jpeg -------------------------------------------------------------------------------- /images/horse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/horse.png -------------------------------------------------------------------------------- /images/icon/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/.DS_Store -------------------------------------------------------------------------------- /images/icon/bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/bold.png -------------------------------------------------------------------------------- /images/icon/dataEdit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/dataEdit.png -------------------------------------------------------------------------------- /images/icon/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/email.png -------------------------------------------------------------------------------- /images/icon/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/exit.png -------------------------------------------------------------------------------- /images/icon/gaojibianji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/gaojibianji.png -------------------------------------------------------------------------------- /images/icon/huanyuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/huanyuan.png -------------------------------------------------------------------------------- /images/icon/jinghao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/jinghao.png -------------------------------------------------------------------------------- /images/icon/level3Comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/level3Comment.png -------------------------------------------------------------------------------- /images/icon/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/link.png -------------------------------------------------------------------------------- /images/icon/maobi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/maobi.png -------------------------------------------------------------------------------- /images/icon/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/phone.png -------------------------------------------------------------------------------- /images/icon/picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/picture.png -------------------------------------------------------------------------------- /images/icon/quanping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/quanping.png -------------------------------------------------------------------------------- /images/icon/return.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/return.png -------------------------------------------------------------------------------- /images/icon/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/search.png -------------------------------------------------------------------------------- /images/icon/search2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/search2.png -------------------------------------------------------------------------------- /images/icon/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/setting.png -------------------------------------------------------------------------------- /images/icon/submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/submit.png -------------------------------------------------------------------------------- /images/icon/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/title.png -------------------------------------------------------------------------------- /images/icon/underline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/underline.png -------------------------------------------------------------------------------- /images/icon/xiaolian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/xiaolian.png -------------------------------------------------------------------------------- /images/icon/xieti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/xieti.png -------------------------------------------------------------------------------- /images/icon/zhizhang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/zhizhang.png -------------------------------------------------------------------------------- /images/icon/ziliao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/icon/ziliao.png -------------------------------------------------------------------------------- /images/navigator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/navigator.png -------------------------------------------------------------------------------- /images/pen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/pen.png -------------------------------------------------------------------------------- /images/picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/picture.png -------------------------------------------------------------------------------- /images/recommend/fon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/fon.jpg -------------------------------------------------------------------------------- /images/recommend/grass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/grass.jpg -------------------------------------------------------------------------------- /images/recommend/hh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/hh.png -------------------------------------------------------------------------------- /images/recommend/leaves.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/leaves.jpg -------------------------------------------------------------------------------- /images/recommend/lexBurner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/lexBurner.png -------------------------------------------------------------------------------- /images/recommend/prin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/prin.png -------------------------------------------------------------------------------- /images/recommend/tomato.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/tomato.png -------------------------------------------------------------------------------- /images/recommend/tower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/tower.jpg -------------------------------------------------------------------------------- /images/recommend/water.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/water.jpg -------------------------------------------------------------------------------- /images/recommend/zhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/recommend/zhou.png -------------------------------------------------------------------------------- /images/team/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/team/.DS_Store -------------------------------------------------------------------------------- /images/team/xmq.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/team/xmq.jpeg -------------------------------------------------------------------------------- /images/team/zkh.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/team/zkh.jpeg -------------------------------------------------------------------------------- /images/team/zsh.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/team/zsh.jpeg -------------------------------------------------------------------------------- /images/team/zyl.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/team/zyl.jpeg -------------------------------------------------------------------------------- /images/wholehomepic.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhuangXuward/Web-project/8c4257c1f2a662bbcffdc278c28ad3bdcf4623a0/images/wholehomepic.jpeg -------------------------------------------------------------------------------- /js/data.js: -------------------------------------------------------------------------------- 1 | function dataToEdit(obj) { 2 | obj.style.display = "none"; 3 | document.getElementById('saveData').style.display = "block"; 4 | document.getElementById('exit').style.display = "block"; 5 | var inputs = document.getElementsByClassName("dataInput"); 6 | for (var i = 0; i < inputs.length; i ++) 7 | { 8 | inputs[i].style.display = "inline-block"; 9 | } 10 | var dataValues = document.getElementsByClassName("dataValue"); 11 | for (var i = 0; i < dataValues.length; i ++) 12 | { 13 | dataValues[i].style.display = "none"; 14 | } 15 | } 16 | 17 | function datatoShow(obj) { 18 | var inputs = document.getElementsByClassName("dataInput"); 19 | for (var i = 0; i < inputs.length; i ++) 20 | { 21 | inputs[i].style.display = "none"; 22 | } 23 | var dataValues = document.getElementsByClassName("dataValue"); 24 | for (var i = 0; i < dataValues.length; i ++) 25 | { 26 | dataValues[i].style.display = "inline-block"; 27 | } 28 | document.getElementById('dataEdit').style.display = "block"; 29 | document.getElementById('saveData').style.display = "none"; 30 | document.getElementById('exit').style.display = "none"; 31 | } 32 | 33 | //判断是否为闰年 34 | function isLeapYear(year) { 35 | return ((0 == year % 4) && ((year % 100 != 0) || (yaer % 400 == 0))); 36 | } 37 | 38 | //年份选定 39 | function showMonth() { 40 | document.getElementById('sel2').removeAttribute("disabled"); 41 | document.getElementById('sel1').setAttribute("disabled", "true"); 42 | } 43 | 44 | //年份选定 45 | function showDay() { 46 | document.getElementById('sel3').removeAttribute("disabled"); 47 | document.getElementById('sel2').setAttribute("disabled", "true"); 48 | } 49 | 50 | //通过日期和年份获得该年改月的总日期数 51 | function getDayNum(month, year) { 52 | if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) 53 | return 31; 54 | else if (month == 2 && isLeapYear(year)) 55 | return 29; 56 | else if (month == 2 && !isLeapYear(year)) 57 | return 28; 58 | else 59 | return 30; 60 | } 61 | 62 | //设置修改资料 63 | //通过上一个跳转过来的网页是否是setting.jsp确定 64 | window.onload = function() { 65 | if (document.referrer.search("setting.jsp") != -1) 66 | document.getElementById("dataEdit").click(); 67 | } -------------------------------------------------------------------------------- /js/friends.js: -------------------------------------------------------------------------------- 1 | window.onload = function () { 2 | var carouImg = document.getElementById("carousel_images"); 3 | var carouWrap = document.getElementById("carousel_wrap"); 4 | var img = carouImg.getElementsByTagName("img")[0]; 5 | var leftArrow = document.getElementsByClassName("left-arrow")[0]; 6 | var rightArrow = document.getElementsByClassName("right-arrow")[0]; 7 | var oBtn = document.getElementsByClassName("dot"); 8 | var index = 0; 9 | var index_length = oBtn.length; 10 | 11 | // 给图片添加过渡效果 12 | carouImg.classList.add("transition"); 13 | 14 | // 动态获取绝对定位轮播图的高度,设置carousel_wrap的高度,宽度为整个main宽度 15 | // 如果mystyle.css中使用overflow:auto->含有滚动条宽度; 故使用overflow:scroll 16 | carouImg.style.left = -img.clientWidth + "px"; 17 | console.log(carouImg.style.left); 18 | carouWrap.style.height = img.offsetHeight + "px"; 19 | 20 | // 监听body大小变化,修改轮播图的图片位置和高度 21 | document.body.onresize = function () { 22 | carouImg.style.left = -img.clientWidth + "px"; 23 | carouWrap.style.height = img.offsetHeight + "px"; 24 | } 25 | 26 | // 点击右箭头 27 | rightArrow.onclick = function () { 28 | next_pic(); 29 | showCurrentDot(index); 30 | } 31 | 32 | // 点击左箭头 33 | leftArrow.onclick = function () { 34 | pre_pic(); 35 | showCurrentDot(index); 36 | } 37 | 38 | // 点击小点 39 | for (let i = 0; i < oBtn.length; ++i) { 40 | oBtn[i].onclick = function () { 41 | var left = parseInt(carouImg.style.left); 42 | var newLeft; 43 | 44 | // 如果没有临界判断,当图片位于“替补图片”时,点击提示点会有错乱过渡 45 | if (left <= (-img.clientWidth) * (index_length + 1)) { 46 | // 临界情况判断 47 | carouImg.classList.remove("transition"); 48 | newLeft = -img.clientWidth * 1; 49 | carouImg.style.left = newLeft + 'px'; 50 | } 51 | if (left >= -10) { 52 | // 临界情况判断 53 | carouImg.classList.remove("transition"); 54 | newLeft = -img.clientWidth * index_length; 55 | carouImg.style.left = newLeft + 'px'; 56 | } 57 | 58 | newLeft = (-img.clientWidth) * (i + 1); 59 | carouImg.style.left = newLeft + 'px'; 60 | // 注意click事件的执行过程,要在修改完left后添加transition类 61 | carouImg.classList.add("transition"); 62 | index = i; 63 | showCurrentDot(i); 64 | } 65 | } 66 | 67 | // 下一张图片 68 | function next_pic() { 69 | var left = parseInt(carouImg.style.left); 70 | if (left <= (-img.clientWidth) * (index_length + 1)) { 71 | // 临界情况判断 72 | carouImg.classList.remove("transition"); 73 | var newLeft = -img.clientWidth * 1; 74 | carouImg.style.left = newLeft + 'px'; 75 | newLeft = -img.clientWidth * 2; 76 | carouImg.classList.add("transition"); 77 | index = 1; 78 | } else { 79 | // 一般情况 80 | var newLeft = parseInt(carouImg.style.left) - img.clientWidth; 81 | (index == (index_length - 1)) ? index = 0: index += 1; 82 | } 83 | carouImg.style.left = newLeft + 'px'; // 不要忘记添加'px' 84 | console.log(newLeft); 85 | } 86 | 87 | // 上一张图片 88 | function pre_pic() { 89 | var left = parseInt(carouImg.style.left); 90 | if (left >= -10) { 91 | // 临界情况判断 92 | carouImg.classList.remove("transition"); 93 | var newLeft = -img.clientWidth * index_length; 94 | carouImg.style.left = newLeft + 'px'; 95 | newLeft = -img.clientWidth * (index_length - 1); 96 | carouImg.classList.add("transition"); 97 | index = index_length - 2; 98 | } else { 99 | // 一般情况 100 | var newLeft = parseInt(carouImg.style.left) + img.clientWidth; 101 | (index == 0) ? index = (index_length - 1): index -= 1; 102 | } 103 | carouImg.style.left = newLeft + 'px'; 104 | console.log(newLeft); 105 | } 106 | 107 | function showCurrentDot(index) { 108 | for (let i = 0; i < oBtn.length; ++i) { 109 | (i == index) ? oBtn[i].classList.add("active"): oBtn[i].classList.remove("active"); 110 | } 111 | } 112 | 113 | // 设置轮播定时器 114 | var timer = setInterval(function () { 115 | next_pic(); 116 | showCurrentDot(index); 117 | }, 3000); 118 | 119 | carouWrap.onmouseover = function () { 120 | clearInterval(timer); 121 | } 122 | 123 | carouWrap.onmouseout = function () { 124 | timer = setInterval(function () { 125 | next_pic(); 126 | showCurrentDot(index); 127 | }, 3000); 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /js/general.js: -------------------------------------------------------------------------------- 1 | //查看是否已经登录账号 2 | window.onload = function() { 3 | if (document.cookie.length == 0) 4 | window.location.href = "login.jsp"; 5 | } 6 | 7 | //获取被选中的文本值 8 | function getSelectText() { 9 | return window.getSelection ? window.getSelection().toString() : 10 | document.selection.createRange().text; 11 | } 12 | 13 | //显示mobile模式中的shadow,并能显示相关的链接 14 | function showShadow() { 15 | var shadow = document.getElementById("mobile_shadow"); 16 | shadow.style.width = "" + document.documentElement.scrollWidth + "px"; 17 | 18 | if(document.documentElement.clientHeight>document.documentElement.scrollHeight) 19 | shadow.style.height = "" + document.documentElement.clientHeight + "px"; 20 | else 21 | shadow.style.height = "" + document.documentElement.scrollHeight + "px"; 22 | shadow.style.display = "block"; 23 | 24 | //隐藏三横图像 25 | var hideObj = document.getElementById("expand-menu"); 26 | hideObj.style.display = "none"; 27 | 28 | var showBox = document.getElementById("mobile_box"); 29 | showBox.style.display = "block"; 30 | } 31 | 32 | function hideShadow() { 33 | var shadow = document.getElementById("mobile_shadow"); 34 | shadow.style.display = "none"; 35 | 36 | var hideBox = document.getElementById("mobile_box"); 37 | hideBox.style.display = "none"; 38 | 39 | var showObj = document.getElementById("expand-menu"); 40 | showObj.style.display = "inline-block"; 41 | } 42 | 43 | window.onresize = function() { 44 | var temp = document.documentElement.clientWidth; 45 | var temp2 = document.documentElement.clientHeight; 46 | var shadow = document.getElementById("mobile_shadow"); 47 | shadow.style.width = temp + "px"; 48 | shadow.style.height = temp2 + "px"; 49 | if (document.documentElement.clientWidth > 600) 50 | hideShadow(); 51 | } 52 | 53 | /********************关于编辑文本的JS************************/ 54 | 55 | //解决加入图片后粗体等不再编辑的bug 56 | function solveHBI() { 57 | var _ebold = document.getElementById("ebold"); 58 | if (_ebold.src.search('2') != -1) { 59 | document.execCommand("bold", false, null); 60 | ebold = true; 61 | } 62 | var _etitle = document.getElementById("etitle"); 63 | if (_etitle.src.search('2') != -1) { 64 | document.execCommand("fontsize", false, 6); 65 | etitle = true; 66 | } 67 | var _eitalic = document.getElementById("exieti"); 68 | if (_eitalic.src.search('2') != -1) { 69 | document.execCommand("italic", false, null); 70 | eitalic = true; 71 | } 72 | var _eunderline = document.getElementById("eunderline"); 73 | if (_eunderline.src.search('2') != -1) { 74 | document.execCommand("underline", false, null); 75 | eunderline = true; 76 | } 77 | } 78 | 79 | //编辑div的光标问题解决 80 | 81 | //使光标保持 82 | function efocus() { 83 | var msg = document.getElementById("msg"); 84 | msg.focus(); 85 | } 86 | 87 | //是光标位于文本末 88 | function elast() { 89 | var msg = document.getElementById("msg"); 90 | if (window.getSelection) {//ie11 10 9 ff safari 91 | msg.focus(); //解决ff不获取焦点无法定位问题 92 | var range = window.getSelection();//创建range 93 | range.selectAllChildren(msg);//range 选择obj下所有子内容 94 | range.collapseToEnd();//光标移至最后 95 | } 96 | else if (document.selection) {//ie10 9 8 7 6 5 97 | var range = document.selection.createRange();//创建选择对象 98 | //var range = document.body.createTextRange(); 99 | range.moveToElementText(msg);//range定位到obj 100 | range.collapse(false);//光标移至最后 101 | range.select(); 102 | } 103 | solveHBI(); 104 | solveHBI(); //必须重复 105 | efocus(); 106 | } 107 | 108 | //图片的触碰效果 109 | function appendixto2(obj) { 110 | obj.style.opacity = "1"; 111 | } 112 | 113 | function removethe2(obj) { 114 | obj.style.opacity = "0.5"; 115 | } 116 | 117 | //输出#话题# 118 | function hotTopic() { 119 | var msg = document.getElementById("msg"); 120 | if (msg.innerHTML.search("#输入话题#") == -1) 121 | { 122 | var temp = msg.innerHTML; 123 | msg.innerHTML = "#输入话题#" + temp; 124 | //选中文本 125 | var range = document.createRange(); 126 | var startNode = document.getElementById("msg").firstChild; 127 | var startOffset = 1; 128 | range.setStart(startNode, startOffset); 129 | var endOffset = 5; 130 | range.setEnd(startNode, endOffset); 131 | var selection = window.getSelection(); 132 | selection.removeAllRanges(); 133 | selection.addRange(range) 134 | } 135 | } 136 | 137 | //表情包部分 138 | //显示表情包 139 | function showEmojis() { 140 | var emojis = document.getElementById("emojis"); 141 | emojis.style.display = "block"; 142 | efocus(); 143 | } 144 | 145 | //隐藏表情包 146 | function hideEmojis() { 147 | var emojis = document.getElementById("emojis"); 148 | emojis.style.display = "none"; 149 | } 150 | 151 | //向文本中插入表情 152 | function insertEmoji(obj) { 153 | var temp = obj.getAttribute("id"); 154 | var imgPath = "images/emoji/" + temp + ".png"; 155 | document.execCommand('insertHTML', false, ''); 156 | solveHBI(); 157 | efocus(); 158 | } 159 | 160 | //上传图片 161 | function uploadFile(event){ 162 | var files = event.target.files, file; 163 | if (files && files.length > 0) { 164 | //获取目前上传的文件 165 | file = files[0];// 文件大小校验的动作 166 | } 167 | var URL = window.URL || window.webkitURL; 168 | //获取文件的路径 169 | var imgURL = URL.createObjectURL(file); 170 | var msg = document.getElementById("msg"); 171 | msg.focus(); 172 | document.execCommand('insertHTML', false, ''); 173 | } 174 | 175 | function picClick() { 176 | var uploadFiless = document.getElementById("uploadFiles"); 177 | uploadFiless.click(); 178 | } 179 | 180 | //高级编辑 181 | function topEdit() { 182 | var edit = document.getElementById("edit"); 183 | if (edit.style.display == "inline-block") 184 | { 185 | edit.style.display = "none"; 186 | } 187 | else { 188 | edit.style.display = "inline-block"; 189 | } 190 | var colorBar = document.getElementById("colorBar"); 191 | colorBar.style.display = "none"; 192 | efocus(); 193 | } 194 | 195 | //****高级编辑半部分****// 196 | 197 | function editOut(obj) { 198 | var edit = document.getElementById("edit"); 199 | if(edit.style.display != "inline-block") 200 | { 201 | removethe2(obj); 202 | } 203 | } 204 | 205 | var etitle = false; 206 | var ebold = false; 207 | var eitalic = false; 208 | var eunderline = false; 209 | //判断是否在使用该模式 210 | function editHide(num, obj) { 211 | if (num == 0) 212 | condition = etitle; 213 | if (num == 1) 214 | condition = ebold; 215 | if (num == 2) 216 | condition = eitalic; 217 | if (num == 3) 218 | condition = eunderline; 219 | if (condition == false) 220 | removethe2(obj); 221 | if (condition == true) 222 | appendixto2(obj); 223 | } 224 | 225 | //标题字体 226 | function Title(obj) { 227 | if (etitle == false) 228 | { 229 | etitle = true; 230 | document.execCommand("fontsize", false, 6); 231 | } 232 | else 233 | { 234 | etitle = false; 235 | document.execCommand("fontsize", false, 4); 236 | } 237 | efocus(); 238 | } 239 | 240 | //字体加粗 241 | function bold(obj) { 242 | if (ebold == false) 243 | ebold = true; 244 | else 245 | ebold = false; 246 | document.execCommand("bold", false, null); 247 | efocus(); 248 | } 249 | 250 | //斜体字体 251 | function italic(obj) { 252 | if (eitalic == false) 253 | eitalic = true; 254 | else 255 | eitalic = false; 256 | document.execCommand("italic", false, null); 257 | efocus(); 258 | } 259 | 260 | //加下划线 261 | function underline(obj) { 262 | if (eunderline == false) 263 | eunderline = true; 264 | else 265 | eunderline = false; 266 | document.execCommand("underline", false, null); 267 | efocus(); 268 | } 269 | 270 | 271 | function editMode() { 272 | // var msg = document.getElementById("msg"); 273 | // var temp = msg.innerHTML; 274 | // //编辑框有内容才可以进行 275 | // if (temp[0] != undefined) { 276 | // var selection = getSelection(); 277 | // // 设置最后光标对象 278 | // var cursorPos = selection.anchorOffset; 279 | // console.log(msg.style.innerHTML); 280 | var _etitle = document.getElementById("etitle"); 281 | if (_etitle.src.search('2') != -1) { 282 | document.execCommand("fontsize", false, 6); 283 | etitle = true; 284 | } 285 | 286 | var _ebold = document.getElementById("ebold"); 287 | if (_ebold.src.search('2') != -1) { 288 | document.execCommand("bold", false, null); 289 | ebold = true; 290 | } 291 | 292 | var _eitalic = document.getElementById("exieti"); 293 | if (_eitalic.src.search('2') != -1) { 294 | document.execCommand("italic", false, null); 295 | eitalic = true; 296 | } 297 | 298 | var _ecolor = document.getElementById("ecolor"); 299 | var color = ecolor.style.backgroundColor; 300 | document.execCommand("forecolor", false, color); 301 | // } 302 | } 303 | 304 | function showColors() { 305 | var colorBar = document.getElementById("colorBar"); 306 | colorBar.style.display = "block"; 307 | } 308 | 309 | function colorHover(obj) { 310 | obj.style.opacity = "0.8"; 311 | } 312 | 313 | function colorOut(obj) { 314 | obj.style.opacity = "1"; 315 | } 316 | 317 | function colorBarHide() { 318 | var colorBar = document.getElementById("colorBar"); 319 | colorBar.style.display = "none"; 320 | } 321 | 322 | function changeColor(str) { 323 | var ecolor = document.getElementById("ecolor"); 324 | ecolor.style.backgroundColor = str; 325 | document.execCommand("forecolor", false, str); 326 | } 327 | 328 | //生成链接 329 | function linka() { 330 | document.execCommand("createlink", false, "输入链接"); 331 | } 332 | 333 | //全屏模式 334 | function quanPing() { 335 | //将其他div隐藏 336 | var home = document.getElementById("home"); 337 | home.style.display = "none"; 338 | var bz = document.getElementById("blog_zone"); 339 | bz.style.display = "none"; 340 | var head = document.getElementById("head_portrait"); 341 | head.style.display = "none"; 342 | var wrap = document.getElementById("wrap"); 343 | wrap.style.display = "none"; 344 | var information = document.getElementById("information"); 345 | information.style.display = "none"; 346 | 347 | var board = document.getElementById("board"); 348 | board.style.position = "fixed"; 349 | board.style.Width = "100%"; 350 | board.style.height = "95%"; 351 | board.style.left = "15%"; 352 | 353 | var huanyuan = document.getElementById("huanyuan"); 354 | huanyuan.style.display = "inline-block"; 355 | var quanping = document.getElementById("quanping"); 356 | quanping.style.display = "none"; 357 | 358 | var main = document.getElementById("main"); 359 | main.style.overflowY = "visible"; 360 | 361 | //调整表情包div的长宽 362 | var emojis = document.getElementById("emojis"); 363 | emojis.style.height = "60px"; 364 | emojis.style.width = "360px" 365 | } 366 | 367 | //全屏还原 368 | function huanYuan() { 369 | var home = document.getElementById("home"); 370 | home.style.display = "block"; 371 | var bz = document.getElementById("blog_zone"); 372 | bz.style.display = "block"; 373 | var wrap = document.getElementById("wrap"); 374 | wrap.style.display = "block"; 375 | var information = document.getElementById("information"); 376 | information.style.display = "block"; 377 | 378 | var board = document.getElementById("board"); 379 | board.style.position = "relative"; 380 | board.style.width = "70%"; 381 | board.style.height = "200px"; 382 | board.style.left = "6%" 383 | 384 | var quanping = document.getElementById("quanping"); 385 | quanping.style.display = "inline-block"; 386 | var huanyuan = document.getElementById("huanyuan"); 387 | huanyuan.style.display = "none"; 388 | 389 | var main = document.getElementById("main"); 390 | main.style.overflowY = "scroll"; 391 | 392 | var emojis = document.getElementById("emojis"); 393 | emojis.style.height = "85px"; 394 | emojis.style.width = "180px" 395 | } 396 | 397 | 398 | /******************跟随鼠标移动的提示框************************/ 399 | /*var tip={ 400 | $: function(ele){ 401 | if(typeof(ele) == "object") 402 | return ele; 403 | else if(typeof(ele) == "string" || typeof(ele) == "number") 404 | return document.getElementById(ele.toString()); 405 | return null; 406 | }, 407 | 408 | mousePos: function(e){ 409 | var x, y; 410 | var e = e || window.event; 411 | return { x : e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, 412 | y : e.clientY + document.body.scrollTop + document.documentElement.scrollTop }; 413 | }, 414 | 415 | start:function(obj){ 416 | var self = this; 417 | var t = self.$("mjs:tip"); 418 | obj.onmousemove = function(e) { 419 | 420 | var mouse = self.mousePos(e); 421 | t.style.left = mouse.x + 10 + 'px'; 422 | t.style.top = mouse.y + 10 + 'px'; 423 | t.innerHTML = obj.getAttribute("tips"); 424 | t.style.display = ''; 425 | }; 426 | obj.onmouseout = function(){ 427 | t.style.display = 'none'; 428 | }; 429 | } 430 | }*/ 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | -------------------------------------------------------------------------------- /js/index.js: -------------------------------------------------------------------------------- 1 | //点击div外会隐藏emojis和colorBar 2 | window.onclick = function(event) { 3 |    var target = event ? event.target : window.event.srcElement; 4 |    if(target.id != "colorBar" && target.id != "ecolor" && target.id != "msg") 5 |         colorBarHide(); 6 | if(target.id != "emojis" && target.id != "xiaolian") 7 |     hideEmojis(); 8 | //console.log(document.cookie); 9 | } 10 | 11 | //提交博客内容 12 | function submitMyBlog(obj) { 13 | if (document.getElementById('msg').innerHTML != "") { 14 | obj.form.cntt.value=document.getElementById('msg').innerHTML; 15 | obj.form.cntt.click(); 16 | } 17 | else { 18 | alert("未输入博客内容"); 19 | } 20 | } 21 | 22 | /****************** 博客区用到的JS *****************/ 23 | //放在博客区 24 | function blockHover(obj) { 25 | var temp = obj.id; 26 | if (!replyFlag[temp - 1]) { 27 | obj.style.opacity = "0.9"; 28 | obj.lastElementChild.lastElementChild.style.display = "block"; 29 | } 30 | } 31 | 32 | //离开博客区 33 | function bolckOut(obj) { 34 | var temp = obj.id; 35 | if (!replyFlag[temp - 1]) { 36 | obj.style.opacity = "1"; 37 | obj.lastElementChild.lastElementChild.style.display = "none"; 38 | } 39 | } 40 | 41 | //删除某博客,以时间为介定 42 | function deleteBlog(obj) { 43 | if(window.confirm("确定删除此博客?")) { 44 | document.getElementById("deleteButton").value = obj.id; 45 | document.getElementById("deleteButton").click(); 46 | } 47 | } 48 | 49 | //展开回复框 50 | function replyShow(obj) { 51 | //展开的回复框之外的回复框要隐藏 52 | for (var i = index - 1; i >= 0; i --) { 53 | if (replyFlag[i - 1] == true) { 54 | replyClose(document.getElementById(i.toString()).children[2].lastElementChild); 55 | } 56 | } 57 | //显示replyText 58 | obj.parentNode.parentNode.previousElementSibling.style.display = "block"; 59 | //隐藏blog_operator 60 | obj.parentNode.style.display = "none"; 61 | var temp = obj.parentNode.parentNode.parentNode.id; 62 | replyFlag[temp - 1] = true; 63 | } 64 | 65 | //隐藏回复框 66 | function replyClose(obj) { 67 | //显示blog_operator 68 | obj.parentNode.nextElementSibling.style.display = "block"; 69 | //隐藏replyText 70 | obj.parentNode.style.display = "none"; 71 | var temp = obj.parentNode.parentNode.id; 72 | replyFlag[temp - 1] = false; 73 | } 74 | 75 | //回复博客 76 | function replyBlog(obj) { 77 | if (obj.parentNode.children[0].value != "") { 78 | //回复框的值 79 | document.getElementById("replyButton").value = obj.parentNode.children[0].value; 80 | //回复框所属的博客的日期 81 | document.getElementById("blogDate").value = obj.parentNode.parentNode.children[0].id; 82 | document.getElementById("replyButton").click(); 83 | } 84 | 85 | else { 86 | window.alert("尚未输入回复内容"); 87 | } 88 | } -------------------------------------------------------------------------------- /js/loginAndRegister.js: -------------------------------------------------------------------------------- 1 | // 检测按键:enter 2 | window.onload = function () { 3 | var confirm = document.getElementById("confirm"); 4 | document.addEventListener("keydown", keydown); 5 | //键盘监听,注意:在非ie浏览器和非ie内核的浏览器 6 | //参数1:表示事件,keydown:键盘向下按;参数2:表示要触发的事件 7 | function keydown(event) { 8 | //表示键盘监听所触发的事件,同时传递参数event 9 | switch (event.keyCode) { 10 | case 13: //enter 11 | confirm.click(); 12 | break; 13 | } 14 | } 15 | } 16 | 17 | 18 | //注册检查函数:验证是否输入完全,两次输入的密码是否相同。 19 | function doCheck_Register() { 20 | var inPut = document.querySelectorAll("div#signUpContain form input"); 21 | let flag = 0; 22 | for (let i = 0; i < inPut.length - 1; ++i) { 23 | if (inPut[i].value == "") { 24 | alert("请输入 " + inPut[i].placeholder); 25 | document.querySelectorAll("div#signUpContain form input")[i].focus(); 26 | flag++; 27 | break; 28 | } 29 | } 30 | var pass1 = document.querySelector("div#signUpContain form input#password"); 31 | var pass2 = document.querySelector("div#signUpContain form input#password2"); 32 | if(flag == 0) { 33 | if (pass1.value != pass2.value) { 34 | alert("两次密码不相同!") 35 | document.querySelector("div#signUpContain form input#password2").focus(); 36 | flag++; 37 | } 38 | } 39 | 40 | if (flag == 0) { 41 | formRegister.submit(); 42 | } 43 | return false; 44 | } 45 | 46 | //登录检查函数:验证是否输入,否则提示输入。 47 | function doCheck_logIn() { 48 | var inPut = document.querySelectorAll("div#logInContain form input"); 49 | let flag = 0; 50 | for (let i = 0; i < inPut.length - 1; ++i) { 51 | if (inPut[i].value == "") { 52 | alert("请输入 " + inPut[i].placeholder); 53 | document.querySelectorAll("div#logInContain form input")[i].focus(); 54 | flag++; 55 | break; 56 | } 57 | } 58 | if (flag == 0) { 59 | formLogin.submit(); 60 | } 61 | return false; 62 | } 63 | -------------------------------------------------------------------------------- /js/messageBoard.js: -------------------------------------------------------------------------------- 1 | function blockHover(obj) { 2 | obj.style.opacity = "0.9"; 3 | obj.lastElementChild.lastElementChild.style.display = "block"; 4 | } 5 | 6 | function bolckOut(obj) { 7 | obj.style.opacity = "1"; 8 | obj.lastElementChild.lastElementChild.style.display = "none"; 9 | } 10 | -------------------------------------------------------------------------------- /js/recommend.js: -------------------------------------------------------------------------------- 1 | window.onload = function () { 2 | var carouImg = document.getElementById("carousel_images"); 3 | var carouWrap = document.getElementById("carousel_wrap"); 4 | var img = carouImg.getElementsByTagName("img")[0]; 5 | var leftArrow = document.getElementsByClassName("left-arrow")[0]; 6 | var rightArrow = document.getElementsByClassName("right-arrow")[0]; 7 | var oBtn = document.getElementsByClassName("dot"); 8 | var index = 0; 9 | var index_length = oBtn.length; 10 | 11 | // 给图片添加过渡效果 12 | carouImg.classList.add("transition"); 13 | 14 | // 动态获取绝对定位轮播图的高度,设置carousel_wrap的高度,宽度为整个main宽度 15 | // 如果mystyle.css中使用overflow:auto->含有滚动条宽度; 故使用overflow:scroll 16 | carouImg.style.left = -img.clientWidth + "px"; 17 | console.log(carouImg.style.left); 18 | carouWrap.style.height = img.offsetHeight + "px"; 19 | 20 | // 监听body大小变化,修改轮播图的图片位置和高度 21 | document.body.onresize = function () { 22 | carouImg.style.left = -img.clientWidth + "px"; 23 | carouWrap.style.height = img.offsetHeight + "px"; 24 | var temp = document.documentElement.clientWidth; 25 | var temp2 = document.documentElement.clientHeight; 26 | var shadow = document.getElementById("mobile_shadow"); 27 | shadow.style.width = temp + "px"; 28 | shadow.style.height = temp2 + "px"; 29 | if (document.documentElement.clientWidth > 600) 30 | hideShadow(); 31 | } 32 | 33 | // 点击右箭头 34 | rightArrow.onclick = function () { 35 | next_pic(); 36 | showCurrentDot(index); 37 | } 38 | 39 | // 点击左箭头 40 | leftArrow.onclick = function () { 41 | pre_pic(); 42 | showCurrentDot(index); 43 | } 44 | 45 | // 点击小点 46 | for (let i = 0; i < oBtn.length; ++i) { 47 | oBtn[i].onclick = function () { 48 | var left = parseInt(carouImg.style.left); 49 | var newLeft; 50 | 51 | // 如果没有临界判断,当图片位于“替补图片”时,点击提示点会有错乱过渡 52 | if (left <= (-img.clientWidth) * (index_length + 1)) { 53 | // 临界情况判断 54 | carouImg.classList.remove("transition"); 55 | newLeft = -img.clientWidth * 1; 56 | carouImg.style.left = newLeft + 'px'; 57 | } 58 | if (left >= -10) { 59 | // 临界情况判断 60 | carouImg.classList.remove("transition"); 61 | newLeft = -img.clientWidth * index_length; 62 | carouImg.style.left = newLeft + 'px'; 63 | } 64 | 65 | newLeft = (-img.clientWidth) * (i + 1); 66 | carouImg.style.left = newLeft + 'px'; 67 | // 注意click事件的执行过程,要在修改完left后添加transition类 68 | carouImg.classList.add("transition"); 69 | index = i; 70 | showCurrentDot(i); 71 | } 72 | } 73 | 74 | // 下一张图片 75 | function next_pic() { 76 | var left = parseInt(carouImg.style.left); 77 | if (left <= (-img.clientWidth) * (index_length + 1)) { 78 | // 临界情况判断 79 | carouImg.classList.remove("transition"); 80 | var newLeft = -img.clientWidth * 1; 81 | carouImg.style.left = newLeft + 'px'; 82 | newLeft = -img.clientWidth * 2; 83 | carouImg.classList.add("transition"); 84 | index = 1; 85 | } else { 86 | // 一般情况 87 | var newLeft = parseInt(carouImg.style.left) - img.clientWidth; 88 | (index == (index_length - 1)) ? index = 0: index += 1; 89 | } 90 | carouImg.style.left = newLeft + 'px'; // 不要忘记添加'px' 91 | } 92 | 93 | // 上一张图片 94 | function pre_pic() { 95 | var left = parseInt(carouImg.style.left); 96 | if (left >= -10) { 97 | // 临界情况判断 98 | carouImg.classList.remove("transition"); 99 | var newLeft = -img.clientWidth * index_length; 100 | carouImg.style.left = newLeft + 'px'; 101 | newLeft = -img.clientWidth * (index_length - 1); 102 | carouImg.classList.add("transition"); 103 | index = index_length - 2; 104 | } else { 105 | // 一般情况 106 | var newLeft = parseInt(carouImg.style.left) + img.clientWidth; 107 | (index == 0) ? index = (index_length - 1): index -= 1; 108 | } 109 | carouImg.style.left = newLeft + 'px'; 110 | } 111 | 112 | function showCurrentDot(index) { 113 | for (let i = 0; i < oBtn.length; ++i) { 114 | (i == index) ? oBtn[i].classList.add("active"): oBtn[i].classList.remove("active"); 115 | } 116 | } 117 | 118 | // 设置轮播定时器 119 | var timer = setInterval(function () { 120 | next_pic(); 121 | showCurrentDot(index); 122 | }, 3000); 123 | 124 | carouWrap.onmouseover = function () { 125 | clearInterval(timer); 126 | } 127 | 128 | carouWrap.onmouseout = function () { 129 | timer = setInterval(function () { 130 | next_pic(); 131 | showCurrentDot(index); 132 | }, 3000); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /js/setting.js: -------------------------------------------------------------------------------- 1 | //滑动按钮滑动 2 | function toSlide(obj) { 3 | if (obj.lastElementChild.style.left != "12px") { 4 | obj.firstElementChild.style.width = "100%"; 5 | obj.lastElementChild.style.left = "12px"; 6 | } else { 7 | obj.firstElementChild.style.width = "0px"; 8 | obj.lastElementChild.style.left = "-1px"; 9 | } 10 | } 11 | 12 | //边栏判断值 13 | var flagHOS = false; 14 | 15 | //对边栏的操作 16 | function hideOrShow(obj) { 17 | toSlide(obj); 18 | if (flagHOS == false) 19 | hideHome(); 20 | else 21 | showHome(); 22 | } 23 | 24 | //上传头像 25 | function uploadHead() { 26 | document.getElementById("upload_img").click(); 27 | } 28 | 29 | //修改密码 30 | function updatePassword() { 31 | var inputs = document.getElementsByClassName("password"); 32 | for (var i = 0; i < inputs.length; i++) { 33 | inputs[i].style.display = "block"; 34 | } 35 | var settingRow = document.getElementsByClassName("settingRow"); 36 | for (var i = 0; i < settingRow.length; i++) { 37 | settingRow[i].style.display = "none"; 38 | } 39 | var buttons = document.getElementsByClassName("buttons"); 40 | for (var i = 0; i < buttons.length; i++) { 41 | buttons[i].style.display = "inline-block"; 42 | } 43 | } 44 | 45 | function exitButton() { 46 | var password1 = document.getElementById("password1").value; 47 | var password2 = document.getElementById("password2").value; 48 | var password3 = document.getElementById("password3").value; 49 | if (password1 != "" || password2 != "" || password3 != "") { 50 | if (window.confirm("是否放弃此次修改")) { 51 | var inputs = document.getElementsByClassName("password"); 52 | for (var i = 0; i < inputs.length; i++) { 53 | inputs[i].style.display = "none"; 54 | } 55 | var settingRow = document.getElementsByClassName("settingRow"); 56 | for (var i = 0; i < settingRow.length; i++) { 57 | settingRow[i].style.display = "block"; 58 | } 59 | var buttons = document.getElementsByClassName("buttons"); 60 | for (var i = 0; i < buttons.length; i++) { 61 | buttons[i].style.display = "none"; 62 | } 63 | document.getElementById("password1").value = ""; 64 | document.getElementById("password2").value = ""; 65 | document.getElementById("password3").value = ""; 66 | } 67 | } 68 | //没有填值直接退出 69 | else { 70 | var inputs = document.getElementsByClassName("password"); 71 | for (var i = 0; i < inputs.length; i++) { 72 | inputs[i].style.display = "none"; 73 | } 74 | var settingRow = document.getElementsByClassName("settingRow"); 75 | for (var i = 0; i < settingRow.length; i++) { 76 | settingRow[i].style.display = "block"; 77 | } 78 | var buttons = document.getElementsByClassName("buttons"); 79 | for (var i = 0; i < buttons.length; i++) { 80 | buttons[i].style.display = "none"; 81 | } 82 | document.getElementById("password1").value = ""; 83 | document.getElementById("password2").value = ""; 84 | document.getElementById("password3").value = ""; 85 | } 86 | } 87 | 88 | //清除所有cookie函数 89 | function clearAllCookie() { 90 | var keys = document.cookie.match(/[^ =;]+(?=\=)/g); 91 | if (keys) { 92 | for (var i = keys.length; i--;) 93 | document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString() 94 | } 95 | } 96 | 97 | //退出登录 98 | function exitLogin() { 99 | if (window.confirm("是否退出登录")) { 100 | clearAllCookie(); 101 | window.location.href = "login.jsp"; 102 | } 103 | } -------------------------------------------------------------------------------- /js/shadow.js: -------------------------------------------------------------------------------- 1 | function showBox(boxId, title, msg) { 2 | pos(); 3 | var box = document.getElementById("head_portrait_box"); 4 | box.style.display = "block"; 5 | box.style.left = (document.documentElement.clientWidth/2 - box.clientWidth/2) + "px"; 6 | box.style.top = (document.documentElement.clientHeight/2 - box.clientHeight/2) + "px"; 7 | } 8 | 9 | function hideBox() { 10 | hideShadow(); 11 | } 12 | 13 | function showshadow_avatar() { 14 | var shadow = document.getElementById("shadow"); 15 | shadow.style.width = "" + document.documentElement.scrollWidth + "px"; 16 | if (document.documentElement.clientHeight > document.documentElement.scrollHeight) { 17 | shadow.style.height = "" + document.documentElement.clientHeight + "px"; 18 | } 19 | else { 20 | shadow.style.height = "" + document.documentElement.scrollHeight + "px"; 21 | } 22 | window.onresize = function() { 23 | var temp = document.documentElement.clientWidth; 24 | var shadow = document.getElementById("shadow"); 25 | shadow.style.width = temp + "px"; 26 | }; 27 | shadow.style.display = "block"; 28 | showBox(); 29 | } 30 | 31 | function hideShadow_avatar() { 32 | var shadow = document.getElementById("shadow"); 33 | shadow.style.display = "none"; 34 | var showBtn = document.getElementById("head_portrait_box"); 35 | showBtn.style.display = "none"; 36 | } 37 | 38 | function pos() { 39 | } 40 | 41 | function test() { 42 | showshadow_avatar(); 43 | } 44 | 45 | function onSubmit() { 46 | var reads = new FileReader(); 47 | f = document.getElementById("upload_img").files[0]; 48 | reads.readAsDataURL(f); 49 | reads.onload = function (e) { 50 | document.getElementById("Preview").src = this.result; 51 | } 52 | } -------------------------------------------------------------------------------- /js/visitMessageBoard.js: -------------------------------------------------------------------------------- 1 | 2 | //点击div外会隐藏emojis和colorBar 3 | window.onclick = function(event) { 4 |    var target = event ? event.target : window.event.srcElement; 5 |    if(target.id != "colorBar" && target.id != "ecolor" && target.id != "msg") 6 |         colorBarHide(); 7 | if(target.id != "emojis" && target.id != "xiaolian") 8 |     hideEmojis(); 9 | //console.log(document.cookie); 10 | } 11 | 12 | //提交博客内容 13 | function submitMyMessage(obj) { 14 | if (document.getElementById('msg').innerHTML != "") { 15 | obj.form.cntt.value=document.getElementById('msg').innerHTML; 16 | obj.form.cntt.click(); 17 | } 18 | else { 19 | alert("未输入留言内容"); 20 | } 21 | } 22 | 23 | /****************** 留言区用到的JS *****************/ 24 | function isBlogEmpty() { 25 | if (<%=index%> == 0) { 26 | document.getElementById("blog_zone").style.cssText = "background: url('images/blogEmpty.jpg') no-repeat; background-size: cover; height:330px; background-position: 0% 80%;"; 27 | } 28 | } 29 | 30 | //是否拉出回复框的标志 31 | var replyFlag = []; 32 | var index = <%=index%>; 33 | for (var k = index - 1; k >= 0; k --) { 34 | replyFlag[k] = false; 35 | } 36 | 37 | function blockHover(obj) { 38 | var temp = obj.id; 39 | if (!replyFlag[temp - 1]) { 40 | obj.style.opacity = "0.9"; 41 | obj.lastElementChild.lastElementChild.style.display = "block"; 42 | } 43 | } 44 | 45 | function bolckOut(obj) { 46 | var temp = obj.id; 47 | if (!replyFlag[temp - 1]) { 48 | obj.style.opacity = "1"; 49 | obj.lastElementChild.lastElementChild.style.display = "none"; 50 | } 51 | } 52 | 53 | //删除某博客,以时间为介定 54 | function deleteBlog(obj) { 55 | if(window.confirm("确定删除此博客?")) { 56 | document.getElementById("deleteButton").value = obj.id; 57 | document.getElementById("deleteButton").click(); 58 | } 59 | } 60 | 61 | //展开回复框 62 | function replyShow(obj) { 63 | //展开的回复框之外的回复框要隐藏 64 | for (var i = index - 1; i >= 0; i --) { 65 | if (replyFlag[i - 1] == true) { 66 | replyClose(document.getElementById(i.toString()).children[2].lastElementChild); 67 | } 68 | } 69 | //显示replyText 70 | obj.parentNode.parentNode.previousElementSibling.style.display = "block"; 71 | //隐藏blog_operator 72 | obj.parentNode.style.display = "none"; 73 | var temp = obj.parentNode.parentNode.parentNode.id; 74 | replyFlag[temp - 1] = true; 75 | } 76 | 77 | //隐藏回复框 78 | function replyClose(obj) { 79 | //显示blog_operator 80 | obj.parentNode.nextElementSibling.style.display = "block"; 81 | //隐藏replyText 82 | obj.parentNode.style.display = "none"; 83 | var temp = obj.parentNode.parentNode.id; 84 | replyFlag[temp - 1] = false; 85 | } 86 | 87 | //回复博客 88 | function replyBlog(obj) { 89 | if (obj.parentNode.children[0].value != "") { 90 | //回复框的值 91 | document.getElementById("replyButton").value = obj.parentNode.children[0].value; 92 | //回复框所属的博客的日期 93 | document.getElementById("blogDate").value = obj.parentNode.parentNode.children[0].id; 94 | document.getElementById("replyButton").click(); 95 | } 96 | 97 | else { 98 | window.alert("尚未输入回复内容"); 99 | } 100 | } -------------------------------------------------------------------------------- /login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%> 2 | <%request.setCharacterEncoding("utf-8"); 3 | String userId = request.getParameter("userId");%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 登录 11 | 12 | 89 | 90 | 91 |
92 |
93 |
94 |

登录

95 |
96 | 97 | 98 | 99 |
100 |

还没有帐号?前往注册

101 | <% 102 | String flag = request.getParameter("errNo"); 103 | try{ 104 | if(flag!=null) 105 | out.println("用户名不存在或密码错误"); 106 | }catch(Exception e){ 107 | e.printStackTrace(); 108 | } 109 | %> 110 |
111 |
112 | 113 | -------------------------------------------------------------------------------- /loginCheck.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String msg=""; 4 | String pwd="", name="";//数据库中保存的密码和用户名 5 | String conStr = "jdbc:mysql://172.18.187.10:3306/blog_15336202" 6 | + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String userName = request.getParameter("name"); //从登录页面post过来的用户名和密码 8 | String userPwd = request.getParameter("password"); 9 | String userId = ""; //记录用户id 10 | try { 11 | Class.forName("com.mysql.jdbc.Driver"); // 查找数据库驱动类 12 | Connection con=DriverManager.getConnection(conStr, "user", "123"); 13 | Statement stmt=con.createStatement(); //创建MySQL语句的对象 14 | ResultSet rs=stmt.executeQuery("select * from users where (name = '" + userName + "' or email = '" + userName + "') and password = '" + userPwd + "'");//执行查询,返回结果集 15 | if(rs.next()) { //把游标(cursor)移至第一个或下一个记录 16 | // 设置 name 和 url cookie 17 | Cookie user = new Cookie("user", userName); 18 | userId = rs.getString("id"); 19 | // 设置cookie过期时间为一周。 20 | user.setMaxAge(7*60*60*24); 21 | 22 | // 在响应头部添加cookie 23 | response.addCookie(user); 24 | response.sendRedirect("index.jsp?userId=" + userId); //密码正确跳转index.jsp 25 | }else{ 26 | response.sendRedirect("login.jsp?errNo");//密码不对返回到登陆 27 | } 28 | rs.close(); stmt.close(); con.close(); 29 | } 30 | catch(Exception e){ 31 | msg = e.getMessage(); 32 | } 33 | %> -------------------------------------------------------------------------------- /messageBoard.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | String avatar_img = ""; 10 | Class.forName("com.mysql.jdbc.Driver"); 11 | Connection con = DriverManager.getConnection(connectString, user, pwd); 12 | Statement stmt = con.createStatement(); 13 | 14 | String webUser = ""; //登录用户 15 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 16 | if (cookies != null) { 17 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 18 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 19 | webUser = cookies[i].getValue(); //获取用户名 20 | } 21 | } 22 | } 23 | 24 | //查看是否隐藏边栏 25 | String showHome = ""; 26 | ResultSet rHome = stmt.executeQuery("select * from users where name='"+webUser+"'"); 27 | while (rHome.next()) { 28 | showHome = rHome.getString("showHome"); 29 | avatar_img = rHome.getString("avatar"); 30 | } 31 | rHome.close(); 32 | 33 | //加载签名 34 | String sign_value = ""; 35 | ResultSet rsign = stmt.executeQuery("select * from users where name='"+webUser+"'"); 36 | while (rsign.next()) { 37 | sign_value = rsign.getString("sign"); 38 | } 39 | rsign.close(); 40 | 41 | if (request.getMethod().equalsIgnoreCase("post")) { 42 | java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yy年MM月dd日 HH:mm:ss"); 43 | java.util.Date currentTime = new java.util.Date(); 44 | String date = formatter.format(currentTime); 45 | 46 | String content = request.getParameter("cntt"); 47 | try { 48 | String fmt = "insert into messageboard(date, content) values('%s', '%s')"; 49 | String sql = String.format(fmt, date, content); 50 | int cnt = stmt.executeUpdate(sql); 51 | if (cnt > 0) msg = "保存成功!"; 52 | } 53 | catch (Exception e) { 54 | msg = e.getMessage(); 55 | } 56 | } 57 | 58 | String[] name_output = new String[1000]; 59 | String[] content_output = new String[1000]; 60 | String[] date_output = new String[1000]; 61 | int index = 0; 62 | ResultSet rs = stmt.executeQuery("select * from messageboard where boardOwner='"+webUser+"'"); 63 | while (rs.next()) { 64 | content_output[index] = rs.getString("content"); 65 | date_output[index] = rs.getString("date"); 66 | name_output[index] = rs.getString("visitName"); 67 | index ++; 68 | } 69 | rs.close(); stmt.close(); con.close(); 70 | %> 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 80 | 81 | 82 | 83 | 84 | Lifeblog.com 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 |
95 |
96 |
97 | 99 | 106 |
107 |
108 |
109 | 110 |
111 | 「Lifeblog.com」 112 | 113 |
114 | 115 | 116 |
117 |
118 | 「Lifeblog.com」 119 |
120 |
121 |
122 | <%-- --%> 123 |
124 | 125 |
126 |
127 |

<%=sign_value%>

128 |
129 | 133 | 136 |
137 | 138 |
139 |
140 | 150 |
151 | 欢迎回来! <%=webUser%> 152 |
153 |
154 |
155 |
156 | 157 | 158 | 留言区域 159 | 160 | <%for (int i = index - 1; i >= 0; i --) { %> 161 |
162 | 163 |
164 |
<%= name_output[i] %>
165 |
166 | 第<%= i+1 %>楼 167 |
168 |
169 |
170 | <%= date_output[i] %> 171 |
172 |
173 | <%= content_output[i] %> 174 |
175 |
176 |
177 | 删除 178 |
179 |
180 |
181 | <%}%> 182 |
183 | 184 | 185 |
186 |
187 |
188 |
189 | 190 | 211 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # 项目意义 2 | Web组队大作业:完成一个个人博客网站,后端使用JSP,MySQL数据库,不使用任何前端框架。 3 | 4 | 这个博客平台建立的目的就是方便用户记录生活的点点滴滴,可以是成长的历程,学习的收获,甚至也可以是一点点生活上的吐槽。 5 | 6 | # 使用技术 7 | - 前端:HTML/CSS/JavaScript 8 | - 后端:JSP 9 | - 数据库:MySQL 10 | - 其他:AJAX、cookie 11 | 12 | # 项目功能 13 | 1. 用户需要注册和登录 14 | 2. 用户可以发表和删除博客(含自主编写的富文本编辑,可发表情、图片和设置文字样式等) 15 | 3. 用户可以搜索到其他用户并且可以访问到别的用户的主页面、留言板和资料 16 | 4. 用户可以关注其他的用户,可以显示自己的粉丝和对他人的关注情况 17 | 5. 用户可以评论别人的博客(可以实现多重回复) 18 | 6. 用户可以上传个人资料并且可以编辑修改 19 | 7. 用户之间可以通过留言板相互留言(用户只可以在删除自己的留言) 20 | 8. 用户可以上传自己的头像和个人签名(图片文件上传) 21 | 9. 有推荐页面便于全部用户浏览(有轮播图,推行点赞数较多的博客) 22 | 10. 含有设置(包含隐藏边栏、设置禁止访问页面、修改密码、退出登录等) 23 | 11. 含about,介绍该网站,贴近网站标准。 24 | 12. 该网站实现响应式Web设计(可以在移动端和电脑端方便地使用) 25 | 26 | # 负责板块 27 | 1. 用户注册和登录,JSP+MySQL+AJAX 详情点击 28 | 2. 用户关注功能,JSP+MySQL+AJAX 详情点击 29 | 3. 推荐页面,使用JS实现响应浏览器窗口大小的轮播图 详情点击 30 | 4. 响应式Web设计 -------------------------------------------------------------------------------- /recommend.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String userId = request.getParameter("userId"); 4 | %> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | Lifeblog.com 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 33 | 40 |
41 |
42 |
43 |
44 | 45 |
46 | 47 |
48 | 「Lifeblog.com」 49 | 50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
59 | 60 | 61 |
62 | 68 |
69 | 欢迎回来!  70 | 74 |
75 |
76 | 77 | 78 | 79 |
80 | 98 | 198 |
199 | 200 |
201 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /registerCheck.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String param = request.getParameter("id"); 4 | String value = request.getParameter("value"); 5 | String conStr = "jdbc:mysql://172.18.187.10:3306/blog_15336202" 6 | + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | Class.forName("com.mysql.jdbc.Driver"); // 查找数据库驱动类 8 | Connection con=DriverManager.getConnection(conStr, "user", "123"); 9 | Statement stmt=con.createStatement(); //创建MySQL语句的对象 10 | 11 | if (value.equals("")) { 12 | out.print("输入点东西嘛~这么小气╭(╯^╰)╮"); 13 | } 14 | else { 15 | if (param.equals("username")) { 16 | ResultSet rs=stmt.executeQuery("select * from users where name='" + value + "'"); 17 | if (!rs.next()) { 18 | out.print("该昵称可以使用o(∩_∩)o"); 19 | } 20 | else { 21 | out.print("该昵称已被注册了哦o_O"); 22 | } 23 | 24 | rs.close(); 25 | } 26 | else if (param.equals("email")) { 27 | ResultSet rs=stmt.executeQuery("select * from users where email='" + value + "'"); 28 | if (!rs.next()) { 29 | out.print("这个邮箱可以使用呢o(∩_∩)o"); 30 | } 31 | else { 32 | out.print("阿叻~这个邮箱被人注册了哦"); 33 | } 34 | rs.close(); 35 | } 36 | } 37 | stmt.close(); con.close(); 38 | %> -------------------------------------------------------------------------------- /reply.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | String datePost = request.getParameter("blogDate"); 24 | 25 | String link_value = ""; 26 | int index_link = 1; 27 | ResultSet rss = stmt.executeQuery("select * from blog where date='"+datePost+"' and level='"+2+"'"); 28 | while (rss.next()) { 29 | index_link ++; 30 | } 31 | link_value = Integer.toString(index_link); 32 | rss.close(); 33 | 34 | String blogOwner = webUser; 35 | if (request.getMethod().equalsIgnoreCase("post")) { 36 | java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yy年MM月dd日 HH:mm:ss"); 37 | java.util.Date currentTime = new java.util.Date(); 38 | String replyDate = formatter.format(currentTime); 39 | String date = datePost; 40 | String username = webUser; 41 | String blog = request.getParameter("replyButton"); 42 | String level = "2"; 43 | String link = link_value; 44 | try { 45 | String fmt = "insert into blog(blogOwner, date, username, blog, level, link, replyDate) values('%s', '%s', '%s', '%s', '%s', '%s', '%s')"; 46 | String sql = String.format(fmt, blogOwner, date, username, blog, level, link, replyDate); 47 | int cnt = stmt.executeUpdate(sql); 48 | if (cnt > 0) 49 | {msg = "保存成功!";response.sendRedirect("index.jsp?userId=" + userId);} 50 | } 51 | catch (Exception e) { 52 | msg = e.getMessage(); 53 | } 54 | } 55 | 56 | stmt.close(); con.close(); 57 | %> 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |

<%=msg%>

66 | 67 | -------------------------------------------------------------------------------- /replyLevel3.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | String datePost = request.getParameter("blogDateLevel3"); 24 | String link_value = request.getParameter("blogLinkLevel3"); 25 | String toWho_value = request.getParameter("blogToWhoLevel3"); 26 | 27 | String blogOwner = webUser; 28 | if (request.getMethod().equalsIgnoreCase("post")) { 29 | java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yy年MM月dd日 HH:mm:ss"); 30 | java.util.Date currentTime = new java.util.Date(); 31 | String replyDate = formatter.format(currentTime); 32 | String date = datePost; 33 | String username = webUser; 34 | String blog = request.getParameter("replyButtonLevel3"); 35 | String level = "3"; 36 | String link = link_value; 37 | String level3ToWho = toWho_value; 38 | try { 39 | String fmt = "insert into blog(blogOwner, date, username, blog, level, link, replyDate, level3ToWho) values('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')"; 40 | String sql = String.format(fmt, blogOwner, date, username, blog, level, link, replyDate, level3ToWho); 41 | int cnt = stmt.executeUpdate(sql); 42 | if (cnt > 0) 43 | {msg = "保存成功!";response.sendRedirect("index.jsp");} 44 | } 45 | catch (Exception e) { 46 | msg = e.getMessage(); 47 | } 48 | } 49 | 50 | stmt.close(); con.close(); 51 | %> 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

<%=msg%>

60 | 61 | -------------------------------------------------------------------------------- /search.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" 2 | contentType="text/html; charset=utf-8" 3 | %><% 4 | request.setCharacterEncoding("utf-8"); 5 | String msg = ""; 6 | String sql = ""; 7 | String query = ""; 8 | String ifFollow = ""; 9 | String avatar_img = ""; 10 | int flag = 0; 11 | String pid = request.getParameter("pid"); 12 | String userId = request.getParameter("userId"); 13 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" 14 | + "?autoReconnect=true&useUnicode=true" 15 | + "&characterEncoding=UTF-8"; 16 | StringBuilder table=new StringBuilder(""); 17 | try{ 18 | Class.forName("com.mysql.jdbc.Driver"); 19 | Connection con=DriverManager.getConnection(connectString, "user", "123"); 20 | Statement stmt=con.createStatement(); 21 | Connection con_follow=DriverManager.getConnection(connectString, "user", "123"); 22 | Statement stmt_follow=con_follow.createStatement(); 23 | ResultSet rs; 24 | 25 | ResultSet rHome = stmt.executeQuery("select * from users where id='" + userId + "'"); 26 | while (rHome.next()) { 27 | avatar_img = rHome.getString("avatar"); 28 | } 29 | rHome.close(); 30 | 31 | //========================根据ID/email/phone查找用户======================== 32 | if(request.getMethod().equalsIgnoreCase("post")) { 33 | query = request.getParameter("query"); 34 | sql="select*from users where name like '%"+query+"%' or email like '%"+query+"%' or phone like '%"+query+"%'"; 35 | } 36 | else { 37 | sql="select*from users"; 38 | } 39 | rs=stmt.executeQuery(sql); 40 | if(!rs.next()) { 41 | msg = "没有该用户!"; 42 | } 43 | else { 44 | rs=stmt.executeQuery(sql); 45 | table.append("
"); 46 | while(rs.next()) { 47 | sql = "select * from followers where fans_id='" + userId + "' and followed_id='" + rs.getString("id") + "'"; 48 | ResultSet rs_follow=stmt_follow.executeQuery(sql); 49 | String cssStr = ""; 50 | //不同用户拥有不同的且唯一标识的id 51 | if(rs_follow.next()) { 52 | ifFollow = "已关注"; 53 | cssStr = ""; 54 | } 55 | else { 56 | ifFollow = "关注"; 57 | cssStr = ""; 58 | } 59 | rs_follow.close(); 60 | table.append(String.format( 61 | "
" + 62 | "
" + 63 | "
" + 64 | "
%s %s %s
", 65 | rs.getString("name"), rs.getString("hobby"), 66 | cssStr 67 | ) 68 | ); 69 | } 70 | table.append("
"); 71 | } 72 | //========================END根据ID/email/phone查找用户======================== 73 | 74 | 75 | stmt_follow.close(); 76 | con_follow.close(); 77 | 78 | rs.close(); 79 | stmt.close(); 80 | con.close(); 81 | } 82 | catch (Exception e){ 83 | //msg = e.getMessage(); 84 | } 85 | %> 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 96 | 97 | 98 | 99 | 100 | Lifeblog.com 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 |
111 |
112 |
113 | 115 | 123 |
124 |
125 |
126 | 127 |
128 | 「Lifeblog.com」 129 | 130 |
131 | 132 | 133 |
134 |
135 | 「Lifeblog.com」 136 |
137 |
138 |
139 | <%-- --%> 140 |
141 | 142 |
143 |
144 |

Show your life this moment!

145 |
146 | 151 | 154 |
155 | 156 |
157 |
158 | 165 |
166 | 欢迎回来!  167 | 171 |
172 |
173 |
174 |
175 |
176 |
177 | 178 | 179 |
180 |
181 | <%=table%>

182 | <%=msg%> 183 |
184 |
185 |
186 | 235 | 236 | -------------------------------------------------------------------------------- /settingAjax.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String msg=""; 4 | String conStr = "jdbc:mysql://172.18.187.10:3306/blog_15336202" 5 | + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 6 | 7 | String webUser = request.getParameter("webUser"); 8 | String showHome = request.getParameter("showHome"); 9 | Class.forName("com.mysql.jdbc.Driver"); // 查找数据库驱动类 10 | Connection con=DriverManager.getConnection(conStr, "user", "123"); 11 | Statement stmt=con.createStatement(); //创建MySQL语句的对象 12 | 13 | //修改‘是否显示边栏’的值 14 | stmt.executeUpdate("update users set showHome='"+showHome+"' where name='"+webUser+"'"); 15 | 16 | stmt.close(); con.close(); 17 | %> -------------------------------------------------------------------------------- /settingAjax2.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String msg=""; 4 | String conStr = "jdbc:mysql://172.18.187.10:3306/blog_15336202" 5 | + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 6 | 7 | String webUser = request.getParameter("webUser"); 8 | String ifAccess = request.getParameter("ifAccess"); 9 | Class.forName("com.mysql.jdbc.Driver"); // 查找数据库驱动类 10 | Connection con=DriverManager.getConnection(conStr, "user", "123"); 11 | Statement stmt=con.createStatement(); //创建MySQL语句的对象 12 | 13 | //修改‘是否允许访问’的值 14 | stmt.executeUpdate("update users set Access='"+ifAccess+"' where name='"+webUser+"'"); 15 | 16 | stmt.close(); con.close(); 17 | %> -------------------------------------------------------------------------------- /signup.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String userId = request.getParameter("userId"); 4 | String msg = ""; 5 | String query = ""; 6 | String sql = ""; 7 | String sql2 = ""; 8 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 9 | String user="user"; String pwd="123"; 10 | String username = request.getParameter("name"); 11 | String password = request.getParameter("password"); 12 | String sex = "保密"; 13 | String birthday = ""; 14 | String phone = ""; 15 | String hobby = ""; 16 | String hometown = ""; 17 | String email = request.getParameter("email"); 18 | String job = ""; 19 | String school = ""; 20 | String company = ""; 21 | String sign = ""; 22 | String resume = ""; 23 | if (request.getMethod().equalsIgnoreCase("post")){ 24 | Class.forName("com.mysql.jdbc.Driver"); 25 | Connection con = DriverManager.getConnection(connectString, user, pwd); 26 | Statement stmt = con.createStatement(); 27 | query = request.getParameter("query"); 28 | //TODO 解决MySQL注入问题 29 | sql="select*from users where name='" + username +"'"; //查询数据库中是否有相同用户名 30 | sql2="select*from users where email='" + email + "'"; //查询数据库中是否有相同邮箱 31 | ResultSet rs=stmt.executeQuery(sql); 32 | if (!rs.next()) { //没有相同用户名,继续判断邮箱是否相同 33 | try { 34 | ResultSet rss = stmt.executeQuery(sql2); 35 | if (!rss.next()) { //没有相同邮箱,注册成功 36 | String fmt="insert into users(name, password, sex, birthday, phone, hobby, hometown, email, job, school, company, sign, resume) values('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')"; 37 | sql = String.format(fmt, username, password, sex, birthday, phone, hobby,hometown, email, job, school, company, sign, resume); 38 | int cnt = stmt.executeUpdate(sql); 39 | if (cnt > 0) { 40 | msg = "注册成功啦!"; 41 | // 设置 name 和 url cookie 42 | Cookie newuser = new Cookie("user", username); 43 | userId = username; 44 | // 设置cookie过期时间为一周。 45 | newuser.setMaxAge(7*60*60*24); 46 | 47 | // 在响应头部添加cookie 48 | response.addCookie(newuser); 49 | response.sendRedirect("index.jsp"); 50 | } 51 | } 52 | else { //用户名相同,但是邮箱已注册 53 | msg = "啊呀!这个邮箱被人注册了!"; 54 | } 55 | stmt.close(); con.close(); 56 | } 57 | catch (Exception e) { 58 | msg = e.getMessage(); 59 | } 60 | } 61 | else { //用户名已注册 62 | msg = "啊哦!这个名字已经被别人抢先一步了!"; 63 | } 64 | } 65 | %> 66 | 67 | 68 | 69 | 70 | 71 | 72 | 注册 73 | 74 | 162 | 163 | 164 |
165 |
166 |
167 |

注册

168 |
169 |
170 | 171 | 172 | <%-- 显示提示消息 --%> 173 |
174 |
175 | 176 | 177 | <%-- 显示提示消息 --%> 178 |
179 |
180 | 181 | 182 | <%-- 显示提示消息 --%> 183 |
184 |
185 | 186 | 187 | <%-- 显示提示消息 --%> 188 |
189 | 190 |
191 |

已有帐号?前往登录

192 | <%=msg%> 193 | 194 |
195 |
196 | 197 | 230 | -------------------------------------------------------------------------------- /test.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%> 2 | 3 | 4 | 5 | 文件上传 6 | 7 | 8 |

文件上传

9 |
10 |

名称:

11 |

性别:

12 |

年龄:

13 |

文件1:

14 |

文件2:

15 |

16 |
17 | 18 | -------------------------------------------------------------------------------- /test2.jsp: -------------------------------------------------------------------------------- 1 | <%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%> 2 | <%@page import="java.io.*,java.util.*,org.apache.commons.io.*"%> 3 | <%@page import="org.apache.commons.fileupload.*"%> 4 | <%@page import="org.apache.commons.fileupload.disk.*"%> 5 | <%@page import="org.apache.commons.fileupload.servlet.*"%> 6 | 文件传输例子 7 | <%request.setCharacterEncoding("utf-8");%> 8 | <%boolean isMultipart 9 | = ServletFileUpload.isMultipartContent(request);//是否用multipart提交的? 10 | if(isMultipart) { 11 | FileItemFactory factory = new DiskFileItemFactory(); 12 | //factory.setSizeThreshold(yourMaxMemorySize); //设置使用的内存最大值 13 | //factory.setRepository(yourTempDirectory); //设置文件临时目录 14 | ServletFileUpload upload = new ServletFileUpload(factory); 15 | //upload.setSizeMax(yourMaxRequestSize); //允许的最大文件尺寸 16 | List items = upload.parseRequest(request); 17 | for(int i = 0; i < items.size(); i++) { 18 | FileItem fi = (FileItem) items.get(i); 19 | if(fi.isFormField()) {//如果是表单字段 20 | out.print(fi.getFieldName()+":"+fi.getString("utf-8")); 21 | } 22 | else{//如果是文件 23 | DiskFileItem dfi = (DiskFileItem) fi; 24 | if(!dfi.getName().trim().equals("")) {//getName()返回文件名称或空串 25 | out.print("文件被上传到服务上的实际位置:"); 26 | String fileName=application.getRealPath("/file") 27 | + System.getProperty("file.separator") 28 | + FilenameUtils.getName(dfi.getName()); 29 | out.print(new File(fileName).getAbsolutePath()); 30 | dfi.write(new File(fileName)); 31 | }//if 32 | } //if 33 | } //for 34 | } //if 35 | %> 36 | 37 | -------------------------------------------------------------------------------- /visitData.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%> 2 | <% request.setCharacterEncoding("utf-8"); 3 | String userId = request.getParameter("userId"); 4 | String msg = ""; 5 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 6 | String user="user"; 7 | String pwd="123"; 8 | String avatar_img = ""; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | String visitName = ""; //要访问用户 24 | visitName = request.getParameter("visitName"); 25 | 26 | //显示数据库内容 27 | String name_value = ""; 28 | String sex_value = ""; 29 | String birthday_value = ""; 30 | String phone_value = ""; 31 | String hobby_value = ""; 32 | String hometown_value = ""; 33 | String email_value = ""; 34 | String job_value = ""; 35 | String school_value = ""; 36 | String company_value = ""; 37 | String sign_value = ""; 38 | String resume_value = ""; 39 | 40 | ResultSet rs = stmt.executeQuery("select * from users where name='"+visitName+"'"); 41 | while (rs.next()) { 42 | avatar_img = rs.getString("avatar"); 43 | name_value = rs.getString("name"); 44 | sex_value = rs.getString("sex"); 45 | birthday_value = rs.getString("birthday"); 46 | phone_value = rs.getString("phone"); 47 | hobby_value = rs.getString("hobby"); 48 | hometown_value = rs.getString("hometown"); 49 | email_value = rs.getString("email"); 50 | job_value = rs.getString("job"); 51 | school_value = rs.getString("school"); 52 | company_value = rs.getString("company"); 53 | sign_value = rs.getString("sign"); 54 | resume_value = rs.getString("resume"); 55 | //用户名更改 56 | 57 | } 58 | 59 | rs.close(); stmt.close(); con.close(); 60 | %> 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 70 | 71 | 72 | 73 | 74 | Lifeblog.com 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 |
86 | 88 | 93 |
94 |
95 |
96 | 97 |
98 | 「Lifeblog.com」 99 | 100 |
101 | 102 | 103 |
104 |
105 | 「Lifeblog.com」 106 |
107 |
108 | 109 |
110 |
111 |

<%=sign_value%>

112 |
113 | 116 |
117 | 118 |
119 |
120 | 125 |
126 | 欢迎来访! <%=webUser%> 127 | 128 |
129 |
130 |
131 |
132 | 133 | 134 | 135 | <%=visitName%>的资料 136 | 137 |
138 |
昵称: 139 | <%=name_value%> 140 |
141 |
性别: 142 | <%=sex_value%> 143 |
144 |
生日: 145 | <%=birthday_value%> 146 |
147 |
电话: 148 | <%=phone_value%> 149 |
150 |
兴趣: 151 | <%=hobby_value%> 152 |
153 |
家乡: 154 | <%=hometown_value%> 155 |
156 |
邮箱: 157 | <%=email_value%> 158 |
159 |
职业: 160 | <%=job_value%> 161 |
162 |
学校: 163 | <%=school_value%> 164 |
165 |
公司: 166 | <%=company_value%> 167 |
168 |
个性签名: 169 | <%=sign_value%> 170 |
171 |
个人简介: 172 | <%=resume_value%> 173 |
174 |
175 | 176 |
177 |
178 |
179 | 180 | -------------------------------------------------------------------------------- /visitReply.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | String visitname = ""; //要访问用户 24 | visitname = request.getParameter("visitName"); 25 | 26 | String datePost = request.getParameter("blogDate"); 27 | 28 | String link_value = ""; 29 | int index_link = 0; 30 | ResultSet rss = stmt.executeQuery("select * from blog where date='"+datePost+"'"); 31 | while (rss.next()) { 32 | index_link ++; 33 | } 34 | link_value = Integer.toString(index_link); 35 | rss.close(); 36 | 37 | String blogOwner = visitname; 38 | if (request.getMethod().equalsIgnoreCase("post")) { 39 | java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yy年MM月dd日 HH:mm:ss"); 40 | java.util.Date currentTime = new java.util.Date(); 41 | String replyDate = formatter.format(currentTime); 42 | String date = datePost; 43 | String username = webUser; 44 | String blog = request.getParameter("replyButton"); 45 | String level = "2"; 46 | String link = link_value; 47 | try { 48 | String fmt = "insert into blog(blogOwner, date, username, blog, level, link, replyDate) values('%s', '%s', '%s', '%s', '%s', '%s', '%s')"; 49 | String sql = String.format(fmt, blogOwner, date, username, blog, level, link, replyDate); 50 | int cnt = stmt.executeUpdate(sql); 51 | if (cnt > 0) 52 | { 53 | msg = "保存成功!"; 54 | String temp = "visitHome.jsp?visitName="; 55 | temp += visitname; 56 | //返回访问主页 57 | response.sendRedirect(temp); 58 | } 59 | } 60 | catch (Exception e) { 61 | msg = e.getMessage(); 62 | } 63 | } 64 | stmt.close(); con.close(); 65 | %> 66 | 67 | 68 | 69 | 70 | 71 | test 72 | 73 | 74 | 75 |

<%=msg%>

76 | 77 | -------------------------------------------------------------------------------- /visitReplyLevel3.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | <% request.setCharacterEncoding("utf-8"); 4 | String userId = request.getParameter("userId"); 5 | String msg = ""; 6 | String connectString = "jdbc:mysql://172.18.187.10:3306/blog_15336202" + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; 7 | String user = "user"; 8 | String pwd = "123"; 9 | Class.forName("com.mysql.jdbc.Driver"); 10 | Connection con = DriverManager.getConnection(connectString, user, pwd); 11 | Statement stmt = con.createStatement(); 12 | 13 | String webUser = ""; //登录用户 14 | Cookie cookies[] = request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 15 | if (cookies != null) { 16 | for (int i = 0; i < cookies.length; i ++) { //用一个循环语句遍历刚才建立的Cookie对象数组 17 | if(cookies[i].getName().equals("user")){//如果cookie对象的名称是mrCookie 18 | webUser = cookies[i].getValue(); //获取用户名 19 | } 20 | } 21 | } 22 | 23 | String visitname = ""; //要访问用户 24 | visitname = request.getParameter("visitName"); 25 | String blogOwner = visitname; 26 | String datePost = request.getParameter("blogDateLevel3"); 27 | String link_value = request.getParameter("blogLinkLevel3"); 28 | String toWho_value = request.getParameter("blogToWhoLevel3"); 29 | 30 | if (request.getMethod().equalsIgnoreCase("post")) { 31 | java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yy年MM月dd日 HH:mm:ss"); 32 | java.util.Date currentTime = new java.util.Date(); 33 | String replyDate = formatter.format(currentTime); 34 | String date = datePost; 35 | String username = webUser; 36 | String blog = request.getParameter("replyButtonLevel3"); 37 | String level = "3"; 38 | String link = link_value; 39 | String level3ToWho = toWho_value; 40 | try { 41 | String fmt = "insert into blog(blogOwner, date, username, blog, level, link, replyDate, level3ToWho) values('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')"; 42 | String sql = String.format(fmt, blogOwner, date, username, blog, level, link, replyDate, level3ToWho); 43 | int cnt = stmt.executeUpdate(sql); 44 | if (cnt > 0) 45 | { 46 | msg = "保存成功!"; 47 | String temp = "visitHome.jsp?visitName="; 48 | temp += visitname; 49 | //返回访问主页 50 | response.sendRedirect(temp); 51 | } 52 | } 53 | catch (Exception e) { 54 | msg = e.getMessage(); 55 | } 56 | } 57 | 58 | stmt.close(); con.close(); 59 | %> 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |

<%=msg%>

68 | 69 | --------------------------------------------------------------------------------