├── admin ├── inc │ ├── footer.inc.php │ └── header.inc.php ├── member.php ├── style │ ├── bg.jpg │ ├── bg.png │ ├── btn.png │ ├── hr.png │ ├── small.png │ ├── remind.css │ └── public.css ├── login_out.php ├── manage_delete.php ├── son_module_delete.php ├── overdue.php ├── father_module_delete.php ├── manage.php ├── manage_add.php ├── users_list.php ├── father_module.php ├── father_module_add.php ├── son_module.php ├── login.php ├── father_module_update.php ├── son_module_add.php └── son_module_update.php ├── favicon.ico ├── style ├── bg.png ├── lock.gif ├── new.gif ├── old.gif ├── small.png ├── core_bg.png ├── main_bg.png ├── style_icon.png ├── 2374101_middle.jpg ├── 2374101_small.jpg ├── show_code.php.jpg ├── member.css ├── remind.css ├── register.css ├── publish.css ├── index.css ├── show.css ├── list.css └── public.css ├── readme-img ├── 主页.png ├── 数据库导入.png ├── 文件目录.png ├── 模块列表页.png ├── 管理员页面.png └── 评论页.png ├── font └── ManyGifts.ttf ├── uploads ├── 15726668154400.gif ├── 15726673454387.gif ├── 15726677471271.gif ├── 15726677691223.gif ├── 15726679581608.jpg ├── 15726686569316.jpg ├── 15728268046250.gif ├── 15728298587000.jpg ├── 15728653852470.jpg ├── 15728654053864.jpg ├── 15728654205071.jpeg ├── 15728654379730.gif ├── 15728654525094.jpg ├── 15728654689266.jpg ├── 15728657681124.gif └── 15730255622145.gif ├── login_out.php ├── inc ├── footer.inc.php ├── config.inc.php ├── tool.inc.php ├── vcode.inc.php ├── mysql.inc.php ├── header.inc.php └── page.inc.php ├── test.php ├── content_delete.php ├── README.md ├── index.php ├── reply.php ├── member_photo_update.php ├── login.php ├── content_update.php ├── register.php ├── quote.php ├── publish.php ├── member.php ├── list_father.php ├── show.php ├── list_son.php ├── LICENSE └── js ├── jquery.validate.min.js └── bootstrap.min.js /admin/inc/footer.inc.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /admin/member.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/favicon.ico -------------------------------------------------------------------------------- /style/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/bg.png -------------------------------------------------------------------------------- /style/lock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/lock.gif -------------------------------------------------------------------------------- /style/new.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/new.gif -------------------------------------------------------------------------------- /style/old.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/old.gif -------------------------------------------------------------------------------- /style/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/small.png -------------------------------------------------------------------------------- /readme-img/主页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/readme-img/主页.png -------------------------------------------------------------------------------- /style/core_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/core_bg.png -------------------------------------------------------------------------------- /style/main_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/main_bg.png -------------------------------------------------------------------------------- /admin/style/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/admin/style/bg.jpg -------------------------------------------------------------------------------- /admin/style/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/admin/style/bg.png -------------------------------------------------------------------------------- /admin/style/btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/admin/style/btn.png -------------------------------------------------------------------------------- /admin/style/hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/admin/style/hr.png -------------------------------------------------------------------------------- /font/ManyGifts.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/font/ManyGifts.ttf -------------------------------------------------------------------------------- /readme-img/数据库导入.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/readme-img/数据库导入.png -------------------------------------------------------------------------------- /readme-img/文件目录.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/readme-img/文件目录.png -------------------------------------------------------------------------------- /readme-img/模块列表页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/readme-img/模块列表页.png -------------------------------------------------------------------------------- /readme-img/管理员页面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/readme-img/管理员页面.png -------------------------------------------------------------------------------- /readme-img/评论页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/readme-img/评论页.png -------------------------------------------------------------------------------- /style/style_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/style_icon.png -------------------------------------------------------------------------------- /admin/style/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/admin/style/small.png -------------------------------------------------------------------------------- /style/2374101_middle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/2374101_middle.jpg -------------------------------------------------------------------------------- /style/2374101_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/2374101_small.jpg -------------------------------------------------------------------------------- /style/show_code.php.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/style/show_code.php.jpg -------------------------------------------------------------------------------- /uploads/15726668154400.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15726668154400.gif -------------------------------------------------------------------------------- /uploads/15726673454387.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15726673454387.gif -------------------------------------------------------------------------------- /uploads/15726677471271.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15726677471271.gif -------------------------------------------------------------------------------- /uploads/15726677691223.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15726677691223.gif -------------------------------------------------------------------------------- /uploads/15726679581608.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15726679581608.jpg -------------------------------------------------------------------------------- /uploads/15726686569316.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15726686569316.jpg -------------------------------------------------------------------------------- /uploads/15728268046250.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728268046250.gif -------------------------------------------------------------------------------- /uploads/15728298587000.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728298587000.jpg -------------------------------------------------------------------------------- /uploads/15728653852470.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728653852470.jpg -------------------------------------------------------------------------------- /uploads/15728654053864.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728654053864.jpg -------------------------------------------------------------------------------- /uploads/15728654205071.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728654205071.jpeg -------------------------------------------------------------------------------- /uploads/15728654379730.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728654379730.gif -------------------------------------------------------------------------------- /uploads/15728654525094.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728654525094.jpg -------------------------------------------------------------------------------- /uploads/15728654689266.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728654689266.jpg -------------------------------------------------------------------------------- /uploads/15728657681124.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15728657681124.gif -------------------------------------------------------------------------------- /uploads/15730255622145.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuyishoua/sfkbbs/HEAD/uploads/15730255622145.gif -------------------------------------------------------------------------------- /login_out.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/footer.inc.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /admin/login_out.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/config.inc.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /style/member.css: -------------------------------------------------------------------------------- 1 | #main #right .member_big { 2 | margin:20px auto 0 auto; 3 | width:180px; 4 | } 5 | #main #right .member_big dl dd { 6 | line-height:150%; 7 | } 8 | #main #right .member_big dl dd a { 9 | color:#333; 10 | } 11 | #main #right .member_big dl dd.name { 12 | font-size: 22px; 13 | font-weight: 400; 14 | line-height:140%; 15 | padding:5px 0 10px 0px; 16 | } 17 | -------------------------------------------------------------------------------- /admin/manage_delete.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/son_module_delete.php: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /admin/overdue.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/father_module_delete.php: -------------------------------------------------------------------------------- 1 | 2 | 22 | -------------------------------------------------------------------------------- /content_delete.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /style/remind.css: -------------------------------------------------------------------------------- 1 | /**基本格式开始***************/ 2 | * { 3 | /*word-break: break-all;*/ 4 | } 5 | body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,form,input,textarea,p { 6 | margin:0px; 7 | padding:0px; 8 | font-size:13px; 9 | font-family:Tahoma; 10 | } 11 | ul { 12 | list-style:none; 13 | } 14 | img,a img { 15 | border:none; 16 | } 17 | a { 18 | text-decoration:none; 19 | } 20 | a:hover { 21 | text-decoration:underline; 22 | } 23 | .notice { 24 | background: none repeat scroll 0 0 #fff; 25 | border:1px solid #e4e4e4; 26 | color: #666; 27 | margin:10px 0; 28 | padding:20px; 29 | text-align:center; 30 | } 31 | .notice .pic { 32 | width:16px; 33 | height:16px; 34 | display:inline-block; 35 | vertical-align:middle; 36 | } 37 | .notice .ok { 38 | background:url(small.png) -40px -20px no-repeat; 39 | } 40 | .notice .error { 41 | background:url(small.png) -20px -40px no-repeat; 42 | } 43 | .notice .attention { 44 | background:url(small.png) 0 -60px no-repeat; 45 | } 46 | .notice .ask { 47 | background:url(small.png) -60px 0px no-repeat; 48 | } 49 | -------------------------------------------------------------------------------- /admin/style/remind.css: -------------------------------------------------------------------------------- 1 | /**基本格式开始***************/ 2 | * { 3 | /*word-break: break-all;*/ 4 | } 5 | body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,form,input,textarea,p { 6 | margin:0px; 7 | padding:0px; 8 | font-size:13px; 9 | font-family:Tahoma; 10 | } 11 | ul { 12 | list-style:none; 13 | } 14 | img,a img { 15 | border:none; 16 | } 17 | a { 18 | text-decoration:none; 19 | } 20 | a:hover { 21 | text-decoration:underline; 22 | } 23 | .notice { 24 | background: none repeat scroll 0 0 #fff; 25 | border:1px solid #e4e4e4; 26 | color: #666; 27 | margin:10px 0; 28 | padding:20px; 29 | text-align:center; 30 | } 31 | .notice .pic { 32 | width:16px; 33 | height:16px; 34 | display:inline-block; 35 | vertical-align:middle; 36 | } 37 | .notice .ok { 38 | background:url(small.png) -40px -20px no-repeat; 39 | } 40 | .notice .error { 41 | background:url(small.png) -20px -40px no-repeat; 42 | } 43 | .notice .attention { 44 | background:url(small.png) 0 -60px no-repeat; 45 | } 46 | .notice .ask { 47 | background:url(small.png) -60px 0px no-repeat; 48 | } 49 | -------------------------------------------------------------------------------- /admin/manage.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |
13 |
管理员列表
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 34 | 35 | 36 | 37 | 38 | 39 | A; 40 | echo $html; 41 | } 42 | ?> 43 |
名称等级创建日期操作
{$data['name']} [id:{$data['id']}]{$data['level']}{$data['create_time']}[删除]
44 |
45 | -------------------------------------------------------------------------------- /inc/tool.inc.php: -------------------------------------------------------------------------------- 1 | 40 | -------------------------------------------------------------------------------- /inc/vcode.inc.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sfkbbs 2 | PHP论坛交流系统 3 | 4 | 为了熟练掌握php,根据哔哩哔哩 https://www.bilibili.com/video/av37494327?from=search&seid=10468071280016755672 课程,边学边开发 5 | 6 | 终于完成该php论坛项目。本项目使用原生php,并未使用php框架。由于php是针对于web开发的服务端语言 7 | 8 | 其语法简单,数据交互轻松,适用于中小项目的开发。有兴趣的朋友可以进一步学习thinkPhp框架。 9 | 10 | # 配置环境 11 | php+mysql,使用wamp集成开发环境进行开发 12 | 13 | # 使用方式 14 | 1、使用git命令将代码复制到本地 15 | 16 | 2、将根目录的文件db.sql导入mysql数据库中,如下图 17 | 18 | 3、安装wamp集成开发包,将项目文件放置www文件夹目录下,如下图所示 19 | 20 | 4、使用phpstorm编辑器打开www文件夹,在编辑器内配置php引擎,就不需要再次配置apache服务器 21 | 22 | 5、开启wamp服务,浏览器访问localhost,显示出主页,成功!!! 23 | 24 | 导入mysql数据库使用命令: 25 | 图片加载失败时,显示这段字 26 | 27 | www文件夹目录下 28 | 图片加载失败时,显示这段字 29 | 30 | # 项目展示 31 | 32 | 33 | 主页 34 | 图片加载失败时,显示这段字 35 | 36 | 37 | 38 | 39 | 模块列表页 40 | 图片加载失败时,显示这段字 41 | 42 | 43 | 44 | 45 | 46 | 评论页 47 | 图片加载失败时,显示这段字 48 | 49 | 50 | 51 | 52 | 53 | 管理员页面 54 | 图片加载失败时,显示这段字 55 | 56 | 57 | -------------------------------------------------------------------------------- /style/register.css: -------------------------------------------------------------------------------- 1 | #register { 2 | background:#fff; 3 | } 4 | #register h2 { 5 | border-bottom: 1px solid #ededed; 6 | color: #666; 7 | font-size: 16px; 8 | font-weight: 700; 9 | padding: 10px 15px; 10 | } 11 | #register form { 12 | color:#333; 13 | } 14 | #register form label { 15 | display:block; 16 | font-size: 14px; 17 | line-height: 25px; 18 | float:right; 19 | margin:40px 300px 0 0; 20 | } 21 | #register form label input { 22 | width:230px; 23 | height:18px; 24 | background-color: #fff; 25 | border: 1px solid #ccc; 26 | box-shadow:2px 2px 2px #f0f0f0 inset; 27 | color: #333; 28 | font-family: inherit; 29 | font-size: 100%; 30 | line-height: 18px; 31 | margin: 0; 32 | padding: 4px; 33 | vertical-align: middle; 34 | } 35 | 36 | #register form span { 37 | width:300px; 38 | display:inline-block; 39 | color:#999; 40 | font-size:12px; 41 | margin:0 0 0 5px; 42 | } 43 | .btn { 44 | border-radius: 2px; 45 | font-size: 14px; 46 | line-height: normal; 47 | padding: 6px 18px; 48 | background:url(core_bg.png) 0 0 #f3f3f3; 49 | border: 1px solid #b1aeae; 50 | border-radius: 2px; 51 | color: #333; 52 | cursor: pointer; 53 | display: inline-block; 54 | font-family: inherit; 55 | font-size: 100%; 56 | line-height: normal; 57 | margin: 0; 58 | overflow: visible; 59 | padding: 4px 10px; 60 | text-align: center; 61 | text-decoration: none; 62 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); 63 | vertical-align: middle; 64 | white-space: nowrap; 65 | } 66 | #register .btn { 67 | margin:20px 0 60px 115px; 68 | } 69 | #register img.vcode{ 70 | display: block; 71 | float: left; 72 | margin: 20px 0 0 114px; 73 | } 74 | -------------------------------------------------------------------------------- /admin/manage_add.php: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 |
添加管理员
23 |
24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 38 | 39 | 40 | 41 | 47 | 50 | 51 |
管理员名称 29 | 名称不得为空,不得超过32个字符 30 |
密码 36 | 不能少于6位 37 |
等级 42 | 46 | 48 | 默认为普通管理员(不具备,后台管理员管理权限) 49 |
52 | 53 |
54 |

