├── .env.example
├── .gitattributes
├── .gitignore
├── LICENSE.txt
├── README.md
├── application
├── .htaccess
├── command.php
├── common.php
├── handler
│ └── Email.php
├── index
│ ├── controller
│ │ ├── Auth.php
│ │ ├── Base.php
│ │ ├── Bug.php
│ │ ├── Dashboard.php
│ │ ├── Error.php
│ │ ├── Index.php
│ │ ├── Profile.php
│ │ ├── Project.php
│ │ ├── Test.php
│ │ └── User.php
│ ├── model
│ │ ├── BaseModel.php
│ │ ├── Bug.php
│ │ ├── BugLog.php
│ │ ├── Project.php
│ │ ├── ProjectModule.php
│ │ ├── ProjectUser.php
│ │ ├── ProjectVersion.php
│ │ ├── User.php
│ │ └── UserLog.php
│ ├── service
│ │ ├── Auth.php
│ │ ├── Bug.php
│ │ ├── BugEmailTemplate.php
│ │ ├── Profile.php
│ │ ├── Project.php
│ │ ├── ProjectEmailTemplate.php
│ │ ├── ProjectModule.php
│ │ ├── ProjectVersion.php
│ │ └── ServiceResult.php
│ ├── validate
│ │ ├── BaseValidate.php
│ │ ├── Bug.php
│ │ ├── Project.php
│ │ ├── ProjectModule.php
│ │ ├── ProjectVersion.php
│ │ └── User.php
│ └── view
│ │ ├── bug
│ │ ├── add.html
│ │ ├── edit.html
│ │ ├── handle.html
│ │ └── index.html
│ │ ├── dashboard
│ │ └── index.html
│ │ ├── extend
│ │ ├── bootstrap.html
│ │ └── main.html
│ │ ├── index
│ │ └── index.html
│ │ ├── profile
│ │ └── index.html
│ │ ├── project
│ │ ├── edit.html
│ │ ├── index.html
│ │ └── main.html
│ │ ├── public
│ │ ├── bootstrap_footer.html
│ │ ├── footer.html
│ │ └── header.html
│ │ └── user
│ │ ├── login.html
│ │ └── register.html
├── job
│ ├── BaseJob.php
│ ├── BugJob.php
│ └── ProjectJob.php
├── lang
│ ├── en-us.php
│ └── zh-cn.php
└── tags.php
├── build.php
├── composer.json
├── config
├── app.php
├── cache.php
├── cookie.php
├── database.php
├── email.php
├── log.php
├── queue.php
├── session.php
├── template.php
└── trace.php
├── extend
└── .gitignore
├── public
├── .htaccess
├── favicon.ico
├── index.php
├── robots.txt
├── router.php
└── static
│ ├── .gitignore
│ ├── css
│ ├── bootstrap.min.css
│ ├── demo.css
│ └── material-dashboard-v=1.2.1.css
│ ├── iconfont
│ ├── MaterialIcons-Regular.eot
│ ├── MaterialIcons-Regular.ijmap
│ ├── MaterialIcons-Regular.svg
│ ├── MaterialIcons-Regular.ttf
│ ├── MaterialIcons-Regular.woff
│ ├── MaterialIcons-Regular.woff2
│ ├── README.md
│ ├── codepoints
│ └── material-icons.css
│ ├── img
│ ├── apple-icon.png
│ ├── card-1.jpeg
│ ├── card-2.jpeg
│ ├── card-3.jpeg
│ ├── default-avatar.png
│ ├── faces
│ │ ├── avatar.jpg
│ │ ├── card-profile1-square.jpg
│ │ └── marc.jpg
│ ├── favicon.png
│ ├── flags
│ │ ├── AU.png
│ │ ├── BR.png
│ │ ├── DE.png
│ │ ├── GB.png
│ │ ├── RO.png
│ │ └── US.png
│ ├── image_placeholder.jpg
│ ├── placeholder.jpg
│ ├── product1.jpg
│ ├── product2.jpg
│ ├── product3.jpg
│ ├── sidebar-1.jpg
│ ├── sidebar-2.jpg
│ ├── sidebar-3.jpg
│ └── sidebar-4.jpg
│ ├── js
│ ├── arrive.min.js
│ ├── bootstrap-datetimepicker.js
│ ├── bootstrap-notify.js
│ ├── bootstrap.min.js
│ ├── chartist.min.js
│ ├── core.js
│ ├── demo.js
│ ├── fullcalendar.min.js
│ ├── jasny-bootstrap.min.js
│ ├── jquery-3.2.1.min.js
│ ├── jquery-jvectormap.js
│ ├── jquery.bootstrap-wizard.js
│ ├── jquery.datatables.js
│ ├── jquery.select-bootstrap.js
│ ├── jquery.sharrre.js
│ ├── jquery.tagsinput.js
│ ├── jquery.validate.min.js
│ ├── material-dashboard-v=1.2.1.js
│ ├── material.min.js
│ ├── moment.min.js
│ ├── nouislider.min.js
│ ├── perfect-scrollbar.jquery.min.js
│ └── sweetalert2.js
│ ├── kindeditor
│ ├── kindeditor-all-min.js
│ ├── kindeditor-all.js
│ ├── lang
│ │ ├── ar.js
│ │ ├── en.js
│ │ ├── ko.js
│ │ ├── ru.js
│ │ ├── zh-CN.js
│ │ └── zh-TW.js
│ ├── license.txt
│ ├── php
│ │ ├── JSON.php
│ │ ├── demo.php
│ │ ├── file_manager_json.php
│ │ └── upload_json.php
│ ├── plugins
│ │ ├── anchor
│ │ │ └── anchor.js
│ │ ├── autoheight
│ │ │ └── autoheight.js
│ │ ├── baidumap
│ │ │ ├── baidumap.js
│ │ │ ├── index.html
│ │ │ └── map.html
│ │ ├── clearhtml
│ │ │ └── clearhtml.js
│ │ ├── code
│ │ │ ├── code.js
│ │ │ ├── prettify.css
│ │ │ └── prettify.js
│ │ ├── emoticons
│ │ │ ├── emoticons.js
│ │ │ └── images
│ │ │ │ ├── 0.gif
│ │ │ │ ├── 1.gif
│ │ │ │ ├── 10.gif
│ │ │ │ ├── 100.gif
│ │ │ │ ├── 101.gif
│ │ │ │ ├── 102.gif
│ │ │ │ ├── 103.gif
│ │ │ │ ├── 104.gif
│ │ │ │ ├── 105.gif
│ │ │ │ ├── 106.gif
│ │ │ │ ├── 107.gif
│ │ │ │ ├── 108.gif
│ │ │ │ ├── 109.gif
│ │ │ │ ├── 11.gif
│ │ │ │ ├── 110.gif
│ │ │ │ ├── 111.gif
│ │ │ │ ├── 112.gif
│ │ │ │ ├── 113.gif
│ │ │ │ ├── 114.gif
│ │ │ │ ├── 115.gif
│ │ │ │ ├── 116.gif
│ │ │ │ ├── 117.gif
│ │ │ │ ├── 118.gif
│ │ │ │ ├── 119.gif
│ │ │ │ ├── 12.gif
│ │ │ │ ├── 120.gif
│ │ │ │ ├── 121.gif
│ │ │ │ ├── 122.gif
│ │ │ │ ├── 123.gif
│ │ │ │ ├── 124.gif
│ │ │ │ ├── 125.gif
│ │ │ │ ├── 126.gif
│ │ │ │ ├── 127.gif
│ │ │ │ ├── 128.gif
│ │ │ │ ├── 129.gif
│ │ │ │ ├── 13.gif
│ │ │ │ ├── 130.gif
│ │ │ │ ├── 131.gif
│ │ │ │ ├── 132.gif
│ │ │ │ ├── 133.gif
│ │ │ │ ├── 134.gif
│ │ │ │ ├── 14.gif
│ │ │ │ ├── 15.gif
│ │ │ │ ├── 16.gif
│ │ │ │ ├── 17.gif
│ │ │ │ ├── 18.gif
│ │ │ │ ├── 19.gif
│ │ │ │ ├── 2.gif
│ │ │ │ ├── 20.gif
│ │ │ │ ├── 21.gif
│ │ │ │ ├── 22.gif
│ │ │ │ ├── 23.gif
│ │ │ │ ├── 24.gif
│ │ │ │ ├── 25.gif
│ │ │ │ ├── 26.gif
│ │ │ │ ├── 27.gif
│ │ │ │ ├── 28.gif
│ │ │ │ ├── 29.gif
│ │ │ │ ├── 3.gif
│ │ │ │ ├── 30.gif
│ │ │ │ ├── 31.gif
│ │ │ │ ├── 32.gif
│ │ │ │ ├── 33.gif
│ │ │ │ ├── 34.gif
│ │ │ │ ├── 35.gif
│ │ │ │ ├── 36.gif
│ │ │ │ ├── 37.gif
│ │ │ │ ├── 38.gif
│ │ │ │ ├── 39.gif
│ │ │ │ ├── 4.gif
│ │ │ │ ├── 40.gif
│ │ │ │ ├── 41.gif
│ │ │ │ ├── 42.gif
│ │ │ │ ├── 43.gif
│ │ │ │ ├── 44.gif
│ │ │ │ ├── 45.gif
│ │ │ │ ├── 46.gif
│ │ │ │ ├── 47.gif
│ │ │ │ ├── 48.gif
│ │ │ │ ├── 49.gif
│ │ │ │ ├── 5.gif
│ │ │ │ ├── 50.gif
│ │ │ │ ├── 51.gif
│ │ │ │ ├── 52.gif
│ │ │ │ ├── 53.gif
│ │ │ │ ├── 54.gif
│ │ │ │ ├── 55.gif
│ │ │ │ ├── 56.gif
│ │ │ │ ├── 57.gif
│ │ │ │ ├── 58.gif
│ │ │ │ ├── 59.gif
│ │ │ │ ├── 6.gif
│ │ │ │ ├── 60.gif
│ │ │ │ ├── 61.gif
│ │ │ │ ├── 62.gif
│ │ │ │ ├── 63.gif
│ │ │ │ ├── 64.gif
│ │ │ │ ├── 65.gif
│ │ │ │ ├── 66.gif
│ │ │ │ ├── 67.gif
│ │ │ │ ├── 68.gif
│ │ │ │ ├── 69.gif
│ │ │ │ ├── 7.gif
│ │ │ │ ├── 70.gif
│ │ │ │ ├── 71.gif
│ │ │ │ ├── 72.gif
│ │ │ │ ├── 73.gif
│ │ │ │ ├── 74.gif
│ │ │ │ ├── 75.gif
│ │ │ │ ├── 76.gif
│ │ │ │ ├── 77.gif
│ │ │ │ ├── 78.gif
│ │ │ │ ├── 79.gif
│ │ │ │ ├── 8.gif
│ │ │ │ ├── 80.gif
│ │ │ │ ├── 81.gif
│ │ │ │ ├── 82.gif
│ │ │ │ ├── 83.gif
│ │ │ │ ├── 84.gif
│ │ │ │ ├── 85.gif
│ │ │ │ ├── 86.gif
│ │ │ │ ├── 87.gif
│ │ │ │ ├── 88.gif
│ │ │ │ ├── 89.gif
│ │ │ │ ├── 9.gif
│ │ │ │ ├── 90.gif
│ │ │ │ ├── 91.gif
│ │ │ │ ├── 92.gif
│ │ │ │ ├── 93.gif
│ │ │ │ ├── 94.gif
│ │ │ │ ├── 95.gif
│ │ │ │ ├── 96.gif
│ │ │ │ ├── 97.gif
│ │ │ │ ├── 98.gif
│ │ │ │ ├── 99.gif
│ │ │ │ └── static.gif
│ │ ├── filemanager
│ │ │ ├── filemanager.js
│ │ │ └── images
│ │ │ │ ├── file-16.gif
│ │ │ │ ├── file-64.gif
│ │ │ │ ├── folder-16.gif
│ │ │ │ ├── folder-64.gif
│ │ │ │ └── go-up.gif
│ │ ├── fixtoolbar
│ │ │ └── fixtoolbar.js
│ │ ├── flash
│ │ │ └── flash.js
│ │ ├── image
│ │ │ ├── image.js
│ │ │ └── images
│ │ │ │ ├── align_left.gif
│ │ │ │ ├── align_right.gif
│ │ │ │ ├── align_top.gif
│ │ │ │ └── refresh.png
│ │ ├── insertfile
│ │ │ └── insertfile.js
│ │ ├── lineheight
│ │ │ └── lineheight.js
│ │ ├── link
│ │ │ └── link.js
│ │ ├── map
│ │ │ ├── map.html
│ │ │ └── map.js
│ │ ├── media
│ │ │ └── media.js
│ │ ├── multiimage
│ │ │ ├── images
│ │ │ │ ├── image.png
│ │ │ │ ├── select-files-en.png
│ │ │ │ ├── select-files-zh-CN.png
│ │ │ │ └── swfupload.swf
│ │ │ └── multiimage.js
│ │ ├── pagebreak
│ │ │ └── pagebreak.js
│ │ ├── plainpaste
│ │ │ └── plainpaste.js
│ │ ├── preview
│ │ │ └── preview.js
│ │ ├── quickformat
│ │ │ └── quickformat.js
│ │ ├── table
│ │ │ └── table.js
│ │ ├── template
│ │ │ ├── html
│ │ │ │ ├── 1.html
│ │ │ │ ├── 2.html
│ │ │ │ └── 3.html
│ │ │ └── template.js
│ │ └── wordpaste
│ │ │ └── wordpaste.js
│ └── themes
│ │ ├── common
│ │ ├── anchor.gif
│ │ ├── blank.gif
│ │ ├── flash.gif
│ │ ├── loading.gif
│ │ ├── media.gif
│ │ └── rm.gif
│ │ ├── default
│ │ ├── background.png
│ │ ├── default.css
│ │ └── default.png
│ │ ├── qq
│ │ ├── editor.gif
│ │ └── qq.css
│ │ └── simple
│ │ └── simple.css
│ └── upload
│ └── readme.md
├── resource
├── 1.png
└── webbug.sql
├── route
└── route.php
├── runtime
└── .gitignore
├── think
├── thinkphp-README.md
└── update-framework.sh
/.env.example:
--------------------------------------------------------------------------------
1 | DB_PWD=root
2 | DB_NAME=webbug
3 | DB_USER=root
4 | DB_HOST=127.0.0.1
5 | DB_PREFIX=wb_
6 |
7 | EMAIL_USER='test'
8 | EMAIL_PWD='test'
9 | EMAIL_PORT='25'
10 | EMAIL_HOST='test.com'
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.html linguist-language=PHP
2 | *.js linguist-language=PHP
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | vendor
3 | .DS_Store
4 | .env
5 | thinkphp
6 | composer.lock
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
3 | 版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
4 | All rights reserved。
5 | ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
6 |
7 | Apache Licence是著名的非盈利开源组织Apache采用的协议。
8 | 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
9 | 允许代码修改,再作为开源或商业软件发布。需要满足
10 | 的条件:
11 | 1. 需要给代码的用户一份Apache Licence ;
12 | 2. 如果你修改了代码,需要在被修改的文件中说明;
13 | 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
14 | 带有原来代码中的协议,商标,专利声明和其他原来作者规
15 | 定需要包含的说明;
16 | 4. 如果再发布的产品中包含一个Notice文件,则在Notice文
17 | 件中需要带有本协议内容。你可以在Notice中增加自己的
18 | 许可,但不可以表现为对Apache Licence构成更改。
19 | 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | POSSIBILITY OF SUCH DAMAGE.
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
10 |
11 |
{:lang('My Bug')}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | # |
20 | 项目 |
21 | 标题 |
22 | 模块 |
23 | 版本 |
24 | 状态 |
25 | 时间 |
26 | Actions |
27 |
28 |
29 |
30 |
31 |
32 | # |
33 | 项目 |
34 | 标题 |
35 | 模块 |
36 | 版本 |
37 | 状态 |
38 | 时间 |
39 | Actions |
40 |
41 |
42 |
43 | {volist name="bugs" id="bug"}
44 |
45 | {$bug.id} |
46 | {$bug->project ? $bug->project->project_name:''} |
47 | {$bug.bug_title} |
48 | {$bug->module ? $bug->module->module_name : ''} |
49 | {$bug->version ? $bug->version->version_name : ''} |
50 | {$bug->getBugStatusWord()} |
51 | {$bug->create_time} |
52 |
53 |
54 | dvr
55 | edit
56 | |
57 |
58 | {/volist}
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | {/block}
69 | {block name="footer"}
70 |
109 | {/block}
--------------------------------------------------------------------------------
/application/index/view/dashboard/index.html:
--------------------------------------------------------------------------------
1 | {extend name="extend/main" /}
2 | {block name="content"}
3 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
待解决
13 |
{$bug_count_no}
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
已解决
25 |
{$bug_count_yes}
26 |
27 |
28 |
29 |
30 |
31 |
32 |
35 |
36 |
所有
37 |
{$bug_count_all}
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
51 |
52 |
项目
53 |
{$project_count}
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | {/block}
--------------------------------------------------------------------------------
/application/index/view/index/index.html:
--------------------------------------------------------------------------------
1 | {extend name="extend/bootstrap" /}
2 | {block name="content"}
3 |
4 |
5 |
6 |
7 |
8 |
9 |
WebBug 项目管理系统
10 | 免费开源的BUG管理系统,使用PHP语言开发.
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 |
开源免费
25 |
26 | get_app
27 |
28 |
免费下载
29 |
30 |
31 |
32 |
下载
33 |
34 |
35 |
36 |
37 |
44 |
45 |
46 |
47 |
48 | {include file="public/bootstrap_footer" /}
49 |
50 | {/block}
--------------------------------------------------------------------------------
/application/index/view/profile/index.html:
--------------------------------------------------------------------------------
1 | {extend name="extend/main" /}
2 | {block name="content"}
3 |
51 | {/block}
52 | {block name="footer"}
53 |
76 | {/block}
--------------------------------------------------------------------------------
/application/index/view/public/bootstrap_footer.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/application/index/view/public/footer.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/application/index/view/public/footer.html
--------------------------------------------------------------------------------
/application/index/view/public/header.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/application/index/view/public/header.html
--------------------------------------------------------------------------------
/application/index/view/user/login.html:
--------------------------------------------------------------------------------
1 | {extend name="extend/bootstrap" /}
2 | {block name="content"}
3 |
4 |
52 |
53 | {include file="public/bootstrap_footer" /}
54 |
55 | {/block}
56 | {block name="footer"}
57 |
94 | {/block}
--------------------------------------------------------------------------------
/application/job/BaseJob.php:
--------------------------------------------------------------------------------
1 | attempts() > 1) {
22 | //通过这个方法可以检查这个任务已经重试了几次了
23 | return $job->delete();
24 | }
25 |
26 |
27 | $email = new Email();
28 |
29 |
30 | //读取用户id 挨个发送邮件
31 | foreach ($data['userIdArray'] as $v){
32 |
33 | $user = User::where(['id'=>$v])->find();
34 |
35 | $email->send($user->email,$user->username,$data['title'],$data['content']);
36 |
37 | }
38 |
39 |
40 | $job->delete();
41 |
42 |
43 |
44 | }
45 |
46 |
47 | }
--------------------------------------------------------------------------------
/application/job/ProjectJob.php:
--------------------------------------------------------------------------------
1 | attempts() > 1) {
21 | //通过这个方法可以检查这个任务已经重试了几次了
22 | return $job->delete();
23 | }
24 |
25 | var_dump($data);
26 |
27 |
28 |
29 |
30 | //读取用户id 挨个发送邮件
31 | foreach ($data['userIdArray'] as $v){
32 |
33 | $user = User::where(['id'=>$v])->find();
34 | $email = new Email();
35 | $email->send($user->email,$user->username,$data['title'],$data['content']);
36 |
37 | }
38 |
39 |
40 | $job->delete();
41 |
42 |
43 |
44 | }
45 | }
--------------------------------------------------------------------------------
/application/lang/en-us.php:
--------------------------------------------------------------------------------
1 | '背景颜色',
10 | 'Register'=>'注册',
11 | 'Login'=>'登录',
12 | 'Dashboard'=>'仪表板',
13 | 'Username'=>'用户名',
14 | 'Email'=>'邮箱',
15 | 'Password'=>'密码',
16 | 'Code'=>'验证码',
17 | 'My Profile'=>'我的简历',
18 | 'Settings'=>'设置',
19 | 'Project List'=>'项目列表',
20 | 'Bug List'=>'Bug列表',
21 | 'Project Name'=>'项目名称',
22 | 'Create Project'=>'创建项目',
23 | 'Edit Project'=>'修改项目',
24 | 'Submit'=>'提交',
25 | 'Edit Profile'=>'修改个人信息',
26 | 'Nick Name'=>'昵称',
27 | 'Project Version'=>'项目版本',
28 | 'Project Module'=>'项目模块',
29 | 'Edit Project Module'=>'修改项目模块名称',
30 | 'Edit Project Version'=>'修改项目版本名称',
31 | 'Delete Project Module'=>'删除项目模块名称',
32 | 'Delete Project Version'=>'删除项目版本名称',
33 | 'New Module'=>'新建模块',
34 | 'New Version'=>'新建版本',
35 | 'Default'=>'默认',
36 | 'AllocateToMyBug'=>'分配给我的Bug',
37 | 'Created Bug'=>'我创建的Bug',
38 | 'All Bug'=>'所有Bug',
39 | 'New Bug'=>'新建Bug',
40 | 'Project Users'=>'项目人员',
41 | 'New User'=>'添加人员',
42 | 'Owner'=>'拥有者',
43 | 'Delete Project User'=>'删除项目人员',
44 | 'Handle Bug'=>'处理Bug',
45 | 'My Bug'=>'我的Bug',
46 | 'Edit Bug'=>'修改Bug',
47 |
48 | ];
--------------------------------------------------------------------------------
/application/tags.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // 应用行为扩展定义文件
13 | return [
14 | // 应用初始化
15 | 'app_init' => [],
16 | // 应用开始
17 | 'app_begin' => [],
18 | // 模块初始化
19 | 'module_init' => [],
20 | // 操作开始执行
21 | 'action_begin' => [],
22 | // 视图内容过滤
23 | 'view_filter' => [],
24 | // 日志写入
25 | 'log_write' => [],
26 | // 应用结束
27 | 'app_end' => [],
28 | ];
29 |
--------------------------------------------------------------------------------
/build.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | return [
13 | // 生成应用公共文件
14 | '__file__' => ['common.php'],
15 |
16 | // 定义demo模块的自动生成 (按照实际定义的文件名生成)
17 | 'demo' => [
18 | '__file__' => ['common.php'],
19 | '__dir__' => ['behavior', 'controller', 'model', 'view'],
20 | 'controller' => ['Index', 'Test', 'UserType'],
21 | 'model' => ['User', 'UserType'],
22 | 'view' => ['index/index'],
23 | ],
24 |
25 | // 其他更多的模块定义
26 | ];
27 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "topthink/think",
3 | "description": "the new thinkphp framework",
4 | "type": "project",
5 | "keywords": [
6 | "framework",
7 | "thinkphp",
8 | "ORM"
9 | ],
10 | "homepage": "http://thinkphp.cn/",
11 | "license": "Apache-2.0",
12 | "authors": [
13 | {
14 | "name": "liu21st",
15 | "email": "liu21st@gmail.com"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=5.6.0",
20 | "topthink/framework": "5.1.*",
21 | "topthink/think-captcha": "^2.0",
22 | "phpmailer/phpmailer": "^6.0",
23 | "topthink/think-queue": "2.*"
24 | },
25 | "autoload": {
26 | "psr-4": {
27 | "app\\": "application"
28 | }
29 | },
30 | "extra": {
31 | "think-path": "thinkphp"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // +----------------------------------------------------------------------
13 | // | 应用设置
14 | // +----------------------------------------------------------------------
15 |
16 | return [
17 |
18 | // 应用调试模式
19 | 'app_debug' => true,
20 | // 应用Trace
21 | 'app_trace' => false,
22 | // 应用模式状态
23 | 'app_status' => '',
24 | // 是否支持多模块
25 | 'app_multi_module' => true,
26 | // 入口自动绑定模块
27 | 'auto_bind_module' => false,
28 | // 注册的根命名空间
29 | 'root_namespace' => [],
30 | // 默认输出类型
31 | 'default_return_type' => 'html',
32 | // 默认AJAX 数据返回格式,可选json xml ...
33 | 'default_ajax_return' => 'json',
34 | // 默认JSONP格式返回的处理方法
35 | 'default_jsonp_handler' => 'jsonpReturn',
36 | // 默认JSONP处理方法
37 | 'var_jsonp_handler' => 'callback',
38 | // 默认时区
39 | 'default_timezone' => 'PRC',
40 | // 是否开启多语言
41 | 'lang_switch_on' => true,
42 | // 默认全局过滤方法 用逗号分隔多个
43 | 'default_filter' => '',
44 | // 默认语言
45 | 'default_lang' => 'zh-cn',
46 | // 应用类库后缀
47 | 'class_suffix' => false,
48 | // 控制器类后缀
49 | 'controller_suffix' => false,
50 |
51 | // 默认模块名
52 | 'default_module' => 'index',
53 | // 禁止访问模块
54 | 'deny_module_list' => ['common'],
55 | // 默认控制器名
56 | 'default_controller' => 'Index',
57 | // 默认操作名
58 | 'default_action' => 'index',
59 | // 默认验证器
60 | 'default_validate' => '',
61 | // 默认的空控制器名
62 | 'empty_controller' => 'Error',
63 | // 操作方法后缀
64 | 'action_suffix' => '',
65 | // 自动搜索控制器
66 | 'controller_auto_search' => false,
67 |
68 | // PATHINFO变量名 用于兼容模式
69 | 'var_pathinfo' => 's',
70 | // 兼容PATH_INFO获取
71 | 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
72 | // pathinfo分隔符
73 | 'pathinfo_depr' => '/',
74 | // URL伪静态后缀
75 | 'url_html_suffix' => 'html',
76 | // URL普通方式参数 用于自动生成
77 | 'url_common_param' => false,
78 | // URL参数方式 0 按名称成对解析 1 按顺序解析
79 | 'url_param_type' => 0,
80 | // 路由使用完整匹配
81 | 'route_complete_match' => false,
82 | // 是否强制使用路由
83 | 'url_route_must' => false,
84 | // 域名部署
85 | 'url_domain_deploy' => false,
86 | // 域名根,如thinkphp.cn
87 | 'url_domain_root' => '',
88 | // 是否自动转换URL中的控制器和操作名
89 | 'url_convert' => true,
90 | // 默认的访问控制器层
91 | 'url_controller_layer' => 'controller',
92 | // 表单请求类型伪装变量
93 | 'var_method' => '_method',
94 | // 表单ajax伪装变量
95 | 'var_ajax' => '_ajax',
96 | // 表单pjax伪装变量
97 | 'var_pjax' => '_pjax',
98 | // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
99 | 'request_cache' => false,
100 | // 请求缓存有效期
101 | 'request_cache_expire' => null,
102 |
103 | // 视图输出字符串内容替换
104 | 'view_replace_str' => [
105 | '__CSS__'=>'/static/css',
106 | '__JS__'=>'/static/js',
107 | '__IMG__'=>'/static/img',
108 |
109 | ],
110 | // 默认跳转页面对应的模板文件
111 | 'dispatch_success_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
112 | 'dispatch_error_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
113 |
114 | // 异常页面的模板文件
115 | 'exception_tmpl' => Env::get('think_path') . 'tpl/think_exception.tpl',
116 |
117 | // 错误显示信息,非调试模式有效
118 | 'error_message' => '页面错误!请稍后再试~',
119 | // 显示错误信息
120 | 'show_error_msg' => false,
121 | // 异常处理handle类 留空使用 \think\exception\Handle
122 | 'exception_handle' => '',
123 |
124 | ];
125 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // +----------------------------------------------------------------------
13 | // | 缓存设置
14 | // +----------------------------------------------------------------------
15 |
16 | return [
17 | // 驱动方式
18 | 'type' => 'File',
19 | // 缓存保存目录
20 | 'path' => '',
21 | // 缓存前缀
22 | 'prefix' => '',
23 | // 缓存有效期 0表示永久缓存
24 | 'expire' => 0,
25 | ];
26 |
--------------------------------------------------------------------------------
/config/cookie.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // +----------------------------------------------------------------------
13 | // | Cookie设置
14 | // +----------------------------------------------------------------------
15 | return [
16 | // cookie 名称前缀
17 | 'prefix' => '',
18 | // cookie 保存时间
19 | 'expire' => 0,
20 | // cookie 保存路径
21 | 'path' => '/',
22 | // cookie 有效域名
23 | 'domain' => '',
24 | // cookie 启用安全传输
25 | 'secure' => false,
26 | // httponly设置
27 | 'httponly' => '',
28 | // 是否使用 setcookie
29 | 'setcookie' => true,
30 | ];
31 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | use \think\Facade\Env;
12 |
13 | return [
14 | // 数据库类型
15 | 'type' => 'mysql',
16 | // 服务器地址
17 | 'hostname' => Env::get('DB_HOST','127.0.0.1'),
18 | // 数据库名
19 | 'database' => Env::get('DB_NAME','webbug'),
20 | // 用户名
21 | 'username' => Env::get('DB_USER','root'),
22 | // 密码
23 | 'password' => Env::get('DB_PWD',''),
24 | // 端口
25 | 'hostport' => '',
26 | // 连接dsn
27 | 'dsn' => '',
28 | // 数据库连接参数
29 | 'params' => [],
30 | // 数据库编码默认采用utf8
31 | 'charset' => 'utf8',
32 | // 数据库表前缀
33 | 'prefix' => Env::get('DB_PREFIX',''),
34 | // 数据库调试模式
35 | 'debug' => true,
36 | // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
37 | 'deploy' => 0,
38 | // 数据库读写是否分离 主从式有效
39 | 'rw_separate' => false,
40 | // 读写分离后 主服务器数量
41 | 'master_num' => 1,
42 | // 指定从服务器序号
43 | 'slave_no' => '',
44 | // 是否严格检查字段是否存在
45 | 'fields_strict' => true,
46 | // 数据集返回类型
47 | 'resultset_type' => 'array',
48 | // 自动写入时间戳字段
49 | 'auto_timestamp' => false,
50 | // 时间字段取出后的默认时间格式
51 | 'datetime_format' => 'Y-m-d H:i:s',
52 | // 是否需要进行SQL性能分析
53 | 'sql_explain' => false,
54 | // Query类
55 | 'query' => '\\think\\db\\Query',
56 | ];
57 |
--------------------------------------------------------------------------------
/config/email.php:
--------------------------------------------------------------------------------
1 | env('EMAIL_HOST',''),
5 | 'port' => env('EMAIL_PORT',''),
6 | 'is_ssl' => true,
7 | 'username' => env('EMAIL_USER',''),
8 | 'password' => env('EMAIL_PWD',''),
9 | ];
--------------------------------------------------------------------------------
/config/log.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // +----------------------------------------------------------------------
13 | // | 日志设置
14 | // +----------------------------------------------------------------------
15 | return [
16 | // 日志记录方式,内置 file socket 支持扩展
17 | 'type' => 'File',
18 | // 日志保存目录
19 | 'path' => '',
20 | // 日志记录级别
21 | 'level' => [],
22 | ];
23 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | return [
13 | 'connector' => 'database',
14 | 'table' => 'jobs',//队列表 不写前缀
15 | ];
16 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // +----------------------------------------------------------------------
13 | // | 会话设置
14 | // +----------------------------------------------------------------------
15 |
16 | return [
17 | 'id' => '',
18 | // SESSION_ID的提交变量,解决flash上传跨域
19 | 'var_session_id' => '',
20 | // SESSION 前缀
21 | 'prefix' => 'think',
22 | // 驱动方式 支持redis memcache memcached
23 | 'type' => '',
24 | // 是否自动开启 SESSION
25 | 'auto_start' => true,
26 | ];
27 |
--------------------------------------------------------------------------------
/config/template.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // +----------------------------------------------------------------------
13 | // | 模板设置
14 | // +----------------------------------------------------------------------
15 |
16 | return [
17 | // 模板引擎类型 支持 php think 支持扩展
18 | 'type' => 'Think',
19 | // 模板路径
20 | 'view_path' => '',
21 | // 模板后缀
22 | 'view_suffix' => 'html',
23 | // 模板文件名分隔符
24 | 'view_depr' => DIRECTORY_SEPARATOR,
25 | // 模板引擎普通标签开始标记
26 | 'tpl_begin' => '{',
27 | // 模板引擎普通标签结束标记
28 | 'tpl_end' => '}',
29 | // 标签库标签开始标记
30 | 'taglib_begin' => '{',
31 | // 标签库标签结束标记
32 | 'taglib_end' => '}',
33 |
34 | //模板替换
35 | 'tpl_replace_string' => [
36 | '__CSS__'=>'/static/css',
37 | '__JS__'=>'/static/js',
38 | '__IMG__'=>'/static/img',
39 | '__UEDITOR__'=>'/static/UEditor',
40 | ],
41 |
42 | ];
43 |
--------------------------------------------------------------------------------
/config/trace.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // +----------------------------------------------------------------------
13 | // | Trace设置 开启 app_trace 后 有效
14 | // +----------------------------------------------------------------------
15 | return [
16 | // 内置Html Console 支持扩展
17 | 'type' => 'Html',
18 | ];
19 |
--------------------------------------------------------------------------------
/extend/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Options +FollowSymlinks -Multiviews
3 | RewriteEngine On
4 |
5 | RewriteCond %{REQUEST_FILENAME} !-d
6 | RewriteCond %{REQUEST_FILENAME} !-f
7 | RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
8 |
9 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // [ 应用入口文件 ]
13 | namespace think;
14 |
15 | // 加载基础文件
16 | require __DIR__ . '/../thinkphp/base.php';
17 |
18 | // 支持事先使用静态方法设置Request对象和Config对象
19 |
20 | // 执行应用并响应
21 | Container::get('app')->run()->send();
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/public/router.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | // $Id$
12 |
13 | if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
14 | return false;
15 | } else {
16 | require __DIR__ . "/index.php";
17 | }
18 |
--------------------------------------------------------------------------------
/public/static/.gitignore:
--------------------------------------------------------------------------------
1 | !.gitignore
--------------------------------------------------------------------------------
/public/static/iconfont/MaterialIcons-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/iconfont/MaterialIcons-Regular.eot
--------------------------------------------------------------------------------
/public/static/iconfont/MaterialIcons-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/iconfont/MaterialIcons-Regular.ttf
--------------------------------------------------------------------------------
/public/static/iconfont/MaterialIcons-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/iconfont/MaterialIcons-Regular.woff
--------------------------------------------------------------------------------
/public/static/iconfont/MaterialIcons-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/iconfont/MaterialIcons-Regular.woff2
--------------------------------------------------------------------------------
/public/static/iconfont/README.md:
--------------------------------------------------------------------------------
1 | The recommended way to use the Material Icons font is by linking to the web font hosted on Google Fonts:
2 |
3 | ```html
4 |
6 | ```
7 |
8 | Read more in our full usage guide:
9 | http://google.github.io/material-design-icons/#icon-font-for-the-web
10 |
--------------------------------------------------------------------------------
/public/static/iconfont/material-icons.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Material Icons';
3 | font-style: normal;
4 | font-weight: 400;
5 | src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
6 | src: local('Material Icons'),
7 | local('MaterialIcons-Regular'),
8 | url(MaterialIcons-Regular.woff2) format('woff2'),
9 | url(MaterialIcons-Regular.woff) format('woff'),
10 | url(MaterialIcons-Regular.ttf) format('truetype');
11 | }
12 |
13 | .material-icons {
14 | font-family: 'Material Icons';
15 | font-weight: normal;
16 | font-style: normal;
17 | font-size: 24px; /* Preferred icon size */
18 | display: inline-block;
19 | line-height: 1;
20 | text-transform: none;
21 | letter-spacing: normal;
22 | word-wrap: normal;
23 | white-space: nowrap;
24 | direction: ltr;
25 |
26 | /* Support for all WebKit browsers. */
27 | -webkit-font-smoothing: antialiased;
28 | /* Support for Safari and Chrome. */
29 | text-rendering: optimizeLegibility;
30 |
31 | /* Support for Firefox. */
32 | -moz-osx-font-smoothing: grayscale;
33 |
34 | /* Support for IE. */
35 | font-feature-settings: 'liga';
36 | }
37 |
--------------------------------------------------------------------------------
/public/static/img/apple-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/apple-icon.png
--------------------------------------------------------------------------------
/public/static/img/card-1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/card-1.jpeg
--------------------------------------------------------------------------------
/public/static/img/card-2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/card-2.jpeg
--------------------------------------------------------------------------------
/public/static/img/card-3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/card-3.jpeg
--------------------------------------------------------------------------------
/public/static/img/default-avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/default-avatar.png
--------------------------------------------------------------------------------
/public/static/img/faces/avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/faces/avatar.jpg
--------------------------------------------------------------------------------
/public/static/img/faces/card-profile1-square.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/faces/card-profile1-square.jpg
--------------------------------------------------------------------------------
/public/static/img/faces/marc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/faces/marc.jpg
--------------------------------------------------------------------------------
/public/static/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/favicon.png
--------------------------------------------------------------------------------
/public/static/img/flags/AU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/flags/AU.png
--------------------------------------------------------------------------------
/public/static/img/flags/BR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/flags/BR.png
--------------------------------------------------------------------------------
/public/static/img/flags/DE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/flags/DE.png
--------------------------------------------------------------------------------
/public/static/img/flags/GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/flags/GB.png
--------------------------------------------------------------------------------
/public/static/img/flags/RO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/flags/RO.png
--------------------------------------------------------------------------------
/public/static/img/flags/US.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/flags/US.png
--------------------------------------------------------------------------------
/public/static/img/image_placeholder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/image_placeholder.jpg
--------------------------------------------------------------------------------
/public/static/img/placeholder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/placeholder.jpg
--------------------------------------------------------------------------------
/public/static/img/product1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/product1.jpg
--------------------------------------------------------------------------------
/public/static/img/product2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/product2.jpg
--------------------------------------------------------------------------------
/public/static/img/product3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/product3.jpg
--------------------------------------------------------------------------------
/public/static/img/sidebar-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/sidebar-1.jpg
--------------------------------------------------------------------------------
/public/static/img/sidebar-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/sidebar-2.jpg
--------------------------------------------------------------------------------
/public/static/img/sidebar-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/sidebar-3.jpg
--------------------------------------------------------------------------------
/public/static/img/sidebar-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phpzc/WebBug/27421a87f7d8b38f8346a3fcba3ec27f941d54a3/public/static/img/sidebar-4.jpg
--------------------------------------------------------------------------------
/public/static/js/arrive.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | * arrive.js
3 | * v2.4.1
4 | * https://github.com/uzairfarooq/arrive
5 | * MIT licensed
6 | *
7 | * Copyright (c) 2014-2017 Uzair Farooq
8 | */
9 |
10 | var Arrive=function(e,t,n){"use strict";function r(e,t,n){l.addMethod(t,n,e.unbindEvent),l.addMethod(t,n,e.unbindEventWithSelectorOrCallback),l.addMethod(t,n,e.unbindEventWithSelectorAndCallback)}function i(e){e.arrive=f.bindEvent,r(f,e,"unbindArrive"),e.leave=d.bindEvent,r(d,e,"unbindLeave")}if(e.MutationObserver&&"undefined"!=typeof HTMLElement){var o=0,l=function(){var t=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;return{matchesSelector:function(e,n){return e instanceof HTMLElement&&t.call(e,n)},addMethod:function(e,t,r){var i=e[t];e[t]=function(){return r.length==arguments.length?r.apply(this,arguments):"function"==typeof i?i.apply(this,arguments):n}},callCallbacks:function(e,t){t&&t.options.onceOnly&&1==t.firedElems.length&&(e=[e[0]]);for(var n,r=0;n=e[r];r++)n&&n.callback&&n.callback.call(n.elem,n.elem);t&&t.options.onceOnly&&1==t.firedElems.length&&t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback)},checkChildNodesRecursively:function(e,t,n,r){for(var i,o=0;i=e[o];o++)n(i,t,r)&&r.push({callback:t.callback,elem:i}),i.childNodes.length>0&&l.checkChildNodesRecursively(i.childNodes,t,n,r)},mergeArrays:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},toElementsArray:function(t){return n===t||"number"==typeof t.length&&t!==e||(t=[t]),t}}}(),c=function(){var e=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null};return e.prototype.addEvent=function(e,t,n,r){var i={target:e,selector:t,options:n,callback:r,firedElems:[]};return this._beforeAdding&&this._beforeAdding(i),this._eventsBucket.push(i),i},e.prototype.removeEvent=function(e){for(var t,n=this._eventsBucket.length-1;t=this._eventsBucket[n];n--)if(e(t)){this._beforeRemoving&&this._beforeRemoving(t);var r=this._eventsBucket.splice(n,1);r&&r.length&&(r[0].callback=null)}},e.prototype.beforeAdding=function(e){this._beforeAdding=e},e.prototype.beforeRemoving=function(e){this._beforeRemoving=e},e}(),a=function(t,r){var i=new c,o=this,a={fireOnAttributesModification:!1};return i.beforeAdding(function(n){var i,l=n.target;(l===e.document||l===e)&&(l=document.getElementsByTagName("html")[0]),i=new MutationObserver(function(e){r.call(this,e,n)});var c=t(n.options);i.observe(l,c),n.observer=i,n.me=o}),i.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,n){t=l.mergeArrays(a,t);for(var r=l.toElementsArray(this),o=0;o
0?l.checkChildNodesRecursively(n,t,r,o):"attributes"===e.type&&r(i,t,o)&&o.push({callback:t.callback,elem:i}),l.callCallbacks(o,t)})}function r(e,t){return l.matchesSelector(e,t.selector)&&(e._id===n&&(e._id=o++),-1==t.firedElems.indexOf(e._id))?(t.firedElems.push(e._id),!0):!1}var i={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};f=new a(e,t);var c=f.bindEvent;return f.bindEvent=function(e,t,r){n===r?(r=t,t=i):t=l.mergeArrays(i,t);var o=l.toElementsArray(this);if(t.existing){for(var a=[],s=0;s0&&l.checkChildNodesRecursively(n,t,r,i),l.callCallbacks(i,t)})}function r(e,t){return l.matchesSelector(e,t.selector)}var i={};d=new a(e,t);var o=d.bindEvent;return d.bindEvent=function(e,t,r){n===r?(r=t,t=i):t=l.mergeArrays(i,t),o.call(this,e,t,r)},d},f=new s,d=new u;t&&i(t.fn),i(HTMLElement.prototype),i(NodeList.prototype),i(HTMLCollection.prototype),i(HTMLDocument.prototype),i(Window.prototype);var h={};return r(f,h,"unbindAllArrive"),r(d,h,"unbindAllLeave"),h}}(window,"undefined"==typeof jQuery?null:jQuery,void 0);
11 |
--------------------------------------------------------------------------------
/public/static/kindeditor/php/demo.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 | KindEditor PHP
16 |
17 |
18 |
19 |
20 |
21 |
43 |
44 |
45 |
46 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/public/static/kindeditor/php/file_manager_json.php:
--------------------------------------------------------------------------------
1 | 2); //文件夹是否包含文件
78 | $file_list[$i]['filesize'] = 0; //文件大小
79 | $file_list[$i]['is_photo'] = false; //是否图片
80 | $file_list[$i]['filetype'] = ''; //文件类别,用扩展名判断
81 | } else {
82 | $file_list[$i]['is_dir'] = false;
83 | $file_list[$i]['has_file'] = false;
84 | $file_list[$i]['filesize'] = filesize($file);
85 | $file_list[$i]['dir_path'] = '';
86 | $file_ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
87 | $file_list[$i]['is_photo'] = in_array($file_ext, $ext_arr);
88 | $file_list[$i]['filetype'] = $file_ext;
89 | }
90 | $file_list[$i]['filename'] = $filename; //文件名,包含扩展名
91 | $file_list[$i]['datetime'] = date('Y-m-d H:i:s', filemtime($file)); //文件最后修改时间
92 | $i++;
93 | }
94 | closedir($handle);
95 | }
96 |
97 | //排序
98 | function cmp_func($a, $b) {
99 | global $order;
100 | if ($a['is_dir'] && !$b['is_dir']) {
101 | return -1;
102 | } else if (!$a['is_dir'] && $b['is_dir']) {
103 | return 1;
104 | } else {
105 | if ($order == 'size') {
106 | if ($a['filesize'] > $b['filesize']) {
107 | return 1;
108 | } else if ($a['filesize'] < $b['filesize']) {
109 | return -1;
110 | } else {
111 | return 0;
112 | }
113 | } else if ($order == 'type') {
114 | return strcmp($a['filetype'], $b['filetype']);
115 | } else {
116 | return strcmp($a['filename'], $b['filename']);
117 | }
118 | }
119 | }
120 | usort($file_list, 'cmp_func');
121 |
122 | $result = array();
123 | //相对于根目录的上一级目录
124 | $result['moveup_dir_path'] = $moveup_dir_path;
125 | //相对于根目录的当前目录
126 | $result['current_dir_path'] = $current_dir_path;
127 | //当前目录的URL
128 | $result['current_url'] = $current_url;
129 | //文件数
130 | $result['total_count'] = count($file_list);
131 | //文件列表数组
132 | $result['file_list'] = $file_list;
133 |
134 | //输出JSON字符串
135 | header('Content-type: application/json; charset=UTF-8');
136 | $json = new Services_JSON();
137 | echo $json->encode($result);
138 |
--------------------------------------------------------------------------------
/public/static/kindeditor/php/upload_json.php:
--------------------------------------------------------------------------------
1 | array('gif', 'jpg', 'jpeg', 'png', 'bmp'),
22 | 'flash' => array('swf', 'flv'),
23 | 'media' => array('swf', 'flv', 'mp3', 'wav', 'wma', 'wmv', 'mid', 'avi', 'mpg', 'asf', 'rm', 'rmvb'),
24 | 'file' => array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2'),
25 | );
26 | //最大文件大小
27 | $max_size = 1000000;
28 |
29 | $save_path = realpath($save_path) . '/';
30 |
31 | //PHP上传失败
32 | if (!empty($_FILES['imgFile']['error'])) {
33 | switch($_FILES['imgFile']['error']){
34 | case '1':
35 | $error = '超过php.ini允许的大小。';
36 | break;
37 | case '2':
38 | $error = '超过表单允许的大小。';
39 | break;
40 | case '3':
41 | $error = '图片只有部分被上传。';
42 | break;
43 | case '4':
44 | $error = '请选择图片。';
45 | break;
46 | case '6':
47 | $error = '找不到临时目录。';
48 | break;
49 | case '7':
50 | $error = '写文件到硬盘出错。';
51 | break;
52 | case '8':
53 | $error = 'File upload stopped by extension。';
54 | break;
55 | case '999':
56 | default:
57 | $error = '未知错误。';
58 | }
59 | alert($error);
60 | }
61 |
62 | //有上传文件时
63 | if (empty($_FILES) === false) {
64 | //原文件名
65 | $file_name = $_FILES['imgFile']['name'];
66 | //服务器上临时文件名
67 | $tmp_name = $_FILES['imgFile']['tmp_name'];
68 | //文件大小
69 | $file_size = $_FILES['imgFile']['size'];
70 | //检查文件名
71 | if (!$file_name) {
72 | alert("请选择文件。");
73 | }
74 | //检查目录
75 | if (@is_dir($save_path) === false) {
76 | alert("上传目录不存在。");
77 | }
78 | //检查目录写权限
79 | if (@is_writable($save_path) === false) {
80 | alert("上传目录没有写权限。");
81 | }
82 | //检查是否已上传
83 | if (@is_uploaded_file($tmp_name) === false) {
84 | alert("上传失败。");
85 | }
86 | //检查文件大小
87 | if ($file_size > $max_size) {
88 | alert("上传文件大小超过限制。");
89 | }
90 | //检查目录名
91 | $dir_name = empty($_GET['dir']) ? 'image' : trim($_GET['dir']);
92 | if (empty($ext_arr[$dir_name])) {
93 | alert("目录名不正确。");
94 | }
95 | //获得文件扩展名
96 | $temp_arr = explode(".", $file_name);
97 | $file_ext = array_pop($temp_arr);
98 | $file_ext = trim($file_ext);
99 | $file_ext = strtolower($file_ext);
100 | //检查扩展名
101 | if (in_array($file_ext, $ext_arr[$dir_name]) === false) {
102 | alert("上传文件扩展名是不允许的扩展名。\n只允许" . implode(",", $ext_arr[$dir_name]) . "格式。");
103 | }
104 | //创建文件夹
105 | if ($dir_name !== '') {
106 | $save_path .= $dir_name . "/";
107 | $save_url .= $dir_name . "/";
108 | if (!file_exists($save_path)) {
109 | mkdir($save_path);
110 | }
111 | }
112 | $ymd = date("Ymd");
113 | $save_path .= $ymd . "/";
114 | $save_url .= $ymd . "/";
115 | if (!file_exists($save_path)) {
116 | mkdir($save_path);
117 | }
118 | //新文件名
119 | $new_file_name = date("YmdHis") . '_' . rand(10000, 99999) . '.' . $file_ext;
120 | //移动文件
121 | $file_path = $save_path . $new_file_name;
122 | if (move_uploaded_file($tmp_name, $file_path) === false) {
123 | alert("上传文件失败。");
124 | }
125 | @chmod($file_path, 0644);
126 | $file_url = $save_url . $new_file_name;
127 |
128 | header('Content-type: text/html; charset=UTF-8');
129 | $json = new Services_JSON();
130 | echo $json->encode(array('error' => 0, 'url' => $file_url));
131 | exit;
132 | }
133 |
134 | function alert($msg) {
135 | header('Content-type: text/html; charset=UTF-8');
136 | $json = new Services_JSON();
137 | echo $json->encode(array('error' => 1, 'message' => $msg));
138 | exit;
139 | }
140 |
--------------------------------------------------------------------------------
/public/static/kindeditor/plugins/anchor/anchor.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * KindEditor - WYSIWYG HTML Editor for Internet
3 | * Copyright (C) 2006-2011 kindsoft.net
4 | *
5 | * @author Roddy
6 | * @site http://www.kindsoft.net/
7 | * @licence http://www.kindsoft.net/license.php
8 | *******************************************************************************/
9 |
10 | KindEditor.plugin('anchor', function(K) {
11 | var self = this, name = 'anchor', lang = self.lang(name + '.');
12 | self.plugin.anchor = {
13 | edit : function() {
14 | var html = ['',
15 | '
',
16 | '',
17 | '',
18 | '
',
19 | '
'].join('');
20 | var dialog = self.createDialog({
21 | name : name,
22 | width : 300,
23 | title : self.lang(name),
24 | body : html,
25 | yesBtn : {
26 | name : self.lang('yes'),
27 | click : function(e) {
28 | self.insertHtml('').hideDialog().focus();
29 | }
30 | }
31 | });
32 | var div = dialog.div,
33 | nameBox = K('input[name="name"]', div);
34 | var img = self.plugin.getSelectedAnchor();
35 | if (img) {
36 | nameBox.val(unescape(img.attr('data-ke-name')));
37 | }
38 | nameBox[0].focus();
39 | nameBox[0].select();
40 | },
41 | 'delete' : function() {
42 | self.plugin.getSelectedAnchor().remove();
43 | }
44 | };
45 | self.clickToolbar(name, self.plugin.anchor.edit);
46 | });
47 |
--------------------------------------------------------------------------------
/public/static/kindeditor/plugins/autoheight/autoheight.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * KindEditor - WYSIWYG HTML Editor for Internet
3 | * Copyright (C) 2006-2011 kindsoft.net
4 | *
5 | * @author Roddy
6 | * @site http://www.kindsoft.net/
7 | * @licence http://www.kindsoft.net/license.php
8 | *******************************************************************************/
9 |
10 | KindEditor.plugin('autoheight', function(K) {
11 | var self = this;
12 |
13 | if (!self.autoHeightMode) {
14 | return;
15 | }
16 |
17 | var minHeight;
18 |
19 | function hideScroll() {
20 | var edit = self.edit;
21 | var body = edit.doc.body;
22 | edit.iframe[0].scroll = 'no';
23 | body.style.overflowY = 'hidden';
24 | }
25 |
26 | function resetHeight() {
27 | var edit = self.edit;
28 | var body = edit.doc.body;
29 | edit.iframe.height(minHeight);
30 | self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight));
31 | }
32 |
33 | function init() {
34 | minHeight = K.removeUnit(self.height);
35 |
36 | self.edit.afterChange(resetHeight);
37 | hideScroll();
38 | resetHeight();
39 | }
40 |
41 | if (self.isCreated) {
42 | init();
43 | } else {
44 | self.afterCreate(init);
45 | }
46 | });
47 |
48 | /*
49 | * 如何实现真正的自动高度?
50 | * 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。
51 | * 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。
52 | * 由此就实现了真正的自动高度
53 | * 测试:chrome、firefox、IE9、IE8
54 | * */
55 |
--------------------------------------------------------------------------------
/public/static/kindeditor/plugins/baidumap/baidumap.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * KindEditor - WYSIWYG HTML Editor for Internet
3 | * Copyright (C) 2006-2011 kindsoft.net
4 | *
5 | * @author Roddy
6 | * @site http://www.kindsoft.net/
7 | * @licence http://www.kindsoft.net/license.php
8 | *******************************************************************************/
9 |
10 | // Baidu Maps: http://dev.baidu.com/wiki/map/index.php?title=%E9%A6%96%E9%A1%B5
11 |
12 | KindEditor.plugin('baidumap', function(K) {
13 | var self = this, name = 'baidumap', lang = self.lang(name + '.');
14 | var mapWidth = K.undef(self.mapWidth, 558);
15 | var mapHeight = K.undef(self.mapHeight, 360);
16 | self.clickToolbar(name, function() {
17 | var html = ['',
18 | '',
32 | '
',
33 | '
'].join('');
34 | var dialog = self.createDialog({
35 | name : name,
36 | width : mapWidth + 42,
37 | title : self.lang(name),
38 | body : html,
39 | yesBtn : {
40 | name : self.lang('yes'),
41 | click : function(e) {
42 | var map = win.map;
43 | var centerObj = map.getCenter();
44 | var center = centerObj.lng + ',' + centerObj.lat;
45 | var zoom = map.getZoom();
46 | var url = [checkbox[0].checked ? self.pluginsPath + 'baidumap/index.html' : 'http://api.map.baidu.com/staticimage',
47 | '?center=' + encodeURIComponent(center),
48 | '&zoom=' + encodeURIComponent(zoom),
49 | '&width=' + mapWidth,
50 | '&height=' + mapHeight,
51 | '&markers=' + encodeURIComponent(center),
52 | '&markerStyles=' + encodeURIComponent('l,A')].join('');
53 | if (checkbox[0].checked) {
54 | self.insertHtml('');
55 | } else {
56 | self.exec('insertimage', url);
57 | }
58 | self.hideDialog().focus();
59 | }
60 | },
61 | beforeRemove : function() {
62 | searchBtn.remove();
63 | if (doc) {
64 | doc.write('');
65 | }
66 | iframe.remove();
67 | }
68 | });
69 | var div = dialog.div,
70 | addressBox = K('[name="address"]', div),
71 | searchBtn = K('[name="searchBtn"]', div),
72 | checkbox = K('[name="insertDynamicMap"]', dialog.div),
73 | win, doc;
74 | var iframe = K('');
75 | function ready() {
76 | win = iframe[0].contentWindow;
77 | doc = K.iframeDoc(iframe);
78 | }
79 | iframe.bind('load', function() {
80 | iframe.unbind('load');
81 | if (K.IE) {
82 | ready();
83 | } else {
84 | setTimeout(ready, 0);
85 | }
86 | });
87 | K('.ke-map', div).replaceWith(iframe);
88 | // search map
89 | searchBtn.click(function() {
90 | win.search(addressBox.val());
91 | });
92 | });
93 | });
94 |
--------------------------------------------------------------------------------
/public/static/kindeditor/plugins/baidumap/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 百度地图API自定义地图
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
83 |
--------------------------------------------------------------------------------
/public/static/kindeditor/plugins/baidumap/map.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Baidu Maps
6 |
10 |
11 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/public/static/kindeditor/plugins/clearhtml/clearhtml.js:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * KindEditor - WYSIWYG HTML Editor for Internet
3 | * Copyright (C) 2006-2011 kindsoft.net
4 | *
5 | * @author Roddy
6 | * @site http://www.kindsoft.net/
7 | * @licence http://www.kindsoft.net/license.php
8 | *******************************************************************************/
9 |
10 | KindEditor.plugin('clearhtml', function(K) {
11 | var self = this, name = 'clearhtml';
12 | self.clickToolbar(name, function() {
13 | self.focus();
14 | var html = self.html();
15 | html = html.replace(/(
11 |
53 |
54 |
55 |
56 |
57 |