61 |
62 | -------------------------------------------------------------------------------- /style/publish.css: -------------------------------------------------------------------------------- 1 | #publish { 2 | -moz-border-bottom-colors: none; 3 | -moz-border-left-colors: none; 4 | -moz-border-right-colors: none; 5 | -moz-border-top-colors: none; 6 | background: none repeat scroll 0 0 #fff; 7 | border-color: #fff #efefef #d3d3d3; 8 | border-image: none; 9 | border-radius: 3px; 10 | border-style: solid; 11 | border-width: 1px; 12 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02); 13 | margin-bottom: 15px; 14 | padding:10px 15px 40px 15px; 15 | margin:10px auto; 16 | width:930px; 17 | } 18 | #publish input.title { 19 | width:350px; 20 | height:26px; 21 | display:block; 22 | border:1px solid #ccc; 23 | color:#333; 24 | font-family:Tahoma; 25 | } 26 | #publish textarea.content { 27 | width:100%; 28 | height:200px; 29 | border:1px solid #ccc; 30 | margin-top:10px; 31 | font-size:14px; 32 | font-family:Tahoma; 33 | } 34 | input.publish { 35 | float: left; 36 | background:url(bg.png) 0 -0px; 37 | display: block; 38 | height:30px; 39 | text-decoration:none; 40 | text-indent:-2000px; 41 | width:70px; 42 | margin:10px 0 0 0; 43 | border:0px; 44 | cursor:pointer; 45 | } 46 | input.reply { 47 | float: left; 48 | background:url(bg.png) 0 -90px; 49 | display: block; 50 | height:30px; 51 | text-decoration:none; 52 | text-indent:-2000px; 53 | width:70px; 54 | margin:10px 0 0 0; 55 | border:0px; 56 | cursor:pointer; 57 | } 58 | #publish select { 59 | padding:0 20px 0 0; 60 | border:1px solid #ccc; 61 | margin:10px 0; 62 | } 63 | #publish optgroup { 64 | font-style:normal; 65 | } 66 | .quote { 67 | background:#dedede; 68 | padding:10px; 69 | border:1px solid #bbb; 70 | color:#121212; 71 | margin:10px 0 0 0; 72 | } 73 | .quote .title { 74 | font-weight:bold; 75 | } -------------------------------------------------------------------------------- /admin/users_list.php: -------------------------------------------------------------------------------- 1 | 7 | 21 | 22 | 23 |
24 |
子版块列表
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
用户名md5密码注册时间头像操作
">  [删除]
48 |

58 |
59 | 60 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 |
热门动态
15 | 20 |
21 |
22 | 23 | 28 |
29 |
30 | 31 |
32 |
33 | CURDATE()"; 39 | // 在mysql中时间可以进行比较 40 | $count_today=num($link,$query); 41 | $query="select count(*) from sfk_content where module_id={$data_son['id']}"; 42 | $count_all=num($link,$query); 43 | $html=<< 45 |

{$data_son['module_name']} (今日帖{$count_today})

46 | 帖子总数:{$count_all}
47 |
48 | A; 49 | echo $html; 50 | } 51 | }else{ 52 | echo '
暂无子版块...
'; 53 | } 54 | ?> 55 |
56 |
57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /style/index.css: -------------------------------------------------------------------------------- 1 | #bbs_info_box { 2 | color: rgba(0, 0, 0, 0.6); 3 | } 4 | #bbs_info_box span.line { 5 | background: none repeat scroll 0 0 #ccc; 6 | display: inline-block; 7 | height: 12px; 8 | margin: 3px 10px 0; 9 | overflow: hidden; 10 | padding: 0; 11 | vertical-align: top; 12 | width: 1px; 13 | } 14 | #bbs_info_box span a { 15 | color:#105cb6; 16 | } 17 | #hot { 18 | margin-top:10px; 19 | background:#fff; 20 | padding:0 0 10px 0; 21 | } 22 | #hot .title { 23 | height:34px; 24 | color:#ff0000; 25 | font-weight:bold; 26 | border-bottom:1px solid #e4e4e4; 27 | line-height:40px; 28 | text-indent:10px; 29 | margin:0 0 10px 0; 30 | } 31 | #hot .newlist li { 32 | width:480px; 33 | float:left; 34 | text-indent:15px; 35 | line-height:23px; 36 | } 37 | #hot .newlist li a { 38 | color:#333; 39 | } 40 | .box { 41 | border-left:1px solid #f1f1f1; 42 | border-right:1px solid #f1f1f1; 43 | margin-top:-1px; 44 | } 45 | .box .title { 46 | background:#f7f7f7; 47 | border-top:1px solid #e5e5e5; 48 | border-bottom:1px solid #e5e5e5; 49 | padding:7px 10px; 50 | color:#105cb6; 51 | font-weight:bold; 52 | } 53 | 54 | .box .classList { 55 | background:#ffffff; 56 | padding:0 15px; 57 | } 58 | .box .classList .childBox { 59 | width:264px; 60 | height:51px; 61 | padding:10px 0 10px 46px; 62 | border-bottom:1px dashed #e4e4e4; 63 | float:left; 64 | background:pink; 65 | color:#444444; 66 | } 67 | .box .classList .childBox a span { 68 | color:#333; 69 | } 70 | .box .classList .childBox h2 { 71 | padding-bottom:3px; 72 | } 73 | .box .classList .childBox h2 a { 74 | color:#333; 75 | font-weight:bold; 76 | } 77 | .box .classList .childBox h2 span { 78 | color:#ff5500; 79 | font-weight:normal; 80 | } 81 | .box .classList .new { 82 | background:url(new.gif) 0px center no-repeat; 83 | } 84 | .box .classList .old { 85 | background:url(old.gif) 0px center no-repeat; 86 | } 87 | .box .classList .lock { 88 | background:url(lock.gif) 0px center no-repeat; 89 | } 90 | #flink { 91 | margin-top:15px; 92 | background:#fff; 93 | border-bottom:1px solid #d3d3d3; 94 | } 95 | #flink h2 { 96 | padding:10px 0; 97 | font-weight:bold; 98 | color:#333; 99 | border-bottom:1px solid #d3d3d3; 100 | text-indent:10px; 101 | } 102 | #flink .flinkList { 103 | width:940px; 104 | padding:10px; 105 | } 106 | #flink .flinkList a { 107 | color:#333333; 108 | } 109 | -------------------------------------------------------------------------------- /admin/father_module.php: -------------------------------------------------------------------------------- 1 | 8 | $val){ 16 | if (!is_numeric($val)){ 17 | $sort['error'] = "yes"; 18 | } 19 | $query[] = "update sfk_father_module set sort={$val} where id='{$key}'"; 20 | // 加不加单引号都行 21 | } 22 | if ($sort['error']==null){ 23 | execute_multi($link,$query,$error); 24 | $sort['error'] = 'no'; 25 | } 26 | } 27 | 28 | ?> 29 | 30 |
31 |
父版块列表
32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 49 | 50 | 51 | 52 | 53 | A; 54 | // var_dump($data); 55 | echo $html; 56 | // 防止直接赋值被转义,使用变量添加{} 57 | } 58 | ?> 59 | 60 |
排序版块名称操作
{$data['module_name']}[id:{$data['id']}][访问]  [编辑]  [删除]
61 | 62 |
63 | 73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /inc/mysql.inc.php: -------------------------------------------------------------------------------- 1 |  数组下标为{$i}的语句:{$arr_sqls[$i]}执行错误
 错误原因:".mysqli_error($link); 63 | return false; 64 | } 65 | }else{ 66 | $error='执行失败!请检查首条语句是否正确!
可能的错误原因:'.mysqli_error($link); 67 | return false; 68 | } 69 | } 70 | //获取记录数 71 | function num($link,$sql_count){ 72 | $result=execute($link,$sql_count); 73 | $count=mysqli_fetch_row($result); 74 | return $count[0]; 75 | } 76 | //数据入库之前进行转义,确保,数据能够顺利的入库 77 | function escape($link,$data){ 78 | if(is_string($data)){ 79 | return mysqli_real_escape_string($link,$data); 80 | } 81 | if(is_array($data)){ 82 | foreach ($data as $key=>$val){ 83 | $data[$key]=escape($link,$val); 84 | } 85 | } 86 | return $data; 87 | //mysqli_real_escape_string($link,$data); 88 | } 89 | 90 | 91 | //关闭与数据库的连接 92 | function close($link){ 93 | mysqli_close($link); 94 | } 95 | ?> -------------------------------------------------------------------------------- /inc/header.inc.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | <?php echo $template['title']; ?> 11 | 12 | 13 | 14 | 15 | "; 18 | } 19 | ?> 20 | 21 | 25 | $(function () { 26 | $("img").click(function () { 27 | $(this).attr("src","inc/vcode.inc.php"); 28 | // 点击更新验证码操作!!! 29 | }) 30 | }) 31 | 32 | A; 33 | echo $html; 34 | // $_SERVER['SCRIPT_NAME']返回的是当前目录文件路径 35 | } 36 | ?> 37 | 38 | 39 | 40 |
41 | 68 |
69 |
70 | -------------------------------------------------------------------------------- /admin/father_module_add.php: -------------------------------------------------------------------------------- 1 | =1){ 9 | return true; 10 | } 11 | else{ 12 | return false; 13 | } 14 | } 15 | if (isset($_POST['submit'])) 16 | { 17 | // var_dump($_POST['module_name']); 18 | // var_dump($_POST['sort']); 19 | 20 | if (empty($_POST['module_name'])){ 21 | $modulename['null']='yes'; 22 | }elseif (!is_numeric($_POST['sort'])){ 23 | $sort['num']='not'; 24 | }elseif (isSame()){ 25 | $isSame["module_name"]='equal'; 26 | } 27 | else{ 28 | $query = "insert into sfk_father_module(module_name,sort) values ('{$_POST['module_name']}','{$_POST['sort']}')"; 29 | $link = connect(); 30 | execute($link,$query); 31 | $add_module['success']='yes'; 32 | } 33 | // exit(); 34 | } 35 | 36 | $template['title']="添加父板块"; 37 | ?> 38 | 39 |
40 |
添加父版块
41 | 42 | 43 | 44 |
45 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 59 | 60 |
版块名称 50 | 版块名称不得为空,最大不得超过66个字符 51 |
排序 57 | 填写一个数字即可 58 |
61 | 62 |

75 | 76 | 77 |
78 | 79 | -------------------------------------------------------------------------------- /admin/son_module.php: -------------------------------------------------------------------------------- 1 | 7 | $val){ 11 | if (!is_numeric($val)){ 12 | $sort['error'] = "yes"; 13 | } 14 | $query[] = "update sfk_son_module set sort={$val} where id='{$key}'"; 15 | } 16 | if ($sort['error']==null){ 17 | execute_multi($link,$query,$error); 18 | $sort['error'] = "no"; 19 | } 20 | } 21 | ?> 22 | 23 | 24 |
25 |
子版块列表
26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | A; 54 | echo $html; 55 | 56 | } 57 | ?> 58 |
排序版块名称所属父板块版主操作
{$son_data_result['module_name']}[id:{$son_data_result['id']}]{$father_module_name}{$son_data_result['member_id']}[访问]  [编辑]  [删除]
59 | 60 |
61 | 71 | -------------------------------------------------------------------------------- /reply.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 50 | 51 | 52 |
53 | 首页 > 54 | > 55 | 56 | > 57 |
58 |
59 |
回复:由 发布的
60 |
61 | 62 | 63 |
64 |

66 |
67 |
68 | 69 | -------------------------------------------------------------------------------- /member_photo_update.php: -------------------------------------------------------------------------------- 1 | 7 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 61 | 62 | 73 | 74 | 75 | 76 |
77 |

更改头像

78 |
79 |

原头像:

80 | 81 |
82 |
83 |
84 | 85 |

86 | 87 |
88 |

98 |
99 |
100 | 101 | -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 41 | 42 | 43 | 44 |
45 |

欢迎会员登录  

48 | 49 |
50 | 51 | 52 | 53 | 54 |
55 | 73 | 74 | 76 |
77 |
78 | -------------------------------------------------------------------------------- /style/show.css: -------------------------------------------------------------------------------- 1 | #main .wrap1 { 2 | margin:12px 0 10px 0; 3 | } 4 | #main div.wrapContent { 5 | border-bottom:1px solid #ccc; 6 | background:#fbfbfb; 7 | margin-bottom:10px; 8 | padding-bottom: 20px; 9 | } 10 | #main div.wrapContent div.left { 11 | border-right:1px solid #e9e9e9; 12 | width:160px; 13 | float:left; 14 | } 15 | #main div.wrapContent div.left div.face { 16 | text-align:center; 17 | } 18 | #main div.wrapContent div.left div.face img { 19 | margin:20px 0 0 0; 20 | } 21 | #main div.wrapContent div.left div.name { 22 | text-align:center; 23 | margin:5px 0; 24 | } 25 | #main div.wrapContent div.left div.name a { 26 | color:#333; 27 | font-weight:bold; 28 | } 29 | #main div.wrapContent div.left div.level { 30 | text-align:center; 31 | } 32 | #main div.wrapContent div.left div.operate { 33 | width:120px; 34 | margin:3px auto 0 auto; 35 | padding:0 0 10px 0; 36 | } 37 | #main div.wrapContent div.left div.operate a { 38 | color: #999; 39 | display: inline-block; 40 | height:20px; 41 | line-height:20px; 42 | text-indent:10px; 43 | } 44 | .quote { 45 | background:#dedede; 46 | padding:10px; 47 | border:1px solid #bbb; 48 | color:#121212; 49 | margin:10px 0 0 0; 50 | } 51 | .quote .title { 52 | font-weight:bold; 53 | } 54 | #main div.wrapContent div.left div.operate a.left { 55 | float:left; 56 | background:url(bg.png) -150px 6px no-repeat; 57 | } 58 | #main div.wrapContent div.left div.operate a.right { 59 | float:right; 60 | background:url(bg.png) -150px -25px no-repeat; 61 | padding-left:5px; 62 | } 63 | #main div.wrapContent div.right { 64 | background:#fff; 65 | float:right; 66 | width:759px; 67 | padding:5px 20px 20px 20px; 68 | border-left:1px solid #e9e9e9; 69 | margin-left:-1px; 70 | } 71 | #main div.wrapContent div.right div.title { 72 | border-bottom:1px dashed #dddddd; 73 | padding:10px 0px 12px 0; 74 | } 75 | #main div.wrapContent div.right div.title h2 { 76 | display:inline-block; 77 | float:left; 78 | font-size:16px; 79 | } 80 | #main div.wrapContent div.right div.title span { 81 | display:inline-block; 82 | float:right; 83 | color:#999; 84 | } 85 | #main div.wrapContent div.right div.pubdate { 86 | margin:10px 0 30px 0; 87 | } 88 | #main div.wrapContent div.right div.pubdate .date { 89 | color:#666; 90 | } 91 | #main div.wrapContent div.right div.pubdate .floor { 92 | color:#999; 93 | float:right; 94 | } 95 | #main div.wrapContent div.right div.pubdate .floor a { 96 | color:#666; 97 | font-size:13px; 98 | } 99 | div.content { 100 | line-height:180%; 101 | } 102 | div.content,div.content div,div.content ul,div.content ol,div.content li,div.content dl,div.content dt,div.content dd,div.content h1,div.content h2,div.content h3,div.content h4,div.content h5,div.content h6,div.content form,div.content input,div.content textarea,div.content p { 103 | font-size:14px; 104 | color:#333; 105 | } 106 | .wrap1 .pages { 107 | float:left; 108 | } 109 | .wrap1 .btn { 110 | float:right; 111 | } 112 | 113 | 114 | -------------------------------------------------------------------------------- /admin/login.php: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | 32 | 后台登录 33 | 34 | 35 | 84 | 85 | 86 |
87 |
管理登录
88 |
89 | 90 | 91 | 92 | 93 | 94 |
95 |

96 | 106 |

107 |
108 | 109 | -------------------------------------------------------------------------------- /style/list.css: -------------------------------------------------------------------------------- 1 | #main { 2 | background:url(main_bg.png) repeat-y; 3 | margin-top:10px; 4 | } 5 | #main #left { 6 | width:638px; 7 | padding:7px 20px; 8 | float:left; 9 | } 10 | #main #right { 11 | width:282px; 12 | float:right; 13 | } 14 | #main #left .box_wrap { 15 | color:#666; 16 | line-height:22px; 17 | } 18 | #main #left div.box_wrap h3 { 19 | margin:14px 0 0 0; 20 | font-size:14px; 21 | color:red; 22 | } 23 | #main #left div.num span { 24 | color:#000; 25 | font-weight:bold; 26 | } 27 | #main #left div.moderator span { 28 | color:#333; 29 | } 30 | #main #left div.pages_wrap { 31 | margin:12px 0 0 0; 32 | } 33 | #main ul.postsList { 34 | margin:10px 0 0 0; 35 | border-top:1px dashed #ddd; 36 | } 37 | #main ul.postsList li { 38 | border-bottom:1px dashed #ddd; 39 | padding:15px 0; 40 | } 41 | #main ul.postsList li div.smallPic { 42 | width:55px; 43 | float:left; 44 | } 45 | #main ul.postsList li div.subject { 46 | width:450px; 47 | float:left; 48 | } 49 | #main ul.postsList li div.count { 50 | color: #999; 51 | line-height: 18px; 52 | text-align: center; 53 | } 54 | #main ul.postsList li div.count p { 55 | background: none repeat scroll 0 0 #f4f4f4; 56 | border-radius: 3px; 57 | display: block; 58 | float: right; 59 | height: 36px; 60 | margin: 0 0 0 10px; 61 | overflow: hidden; 62 | padding: 4px 0; 63 | width: 54px; 64 | } 65 | #main ul.postsList li div.count p span { 66 | font-weight:bold; 67 | } 68 | #main ul.postsList li div.subject .titleWrap a,#main ul.postsList li div.subject .titleWrap h2 { 69 | font-size:14px; 70 | color:#105cb6; 71 | } 72 | #main ul.postsList li div.subject .titleWrap h2 { 73 | display:inline; 74 | } 75 | #main ul.postsList li div.subject p { 76 | color:#999; 77 | padding:10px 0 0 0; 78 | } 79 | 80 | #main #right .classList .title { 81 | width:260px; 82 | margin:0 auto; 83 | padding:7px 0; 84 | font-weight:bold; 85 | color:#666; 86 | text-indent:10px; 87 | border-bottom:1px solid #e8e8e8; 88 | } 89 | #main #right .classList ul.listWrap { 90 | width:220px; 91 | margin:15px auto 0 auto; 92 | } 93 | #main #right .classList ul.listWrap li h2 a { 94 | color:#333; 95 | font-weight:normal; 96 | } 97 | #main #right .classList ul.listWrap li ul { 98 | margin:5px 0 10px 0px; 99 | } 100 | #main #right .classList ul.listWrap li ul li { 101 | background:url(style_icon.png) 0px -389px no-repeat; 102 | line-height:180%; 103 | border-radius:3px; 104 | color: #666; 105 | padding-left:10px; 106 | } 107 | #main #right .classList ul.listWrap li ul li h3 a { 108 | font-weight:normal; 109 | color:#666; 110 | } 111 | #main #right .classList ul.tagList { 112 | width:240px; 113 | margin:0 auto; 114 | } 115 | #main #right .classList ul.tagList li { 116 | display:inline-block; 117 | margin:10px 5px 5px 0; 118 | } 119 | #main #right .classList ul.tagList li a { 120 | background:none repeat scroll 0 0 #f6f6f6; 121 | border-radius:3px; 122 | color:#333333; 123 | display:block; 124 | float:left; 125 | height:24px; 126 | line-height:24px; 127 | padding:0 8px; 128 | text-decoration:none; 129 | } 130 | #main #right .classList ul.tagList li a:hover { 131 | background:#999; 132 | color:#fff; 133 | } -------------------------------------------------------------------------------- /content_update.php: -------------------------------------------------------------------------------- 1 | 39 | 40 |
41 | 首页 > 发布帖子 42 |
43 |
44 |
45 | 65 | 66 | 67 | 68 |
69 |
70 |

71 |
72 | -------------------------------------------------------------------------------- /admin/father_module_update.php: -------------------------------------------------------------------------------- 1 | 6 | =1){ 12 | return true; 13 | } 14 | else{ 15 | return false; 16 | } 17 | } 18 | ?> 19 | ?> 20 | =1){ 29 | $data = mysqli_fetch_assoc($result); 30 | // 一行一行从result中获取,可以使用循环,mysql_fetch_row和这个作用一样,但是通过下标数字获取值 31 | // var_dump($data); 32 | $module_change = $data['module_name']; 33 | $sort_change = $data['sort']; 34 | } 35 | } 36 | 37 | if (empty($_POST['module_name'])){ 38 | $modulename['null']='yes'; 39 | }elseif (!is_numeric($_POST['sort'])){ 40 | $sort['num']='not'; 41 | } 42 | elseif(isset($_POST['module_name'])){ 43 | $link = connect(); 44 | $query = "update sfk_father_module set module_name='{$_POST['module_name']}' , sort='{$_POST['sort']}' where id='{$_GET['id']}';"; 45 | $module_change = $_POST['module_name']; 46 | $sort_change = $_POST['sort']; 47 | execute($link,$query); 48 | if (mysqli_affected_rows($link)>=1){ 49 | $change['success']='yes'; 50 | 51 | } 52 | } 53 | ?> 54 | 55 | 56 | 57 |
58 |
修改父版块
59 | 60 | 61 | 62 |
63 | 64 | 65 | 66 | 69 | 70 | 71 | 72 | 73 | 76 | 77 |
版块名称 67 | 版块名称不得为空,最大不得超过66个字符 68 |
排序 74 | 填写一个数字即可 75 |
78 | 79 |

89 | 90 | 91 |
92 | 93 | -------------------------------------------------------------------------------- /admin/style/public.css: -------------------------------------------------------------------------------- 1 | /**基本格式开始***************/ 2 | * { 3 | /*word-break: break-all;*/ 4 | } 5 | body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,form,input,textarea,p { 6 | margin:0px; 7 | padding:0px; 8 | font-size:13px; 9 | font-family:Tahoma; 10 | } 11 | ul { 12 | list-style:none; 13 | } 14 | img,a img { 15 | border:none; 16 | } 17 | a { 18 | text-decoration:none; 19 | } 20 | a:hover { 21 | text-decoration:underline; 22 | } 23 | body { 24 | background:#f4f4f4; 25 | color:#333; 26 | } 27 | #top { 28 | width:100%; 29 | background:url(bg.jpg); 30 | height:46px; 31 | line-height:46px; 32 | position:fixed; 33 | top:0px; 34 | left:0px; 35 | } 36 | #top .logo { 37 | width:140px; 38 | color:#fff; 39 | font-size:20px; 40 | font-weight:bold; 41 | text-indent:10px; 42 | float:left; 43 | } 44 | #top ul.nav { 45 | float:left; 46 | } 47 | #top ul.nav li { 48 | float:left; 49 | } 50 | #top ul.nav li a { 51 | color:#b5d4ea; 52 | padding:10px; 53 | } 54 | #top ul.nav li a:hover { 55 | color:#fff; 56 | text-decoration:none; 57 | } 58 | #top ul.nav li a.current { 59 | font-weight:bold; 60 | } 61 | #top .login_info { 62 | float:right; 63 | color:#b5d4ea; 64 | margin:0 30px 0 0; 65 | } 66 | #top .login_info a { 67 | color:#b5d4ea; 68 | } 69 | #sidebar { 70 | width:140px; 71 | position:fixed; 72 | top:46px; 73 | left:0px; 74 | } 75 | #sidebar ul { 76 | margin:10px 0 0 0; 77 | } 78 | #sidebar ul li div.small_title { 79 | color:#333; 80 | padding:4px 0 4px 15px; 81 | background:#ddd; 82 | } 83 | #sidebar ul.child { 84 | margin:3px 0 3px 0; 85 | } 86 | #sidebar ul li a { 87 | color:#333; 88 | display:block; 89 | padding:4px 0 4px 28px; 90 | background:url(bg.png) -265px 9px no-repeat; 91 | } 92 | #sidebar ul li a:hover { 93 | text-decoration:none; 94 | background:url(bg.png) -265px 9px no-repeat #e9e9e9; 95 | } 96 | #sidebar ul li a.current { 97 | background:url(bg.png) -265px -11px no-repeat; 98 | } 99 | #main { 100 | width:90%; 101 | margin:57px 0 0 160px; 102 | } 103 | #main .title { 104 | width:100%; 105 | height:30px; 106 | line-height:30px; 107 | text-indent:10px; 108 | background:#e6e6e6; 109 | color:#666; 110 | font-weight:bold; 111 | } 112 | #main .explain { 113 | color:#000; 114 | padding:14px 0; 115 | background:url(hr.png) 0px bottom repeat-x; 116 | } 117 | #main .explain ul { 118 | margin:0 0 0 20px; 119 | line-height:160%; 120 | } 121 | #main .explain a { 122 | color:#266aae; 123 | } 124 | #main .explain ul li { 125 | color:#000; 126 | } 127 | #main a { 128 | color:#266aae; 129 | } 130 | input { 131 | border:1px solid #ccc; 132 | } 133 | input.sort { 134 | width:50px; 135 | height:20px; 136 | } 137 | input.btn { 138 | border-radius:2px; 139 | color: #fff; 140 | font-family: inherit; 141 | padding:4px 15px; 142 | text-align: center; 143 | background:url(btn.png) 0 -120px #1b75b6; 144 | border:0px; 145 | } 146 | table.list tr { 147 | height:50px; 148 | background:url(hr.png) 0px bottom repeat-x; 149 | } 150 | table.list tr th { 151 | padding-right:40px; 152 | text-align:left; 153 | } 154 | table.list tr td { 155 | padding-right:40px; 156 | text-align:left; 157 | } 158 | table.au input { 159 | width:300px; 160 | height:25px; 161 | } 162 | table.au textarea { 163 | width:300px; 164 | height:100px; 165 | } 166 | table.au tr { 167 | background:url(hr.png) 0px bottom repeat-x; 168 | } 169 | table.au tr td { 170 | text-align:left; 171 | padding:10px 40px 20px 0; 172 | } 173 | table.au tr td.condition { 174 | color:#999; 175 | } 176 | 177 | -------------------------------------------------------------------------------- /register.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 32||empty($_POST['name'])){ 29 | $isok = false; 30 | $name['user'] = false; 31 | } 32 | if(mb_strlen($_POST['pw'])<6||empty($_POST['pw'])){ 33 | $isok = false; 34 | $pw['user'] = false; 35 | } 36 | if(mb_strlen($_POST['confirm_pw'])<6||empty($_POST['confirm_pw'])||$_POST['pw']!=$_POST['confirm_pw']){ 37 | $isok = false; 38 | $confirm_pw['user'] = false; 39 | } 40 | if (strtolower($_POST['vcode'])!=strtolower($_SESSION['vcode'])){ 41 | $isok = false; 42 | $vcode['user'] = false; 43 | } 44 | if ($isok){ 45 | $_POST = escape($link,$_POST); 46 | // 本质数组,将数组值进行转义 47 | $link=connect(); 48 | $query="insert into sfk_member(name,pw,register_time) values('{$_POST['name']}',md5('{$_POST['pw']}'),now())"; 49 | execute($link,$query); 50 | if(mysqli_affected_rows($link)==1){ 51 | 52 | // 传入cokkie内的密码使用md5方式进行编码!!! 53 | } 54 | } 55 | } 56 | ?> 57 | 58 | 59 |
60 |

欢迎注册成为 私房库会员

61 |
62 | 63 | 64 | 65 | 66 | 67 | 84 |
85 | 86 | 97 |
98 |
99 | 100 | -------------------------------------------------------------------------------- /quote.php: -------------------------------------------------------------------------------- 1 | 15 | 16 | 39 | 40 | 59 | 60 | ; 61 | 62 |
63 | 首页 > > 64 | > 65 | 66 |
67 |
68 |
:
69 | 70 |
71 |

引用1楼 发表的:

72 | 73 | 内容 74 |
75 |
76 | 77 | 78 |
79 |
80 |

90 |
91 | 92 | -------------------------------------------------------------------------------- /publish.php: -------------------------------------------------------------------------------- 1 | =64){ 18 | $title_len['error'] = "yes"; 19 | } 20 | else if ($_POST['title']==''){ 21 | $title_null['null'] = 'yes'; 22 | } 23 | else{ 24 | $query = "insert into sfk_content(module_id, title, content, time, member_id) values ( 25 | '{$_POST['module_id']}','{$_POST['title']}','{$_POST['content']}',now(),'{$member_id}')"; 26 | execute($link,$query); 27 | if (mysqli_affected_rows($link)==1){ 28 | $insert['success'] = 'yes'; 29 | } 30 | else{ 31 | $insert['success'] = 'no'; 32 | } 33 | } 34 | } 35 | 36 | ?> 37 | 38 | 39 |
40 | 首页 > 发布帖子 41 |
42 |
43 |
44 | 45 | 70 | 71 | 79 | 80 | 81 |
82 |

83 | 93 |

94 |
95 |
96 | -------------------------------------------------------------------------------- /admin/inc/header.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <?php 6 | echo $template['title']; 7 | // 有时候识别不了 8 | ?> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 |
25 | 28 | 31 | 37 |
38 | -------------------------------------------------------------------------------- /inc/page.inc.php: -------------------------------------------------------------------------------- 1 | '', 10 | 'html'=>'' 11 | ); 12 | return $data; 13 | } 14 | $page_all = ceil($count/$page_size); 15 | if ($_GET[$page]>$page_all){ 16 | $_GET[$page] = $page_all; 17 | //当前页数超过总页数,将当前页数设置为总页数 18 | } 19 | 20 | 21 | // 构造url 22 | /* var_dump($_SERVER['SCRIPT_NAME']); 23 | 输出'/test.php' 24 | */ 25 | $current_url = $_SERVER['REQUEST_URI']; 26 | $arr_current = parse_url($current_url); 27 | /*var_dump($arr_current); 28 | 'path' => string '/test.php' (length=9) 29 | 'query' => string 'page=8' (length=6) 30 | */ 31 | $current_path = $arr_current['path']; 32 | $url = null; 33 | /* var_dump($current_url); 34 | 输出'/test.php?page=8' 35 | */ 36 | if (isset($arr_current['query'])){ 37 | parse_str($arr_current['query'],$arr_query); 38 | /* http://localhost/test.php?page=8&id=2 39 | var_dump($arr_query); 40 | 'page' => string '8' (length=1) 41 | 'id' => string '2' (length=1)*/ 42 | unset($arr_query[$page]); 43 | if (empty($arr_query)){ 44 | $url = "{$current_path}?{$page}="; 45 | } 46 | else{ 47 | $other = (http_build_query($arr_query)); 48 | // 改函数用于将字符转化为字符串 49 | $url = "{$current_path}?{$other}&{$page}="; 50 | } 51 | } 52 | else{ 53 | $url = "{$current_path}?{$page}="; 54 | } 55 | 56 | 57 | $start = ($_GET[$page]-1)*$page_size; 58 | $limit = "limit {$start},{$page_size}"; 59 | $html = null; 60 | if ($btn_num>=$page_all){ 61 | for ($i=1;$i<=$page_all;$i++){ 62 | if ($_GET[$page]==$i){ 63 | $html[$i]="{$i}  "; 64 | } 65 | else{ 66 | $html[$i]="{$i}  "; 67 | } 68 | } 69 | } 70 | else{ 71 | $num_left = floor(($btn_num-1)/2); 72 | $start = $_GET[$page] - $num_left; 73 | $end = $start+$btn_num-1; 74 | if ($start<=1){ 75 | $start = 1; 76 | // 判断如果初始start小于1 77 | } 78 | if ($end>=$page_all){ 79 | $start = $page_all-$btn_num+1; 80 | // 判断如果结束end大于最大页码数量 81 | } 82 | for ($i=1;$i<=$btn_num;$i++){ 83 | if ($_GET[$page] == $start){ 84 | $html[$start]="{$start}  "; 85 | } 86 | else{ 87 | $html[$start]="{$start}  "; 88 | } 89 | $start++; 90 | } 91 | if ($btn_num>=3){ 92 | reset($html); 93 | $key_first = key($html); 94 | // 获取单元键值!!! 95 | end($html); 96 | $key_end = key($html); 97 | if ($key_first!=1){ 98 | // 只对内部数组做出更改,不添加数组长度,保证了完整性!!! 99 | array_shift($html); 100 | array_unshift($html,"1...  "); 101 | } 102 | if ($key_end!=$page_all){ 103 | array_pop($html); 104 | array_push($html,"...{$page_all}  "); 105 | } 106 | } 107 | } 108 | // 增添上一页下一页,其不在传入参数btn_num里面 109 | if ($_GET[$page]!=1){ 110 | $pre = $_GET[$page]-1; 111 | array_unshift($html,"«上一页  "); 112 | } 113 | if ($_GET[$page]!=$page_all){ 114 | $next= $_GET[$page]+1; 115 | array_push($html,"下一页»  "); 116 | } 117 | // php大多函数不改变变量内部的值!!! 118 | 119 | // 将数组转化为字符串,将这个放在后面较好!!! 120 | $html = implode(" ",$html); 121 | $data = array( 122 | 'limit'=>$limit, 123 | 'html'=>$html 124 | ); 125 | return $data; 126 | } 127 | //$page = page(100,10,'page',5); 128 | //var_dump($page['html']); 129 | //echo $page['html']; 130 | //echo "当前页面为".$_GET['page']; 131 | ?> -------------------------------------------------------------------------------- /style/public.css: -------------------------------------------------------------------------------- 1 | /**基本格式开始***************/ 2 | * { 3 | /*word-break: break-all;*/ 4 | } 5 | body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,form,input,textarea,p { 6 | margin:0px; 7 | padding:0px; 8 | font-size:13px; 9 | font-family:Tahoma; 10 | } 11 | ul { 12 | list-style:none; 13 | } 14 | img,a img { 15 | border:none; 16 | } 17 | a { 18 | text-decoration:none; 19 | } 20 | a:hover { 21 | text-decoration:underline; 22 | } 23 | body { 24 | background:#f4f4f4; 25 | color:#333; 26 | } 27 | .auto { 28 | width:960px; 29 | margin:0 auto; 30 | } 31 | #position { 32 | background:url(style_icon.png) 0px -60px no-repeat; 33 | text-indent:20px; 34 | } 35 | #position a { 36 | color:#666; 37 | } 38 | /**基本格式结束***************/ 39 | .header_wrap { 40 | background:#488fce; 41 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); 42 | display: block; 43 | left: 0; 44 | position:fixed; 45 | top: 0; 46 | width: 100%; 47 | z-index: 10; 48 | } 49 | #header { 50 | height:45px; 51 | line-height:45px; 52 | } 53 | #header .logo { 54 | width:100px; 55 | font-size:20px; 56 | font-family:微软雅黑; 57 | font-weight:bold; 58 | color:#fff; 59 | float:left; 60 | 61 | } 62 | #header .nav a { 63 | color:#fff; 64 | display:block; 65 | width:56px; 66 | float:left; 67 | text-align:center; 68 | font-size:14px; 69 | cursor:pointer; 70 | } 71 | #header .nav a.hover { 72 | background:#3b7fc4; 73 | } 74 | #header .serarch { 75 | background: none repeat scroll 0 0 #f2f2f2; 76 | border-radius: 4px; 77 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset; 78 | display: inline; 79 | float: left; 80 | height: 28px; 81 | margin: 8px 0 0 10px; 82 | padding:0; 83 | width: 160px; 84 | } 85 | #header .serarch:hover { 86 | background:#fff; 87 | } 88 | #header .serarch input.keyword { 89 | width:130px; 90 | height:20px; 91 | margin:3px 0 0 5px; 92 | display:block; 93 | float:left; 94 | border:0px; 95 | } 96 | #header .serarch input.submit { 97 | background:url(style_icon.png) 0px -593px; 98 | border: 0 none; 99 | cursor: pointer; 100 | float: right; 101 | height: 28px; 102 | margin: 0; 103 | overflow: visible; 104 | padding: 0; 105 | text-align:left; 106 | width: 25px; 107 | float:right; 108 | } 109 | #header .login { 110 | float:right; 111 | width:160px; 112 | } 113 | #header .login a { 114 | color:#fff; 115 | } 116 | a.btn { 117 | display:block; 118 | width:72px; 119 | height:30px; 120 | float:left; 121 | } 122 | a.publish { 123 | background:url(bg.png) 0 0 no-repeat; 124 | } 125 | a.reply { 126 | background:url(bg.png) 0 -90px no-repeat; 127 | } 128 | .pages_wrap .pages { 129 | float: right; 130 | } 131 | .pages a { 132 | background:url(core_bg.png) #f8f8f8; 133 | border-color: #c9c9c9 #bdbdbd #b0b0b0; 134 | border-image: none; 135 | border-radius: 3px; 136 | border-style: solid; 137 | border-width: 1px; 138 | color: #666666; 139 | display: inline-block; 140 | line-height: 13px; 141 | margin-right: 3px; 142 | padding: 6px 10px; 143 | text-decoration: none; 144 | vertical-align: top; 145 | } 146 | .pages a:hover { 147 | background-color: #f8f8f8; 148 | border-color:#c9c9c9 #bdbdbd #b0b0b0; 149 | border-image:none; 150 | border-radius:3px; 151 | border-style:solid; 152 | border-width:1px; 153 | color:#666666; 154 | display:inline-block; 155 | line-height:13px; 156 | margin-right:3px; 157 | padding:6px 10px; 158 | text-decoration:none; 159 | background:#488fcf; 160 | border-color: #2470b5 #488fcf #488fcf; 161 | color:#fff; 162 | } 163 | .pages span { 164 | background-color: #f8f8f8; 165 | border-color:#c9c9c9 #bdbdbd #b0b0b0; 166 | border-image:none; 167 | border-radius:3px; 168 | border-style:solid; 169 | border-width:1px; 170 | color:#666666; 171 | display:inline-block; 172 | line-height:13px; 173 | margin-right:3px; 174 | padding:6px 10px; 175 | text-decoration:none; 176 | background:#488fcf; 177 | border-color: #2470b5 #488fcf #488fcf; 178 | color:#fff; 179 | } 180 | 181 | #footer { 182 | border-top:1px solid #d3d3d3; 183 | text-align:center; 184 | padding:20px 0; 185 | margin-top:30px; 186 | } 187 | #footer a { 188 | color:#666; 189 | } 190 | #footer .bottom { 191 | padding:0 0 8px 0; 192 | } 193 | #footer .copyright { 194 | color: #999; 195 | font-size: 10px; 196 | text-align: center; 197 | } 198 | -------------------------------------------------------------------------------- /admin/son_module_add.php: -------------------------------------------------------------------------------- 1 | 8 | 11 | 37 | 38 |
39 |
添加子版块
40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 62 | 65 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | 76 | 79 | 80 | 83 | 84 | 85 | 86 | 91 | 94 | 95 | 96 | 97 | 98 | 101 | 102 |
排序版块名称操作
所述父板块 50 | 61 | 63 | 版块名称不得为空,最大不得超过66个字符 64 |
版块名称 71 | 版块名称不得为空,最大不得超过66个字符 72 |
板块简介 77 | 78 | 81 | 板块简介不得超过255个字符 82 |
版主 87 | 90 | 92 | 可以在这边选择一个版主作为会员 93 |
排序 99 | 填写一个数字即可 100 |
103 | 104 | 添加子版块成功,所属父板块为 : {$father_module_name},子版块名 : {$_POST['module_name']}, 113 | 板块信息 : {$_POST['info']},排序号 : {$_POST['sort']}

"; 114 | } 115 | elseif ($son_module['submit'] == "fail"){ 116 | echo "父板块不存在,无法添加子板块"; 117 | } 118 | } 119 | 120 | ?> 121 |
122 |
123 | 124 | 125 | -------------------------------------------------------------------------------- /admin/son_module_update.php: -------------------------------------------------------------------------------- 1 | 8 | 11 | 35 | 46 | 47 |
48 |
修改子版块 -
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 65 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | 80 | 87 | 88 | 91 | 92 | 93 | 94 | 99 | 102 | 103 | 104 | 105 | 106 | 109 | 110 |
排序版块名称操作
所述父板块 59 | 64 | 66 | 版块名称不得为空,最大不得超过66个字符 67 |
版块名称"/> 75 | 版块名称不得为空,最大不得超过66个字符 76 |
板块简介 81 | 86 | 89 | 板块简介不得超过255个字符 90 |
版主 95 | 98 | 100 | 可以在这边选择一个版主作为会员 101 |
排序 107 | 填写一个数字即可 108 |
111 | 112 | 修改子版块成功,所属父板块为 : {$father_module_name},子版块名 : {$_POST['module_name']}, 121 | 板块信息 : {$_POST['info']},排序号 : {$_POST['sort']}

"; 122 | } 123 | elseif ($son_module['submit'] == "fail"){ 124 | echo "父板块不存在,无法添加子板块"; 125 | } 126 | } 127 | 128 | ?> 129 |
130 |
131 | 132 | 133 | -------------------------------------------------------------------------------- /member.php: -------------------------------------------------------------------------------- 1 | 25 | ; 26 | 27 |
28 | 首页 > 29 |
30 |
31 |
32 |
    33 | 53 |
  • 54 |
    55 | 56 | 57 | 58 |
    59 |
    60 |

    61 |

    62 | 编辑 删除"; 65 | } 66 | ?> 67 | 发帖日期:    最后回复: 68 |

    69 |
    70 |
    71 |

    72 | 回复
    73 |

    74 |

    75 | 浏览
    76 |

    77 |
    78 |
    79 |
  • 80 | 81 |
82 |
83 | 86 |
87 |
88 | 93 | 113 |
114 |
115 | -------------------------------------------------------------------------------- /list_father.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | ".$son_data['module_name']." "; 32 | } 33 | // trim不改变son_id的值 34 | $son_id = trim($son_id,','); 35 | if ($son_id==''){ 36 | $son_id = 0; 37 | } 38 | } 39 | $query = "select count(*) from sfk_content where module_id in ({$son_id})"; 40 | //count(*)如果没找到,则返回count的值为0 41 | $query1 = "select count(*) from sfk_content where module_id in ({$son_id}) and time > CURRENT_DATE "; 42 | $result_count = execute($link,$query); 43 | $count_today = execute($link,$query1); 44 | $data_count = mysqli_fetch_row($result_count); 45 | $data_count_today = mysqli_fetch_row($count_today); 46 | //var_dump($data_count[0]); 47 | 48 | 49 | 50 | ?> 51 | ; 52 |
53 | 首页 > 54 |
55 |
56 |
57 |
58 |

59 |
60 | 今日:    61 | 总帖: 62 |
子版块:
63 |
64 |
65 | 66 |
67 | 71 |
72 |
73 |
74 |
75 |
76 | 77 |
    78 | 105 |
  • 106 |
    107 | 108 | "> 109 | 110 |
    111 |
    112 |
    []  

    113 |

    114 | 楼主:           115 |          最后回复: 116 |

    117 |
    118 |
    119 |

    120 | 回复
    121 |

    122 |

    123 | 浏览
    124 |

    125 |
    126 |
    127 |
  • 128 | 129 |
130 |
131 | 132 |
133 | 137 |
138 |
139 |
140 |
141 | 166 |
167 |
168 | -------------------------------------------------------------------------------- /show.php: -------------------------------------------------------------------------------- 1 | 13 | ,防止恶意植入 36 | //exit(); 37 | //如果用户发帖使用了换行,这里能够通过添加《br》正确换行 38 | 39 | ?> 40 | ; 41 | 42 |
43 | 首页 > > 44 | > 45 | 46 |
47 |
48 |
49 |
50 | 58 |
59 | 60 |
61 |
62 | 63 |
64 |
65 | 70 |
71 | 72 |
73 |
74 |
75 |
76 |

77 | 阅读: | 回复:15 78 |
79 |
80 |
81 | 发布于: 82 | 楼主 83 |
84 |
85 | 86 |
87 |
88 |
89 |
90 | 91 | 104 |
105 |
106 | 113 |
114 | 115 |
116 |
117 |
118 |
119 | 回复时间: 120 | 楼 | 引用 121 |
122 |
123 | 124 |
125 |
126 |
127 |
128 | 134 | 135 | 136 |
137 |
138 |
139 | 140 | " /> 141 | 142 |
143 |
144 | 145 |
146 |
147 |
148 |
149 | 回复时间: 150 | 楼 | 引用 151 |
152 |
153 |
154 |

引用 1楼 发表的:

155 | 156 |
157 | 158 |
159 |
160 |
161 |
162 | 163 | 164 |
165 |
166 | 167 |
168 | 169 |
170 |
171 |
172 | -------------------------------------------------------------------------------- /list_son.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 30 | 31 | ; 32 | 33 |
34 | 首页 > 35 | > 36 |
37 |
38 |
39 |
40 |

41 |
42 | current_date"; 48 | $count_today = num($link,$query); 49 | 50 | $query = "select * from sfk_member,sfk_son_module where sfk_son_module.member_id=sfk_member.id and sfk_son_module.id={$_GET['id']}"; 51 | $member_result = execute($link,$query); 52 | $member_data = mysqli_fetch_assoc($member_result); 53 | ?> 54 | 今日:    55 | 总帖: 56 |
57 |
版主:
58 |
59 |
60 | 61 |
62 | 66 |
67 |
68 |
69 |
70 |
71 | 72 |
    73 | 98 |
  • 99 |
    100 | 101 | "> 102 | 103 |
    104 |
    105 |
    []  

    106 |

    107 | 楼主:           108 |          最后回复: 109 |

    110 |
    111 |
    112 |

    113 | 回复
    114 |

    115 |

    116 | 浏览
    117 |

    118 |
    119 |
    120 |
  • 121 | 122 |
123 | 124 |
125 | 126 |
127 | 131 |
132 |
133 |
134 |
135 | 160 |
161 |
162 | 163 | 164 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /js/jquery.validate.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Validation Plugin - v1.14.0 - 6/30/2015 2 | * http://jqueryvalidation.org/ 3 | * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */ 4 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})}); -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); --------------------------------------------------------------------------------