├── .htaccess
├── .idea
├── modules.xml
├── php_frame.iml
├── vcs.xml
└── workspace.xml
├── README.md
├── app
├── config
│ └── route.config.php
├── control
│ ├── BaseController.php
│ ├── BlogController.php
│ ├── PrivilegeController.php
│ └── indexController.php
└── view
│ ├── addblog.html
│ ├── assets
│ ├── css
│ │ ├── style.css
│ │ ├── themes.css
│ │ └── themes
│ │ │ ├── flat-blue.css
│ │ │ └── flat-green.css
│ ├── img
│ │ ├── app-header-bg.jpg
│ │ ├── backdrop
│ │ │ ├── micro_carbon.png
│ │ │ └── tactile_noise.png
│ │ ├── bg.jpg
│ │ ├── bg
│ │ │ └── picjumbo.com_HNCK3558.jpg
│ │ ├── contact-us-bg.jpg
│ │ ├── profile
│ │ │ ├── picjumbo.com_HNCK4153_resize.jpg
│ │ │ └── profile-1.jpg
│ │ ├── screenshots
│ │ │ ├── dashboard.png
│ │ │ ├── landing.png
│ │ │ ├── login.png
│ │ │ └── theming.png
│ │ └── thumbnails
│ │ │ ├── picjumbo.com_HNCK4737.jpg
│ │ │ ├── picjumbo.com_IMG_3241.jpg
│ │ │ └── picjumbo.com_IMG_4566.jpg
│ ├── js
│ │ ├── alert.js
│ │ ├── app.js
│ │ ├── button.js
│ │ ├── card.js
│ │ ├── chartjs.js
│ │ ├── index.js
│ │ ├── list.js
│ │ ├── modal.js
│ │ └── theming.js
│ ├── lib
│ │ ├── css
│ │ │ ├── animate.min.css
│ │ │ ├── bootstrap-switch.min.css
│ │ │ ├── bootstrap.min.css
│ │ │ ├── checkbox3.min.css
│ │ │ ├── dataTables.bootstrap.css
│ │ │ ├── font-awesome.min.css
│ │ │ ├── jquery.dataTables.min.css
│ │ │ └── select2.min.css
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ ├── fontawesome-webfont.woff2
│ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ └── glyphicons-halflings-regular.woff2
│ │ └── js
│ │ │ ├── Chart.min.js
│ │ │ ├── ace
│ │ │ ├── ace.js
│ │ │ ├── mode-html.js
│ │ │ └── theme-github.js
│ │ │ ├── bootstrap-switch.min.js
│ │ │ ├── bootstrap.min.js
│ │ │ ├── dataTables.bootstrap.min.js
│ │ │ ├── jquery.dataTables.min.js
│ │ │ ├── jquery.matchHeight-min.js
│ │ │ ├── jquery.min.js
│ │ │ └── select2.full.min.js
│ └── plugins
│ │ └── jeDate
│ │ ├── jedate.css
│ │ └── jquery.jedate.min.js
│ ├── blist.html
│ ├── classify.html
│ ├── index
│ └── index.html
│ ├── login.html
│ └── tags.html
├── config
├── commom.config.php
└── db.config.php
├── core
├── Controller.php
├── common
│ ├── config.inc.php
│ └── functions.inc.php
├── frame.php
└── lib
│ ├── DbMysqli.php
│ ├── DbPDO.php
│ ├── Image.php
│ ├── String.php
│ ├── db.php
│ ├── model.php
│ └── route.php
└── index.php
/.htaccess:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/.htaccess
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/php_frame.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # VgamblerPHP
2 | VgamblerPHP is an Application Development Framework
3 |
4 |
--------------------------------------------------------------------------------
/app/config/route.config.php:
--------------------------------------------------------------------------------
1 | array('privilege/login'),
10 | 'loginout' => array('index/loginout'),
11 | 'index' => array('index/index'),
12 | 'classify' => array('index/classify'),
13 | 'tags' => array('index/tags'),
14 | 'addblog' => array('index/addblog', array('method' => 'get')),
15 | 'msort' => array('blog/msort'),
16 |
17 | 'add_blog' => array('blog/add', array('method' => 'post')),
18 | 'modifyblog' => array('blog/modify', array('method' => 'get')),
19 | 'update_blog' => array('blog/update', array('method' => 'post')),
20 | );
--------------------------------------------------------------------------------
/app/control/BaseController.php:
--------------------------------------------------------------------------------
1 | = time()) {
21 |
22 | } else {
23 | $this->redirect("login.html");
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/app/control/BlogController.php:
--------------------------------------------------------------------------------
1 | getPostData();
19 | $db = new DbMysqli();
20 | $res = $db->data($data)->table('blog')->add();
21 | if ($res) {
22 | $this->showMsg('添加成功');
23 | } else {
24 | $this->showMsg('添加失败', false);
25 | }
26 | } else {
27 | $this->goBackMsg('当前接口不支持该方法');
28 | }
29 | }
30 |
31 | public function modify() {
32 | if ('GET' == $_SERVER['REQUEST_METHOD']) {
33 | $bid = intval($this->get('bid'));
34 | $db = new DbMysqli();
35 | $blog = $db->where(array('bid' => $bid))->find('blog');
36 | if (!empty($blog)) {
37 | $this->assign('blog', $blog);
38 | $this->display('addblog');
39 | } else {
40 | $this->redirect('index.html');
41 | }
42 | }
43 | }
44 |
45 | public function msort() {
46 | if ('POST' == $_SERVER['REQUEST_METHOD']) {
47 | $bid = intval($this->post('bid'));
48 | $sort = intval($this->post('sort'));
49 |
50 | $result = array('flag' => false, 'msg' => '');
51 | if ($bid > 0 && $sort > 0 && $sort < 256) {
52 | $db = new DbMysqli();
53 | $res = $db->table('blog')->where(array('bid' => $bid))->save(array('sort' => $sort));
54 | if ($res) {
55 | $result['flag'] = true;
56 | $result['msg'] = '更新成功';
57 | } else {
58 | $result['msg'] = '执行失败, 请检查.';
59 | }
60 | }
61 | echo json_encode($result);
62 | return ;
63 | }
64 | }
65 |
66 | public function update() {
67 | if ('POST' == $_SERVER['REQUEST_METHOD']) {
68 | $bid = intval($this->post('ubid'));
69 | $data = $this->getPostData();
70 | unset($data['sort']);
71 | $where = array('bid' => $bid);
72 |
73 | $db = new DbMysqli();
74 | $res = $db->table('blog')->where($where)->save($data);
75 | if ($res) {
76 | $this->showMsg('更新成功');
77 | } else {
78 | $this->showMsg('更新失败', false);
79 | }
80 | }
81 | }
82 |
83 | private function getPostData() {
84 | $title = $this->post('title');
85 | $content = $this->post('content');
86 | $tag = $this->post('tag');
87 | $alias = $this->post('alias');
88 | $classify = $this->post('classify');
89 | $status = $this->post('status');
90 | $author = $this->post('author');
91 | $time = $this->post('time');
92 | $isTop = $this->post('isTop');
93 | $isComment = $this->post('isComment');
94 |
95 | $data = array(
96 | 'title' => "'" . strip_tags($title) . "'",
97 | 'alias' => "'" . strip_tags($alias) . "'",
98 | 'content' => "'" . htmlspecialchars($content) . "'",
99 | 'tags' => "'" . htmlspecialchars($tag) . "'",
100 | 'author' => "'" . strip_tags($author) . "'",
101 | 'isTop' => is_null($isTop) ? 0 : 1,
102 | 'sort' => 255,
103 | 'status' => intval($status),
104 | 'isComment' => is_null($isComment) ? 0 : 1,
105 | 'cid' => intval($classify),
106 | 'updateAt' => time(),
107 | 'createAt' => strtotime($time) > 0 ? strtotime($time) : time());
108 |
109 | return $data;
110 | }
111 | }
--------------------------------------------------------------------------------
/app/control/PrivilegeController.php:
--------------------------------------------------------------------------------
1 | where(array('user' => $usr, 'pass' => md5(md5($pass))))->find('admin');
27 | if (1 == count($res)) {
28 | $_SESSION['usr'] = $usr;
29 | $_SESSION['usr_login_time'] = time();
30 |
31 | $this->redirect("index.html");
32 | } else {
33 | $this->display('login');
34 | }
35 | } else {
36 | $this->display('login');
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/app/control/indexController.php:
--------------------------------------------------------------------------------
1 | field('blog.bid, title, alias, tags, author, isTop, sort, status, isComment, blog.createAt, classify.name classifyname')->table('blog')
18 | ->join('blog2classify', array('bid' => 'bid'))
19 | ->join('classify', 'blog2classify.cid = classify.cid')
20 | ->order('bid', 'desc')->select();
21 | $this->assign('blog_list', $blog_list);
22 | $this->assign('blogStatus', array(11 => '公开', 22 => '草稿', 88 => '审核', 99 => '禁止'));
23 | $this->display('blist');
24 | }
25 |
26 | public function addblog() {
27 | $this->display('addblog');
28 | }
29 |
30 | public function classify() {
31 | $this->display('classify');
32 | }
33 |
34 | public function tags() {
35 | $this->display('tags');
36 | }
37 |
38 | public function loginout() {
39 | session_destroy();
40 | $this->redirect("index.html");
41 | }
42 | }
--------------------------------------------------------------------------------
/app/view/addblog.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 我的博客
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
109 |
163 |
164 |
165 |
234 |
235 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
272 |
273 |
280 |
281 |
282 |
283 |
284 |
--------------------------------------------------------------------------------
/app/view/assets/img/app-header-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/app-header-bg.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/backdrop/micro_carbon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/backdrop/micro_carbon.png
--------------------------------------------------------------------------------
/app/view/assets/img/backdrop/tactile_noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/backdrop/tactile_noise.png
--------------------------------------------------------------------------------
/app/view/assets/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/bg.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/bg/picjumbo.com_HNCK3558.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/bg/picjumbo.com_HNCK3558.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/contact-us-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/contact-us-bg.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/profile/picjumbo.com_HNCK4153_resize.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/profile/picjumbo.com_HNCK4153_resize.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/profile/profile-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/profile/profile-1.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/screenshots/dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/screenshots/dashboard.png
--------------------------------------------------------------------------------
/app/view/assets/img/screenshots/landing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/screenshots/landing.png
--------------------------------------------------------------------------------
/app/view/assets/img/screenshots/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/screenshots/login.png
--------------------------------------------------------------------------------
/app/view/assets/img/screenshots/theming.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/screenshots/theming.png
--------------------------------------------------------------------------------
/app/view/assets/img/thumbnails/picjumbo.com_HNCK4737.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/thumbnails/picjumbo.com_HNCK4737.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/thumbnails/picjumbo.com_IMG_3241.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/thumbnails/picjumbo.com_IMG_3241.jpg
--------------------------------------------------------------------------------
/app/view/assets/img/thumbnails/picjumbo.com_IMG_4566.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/img/thumbnails/picjumbo.com_IMG_4566.jpg
--------------------------------------------------------------------------------
/app/view/assets/js/alert.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | var HtmlMode, editor;
3 | HtmlMode = ace.require("ace/mode/html").Mode;
4 | editor = ace.edit("code-preview-alert");
5 | editor.getSession().setMode(new HtmlMode());
6 | return editor.setTheme("ace/theme/github");
7 | });
8 |
--------------------------------------------------------------------------------
/app/view/assets/js/app.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | $(".navbar-expand-toggle").click(function() {
3 | $(".app-container").toggleClass("expanded");
4 | return $(".navbar-expand-toggle").toggleClass("fa-rotate-90");
5 | });
6 | return $(".navbar-right-expand-toggle").click(function() {
7 | $(".navbar-right").toggleClass("expanded");
8 | return $(".navbar-right-expand-toggle").toggleClass("fa-rotate-90");
9 | });
10 | });
11 |
12 | $(function() {
13 | return $('select').select2();
14 | });
15 |
16 | $(function() {
17 | return $('.toggle-checkbox').bootstrapSwitch({
18 | size: "small"
19 | });
20 | });
21 |
22 | $(function() {
23 | return $('.match-height').matchHeight();
24 | });
25 |
26 | $(function() {
27 | return $('.datatable').DataTable({
28 | "dom": '<"top"fl<"clear">>rt<"bottom"ip<"clear">>'
29 | });
30 | });
31 |
32 | $(function() {
33 | return $(".side-menu .nav .dropdown").on('show.bs.collapse', function() {
34 | return $(".side-menu .nav .dropdown .collapse").collapse('hide');
35 | });
36 | });
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/view/assets/js/button.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | var HtmlMode, editor;
3 | HtmlMode = ace.require("ace/mode/html").Mode;
4 | editor = ace.edit("code-preview-button");
5 | editor.getSession().setMode(new HtmlMode());
6 | editor.setTheme("ace/theme/github");
7 | editor = ace.edit("code-preview-button-group");
8 | editor.getSession().setMode(new HtmlMode());
9 | editor.setTheme("ace/theme/github");
10 | editor = ace.edit("code-preview-button-dropdown");
11 | editor.getSession().setMode(new HtmlMode());
12 | return editor.setTheme("ace/theme/github");
13 | });
14 |
--------------------------------------------------------------------------------
/app/view/assets/js/card.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | var HtmlMode, editor;
3 | HtmlMode = ace.require("ace/mode/html").Mode;
4 | editor = ace.edit("code-preview-card");
5 | editor.getSession().setMode(new HtmlMode());
6 | editor.setTheme("ace/theme/github");
7 | editor = ace.edit("code-preview-card-profile");
8 | editor.getSession().setMode(new HtmlMode());
9 | editor.setTheme("ace/theme/github");
10 | editor = ace.edit("code-preview-card-banner");
11 | editor.getSession().setMode(new HtmlMode());
12 | editor.setTheme("ace/theme/github");
13 | editor = ace.edit("code-preview-card-jumbotron");
14 | editor.getSession().setMode(new HtmlMode());
15 | return editor.setTheme("ace/theme/github");
16 | });
17 |
--------------------------------------------------------------------------------
/app/view/assets/js/chartjs.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | var ctx, data, myLineChart, options;
3 | Chart.defaults.global.responsive = true;
4 | ctx = $('#line-chart').get(0).getContext('2d');
5 | options = {
6 | scaleShowGridLines: true,
7 | scaleGridLineColor: "rgba(0,0,0,.05)",
8 | scaleGridLineWidth: 1,
9 | scaleShowHorizontalLines: true,
10 | scaleShowVerticalLines: true,
11 | bezierCurve: false,
12 | bezierCurveTension: 0.4,
13 | pointDot: true,
14 | pointDotRadius: 4,
15 | pointDotStrokeWidth: 1,
16 | pointHitDetectionRadius: 20,
17 | datasetStroke: true,
18 | datasetStrokeWidth: 2,
19 | datasetFill: true,
20 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
21 | };
22 | data = {
23 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
24 | datasets: [
25 | {
26 | label: "My First dataset",
27 | fillColor: "rgba(26, 188, 156,0.2)",
28 | strokeColor: "#1ABC9C",
29 | pointColor: "#1ABC9C",
30 | pointStrokeColor: "#fff",
31 | pointHighlightFill: "#fff",
32 | pointHighlightStroke: "#1ABC9C",
33 | data: [65, 59, 80, 81, 56, 55, 40]
34 | }, {
35 | label: "My Second dataset",
36 | fillColor: "rgba(34, 167, 240,0.2)",
37 | strokeColor: "#22A7F0",
38 | pointColor: "#22A7F0",
39 | pointStrokeColor: "#fff",
40 | pointHighlightFill: "#fff",
41 | pointHighlightStroke: "#22A7F0",
42 | data: [28, 48, 40, 19, 86, 27, 90]
43 | }
44 | ]
45 | };
46 | myLineChart = new Chart(ctx).Line(data, options);
47 | });
48 |
49 | $(function() {
50 | var ctx, data, myBarChart, option_bars;
51 | Chart.defaults.global.responsive = true;
52 | ctx = $('#bar-chart').get(0).getContext('2d');
53 | option_bars = {
54 | scaleBeginAtZero: true,
55 | scaleShowGridLines: true,
56 | scaleGridLineColor: "rgba(0,0,0,.05)",
57 | scaleGridLineWidth: 1,
58 | scaleShowHorizontalLines: true,
59 | scaleShowVerticalLines: false,
60 | barShowStroke: true,
61 | barStrokeWidth: 1,
62 | barValueSpacing: 5,
63 | barDatasetSpacing: 3,
64 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
65 | };
66 | data = {
67 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
68 | datasets: [
69 | {
70 | label: "My First dataset",
71 | fillColor: "rgba(26, 188, 156,0.6)",
72 | strokeColor: "#1ABC9C",
73 | pointColor: "#1ABC9C",
74 | pointStrokeColor: "#fff",
75 | pointHighlightFill: "#fff",
76 | pointHighlightStroke: "#1ABC9C",
77 | data: [65, 59, 80, 81, 56, 55, 40]
78 | }, {
79 | label: "My Second dataset",
80 | fillColor: "rgba(34, 167, 240,0.6)",
81 | strokeColor: "#22A7F0",
82 | pointColor: "#22A7F0",
83 | pointStrokeColor: "#fff",
84 | pointHighlightFill: "#fff",
85 | pointHighlightStroke: "#22A7F0",
86 | data: [28, 48, 40, 19, 86, 27, 90]
87 | }
88 | ]
89 | };
90 | myBarChart = new Chart(ctx).Bar(data, option_bars);
91 | });
92 |
93 | $(function() {
94 | var ctx, data, myBarChart, option_bars;
95 | Chart.defaults.global.responsive = true;
96 | ctx = $('#radar-chart').get(0).getContext('2d');
97 | option_bars = {
98 | scaleBeginAtZero: true,
99 | scaleShowGridLines: true,
100 | scaleGridLineColor: "rgba(0,0,0,.05)",
101 | scaleGridLineWidth: 1,
102 | scaleShowHorizontalLines: true,
103 | scaleShowVerticalLines: false,
104 | barShowStroke: false,
105 | barStrokeWidth: 0,
106 | barValueSpacing: 5,
107 | barDatasetSpacing: 1,
108 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
109 | };
110 | data = {
111 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
112 | datasets: [
113 | {
114 | label: "My First dataset",
115 | fillColor: "rgba(26, 188, 156,0.2)",
116 | strokeColor: "#1ABC9C",
117 | pointColor: "#1ABC9C",
118 | pointStrokeColor: "#fff",
119 | pointHighlightFill: "#fff",
120 | pointHighlightStroke: "#1ABC9C",
121 | data: [65, 59, 80, 81, 56, 55, 40]
122 | }, {
123 | label: "My Second dataset",
124 | fillColor: "rgba(34, 167, 240,0.2)",
125 | strokeColor: "#22A7F0",
126 | pointColor: "#22A7F0",
127 | pointStrokeColor: "#fff",
128 | pointHighlightFill: "#fff",
129 | pointHighlightStroke: "#22A7F0",
130 | data: [28, 48, 40, 19, 86, 27, 90]
131 | }
132 | ]
133 | };
134 | myBarChart = new Chart(ctx).Radar(data, option_bars);
135 | });
136 |
137 | $(function() {
138 | var ctx, data, myPolarAreaChart, option_bars;
139 | Chart.defaults.global.responsive = true;
140 | ctx = $('#polar-area-chart').get(0).getContext('2d');
141 | option_bars = {
142 | scaleShowLabelBackdrop: true,
143 | scaleBackdropColor: "rgba(255,255,255,0.75)",
144 | scaleBeginAtZero: true,
145 | scaleBackdropPaddingY: 2,
146 | scaleBackdropPaddingX: 2,
147 | scaleShowLine: true,
148 | segmentShowStroke: true,
149 | segmentStrokeColor: "#fff",
150 | segmentStrokeWidth: 2,
151 | animationSteps: 100,
152 | animationEasing: "easeOutBounce",
153 | animateRotate: true,
154 | animateScale: false,
155 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(segments[i].label){%><%=segments[i].label%><%}%>
<%}%>
"
156 | };
157 | data = [
158 | {
159 | value: 300,
160 | color: "#FA2A00",
161 | highlight: "#FA2A00",
162 | label: "Red"
163 | }, {
164 | value: 50,
165 | color: "#1ABC9C",
166 | highlight: "#1ABC9C",
167 | label: "Green"
168 | }, {
169 | value: 100,
170 | color: "#FABE28",
171 | highlight: "#FABE28",
172 | label: "Yellow"
173 | }, {
174 | value: 40,
175 | color: "#999",
176 | highlight: "#999",
177 | label: "Grey"
178 | }, {
179 | value: 120,
180 | color: "#22A7F0",
181 | highlight: "#22A7F0",
182 | label: "Blue"
183 | }
184 | ];
185 | myPolarAreaChart = new Chart(ctx).PolarArea(data, option_bars);
186 | });
187 |
188 | $(function() {
189 | var ctx, data, myLineChart, options;
190 | Chart.defaults.global.responsive = true;
191 | ctx = $('#pie-chart').get(0).getContext('2d');
192 | options = {
193 | showScale: false,
194 | scaleShowGridLines: false,
195 | scaleGridLineColor: "rgba(0,0,0,.05)",
196 | scaleGridLineWidth: 0,
197 | scaleShowHorizontalLines: false,
198 | scaleShowVerticalLines: false,
199 | bezierCurve: false,
200 | bezierCurveTension: 0.4,
201 | pointDot: false,
202 | pointDotRadius: 0,
203 | pointDotStrokeWidth: 2,
204 | pointHitDetectionRadius: 20,
205 | datasetStroke: true,
206 | datasetStrokeWidth: 4,
207 | datasetFill: true,
208 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
209 | };
210 | data = [
211 | {
212 | value: 300,
213 | color: "#FA2A00",
214 | highlight: "#FA2A00",
215 | label: "Red"
216 | }, {
217 | value: 50,
218 | color: "#1ABC9C",
219 | highlight: "#1ABC9C",
220 | label: "Green"
221 | }, {
222 | value: 100,
223 | color: "#FABE28",
224 | highlight: "#FABE28",
225 | label: "Yellow"
226 | }
227 | ];
228 | myLineChart = new Chart(ctx).Pie(data, options);
229 | });
230 |
231 | $(function() {
232 | var ctx, data, myLineChart, options;
233 | Chart.defaults.global.responsive = true;
234 | ctx = $('#jumbotron-line-chart').get(0).getContext('2d');
235 | options = {
236 | showScale: false,
237 | scaleShowGridLines: true,
238 | scaleGridLineColor: "rgba(0,0,0,.05)",
239 | scaleGridLineWidth: 1,
240 | scaleShowHorizontalLines: true,
241 | scaleShowVerticalLines: true,
242 | bezierCurve: false,
243 | bezierCurveTension: 0.4,
244 | pointDot: true,
245 | pointDotRadius: 4,
246 | pointDotStrokeWidth: 1,
247 | pointHitDetectionRadius: 20,
248 | datasetStroke: true,
249 | datasetStrokeWidth: 2,
250 | datasetFill: true,
251 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
252 | };
253 | data = {
254 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
255 | datasets: [
256 | {
257 | label: "My Second dataset",
258 | fillColor: "rgba(34, 167, 240,0.2)",
259 | strokeColor: "#22A7F0",
260 | pointColor: "#22A7F0",
261 | pointStrokeColor: "#fff",
262 | pointHighlightFill: "#fff",
263 | pointHighlightStroke: "#22A7F0",
264 | data: [28, 48, 40, 45, 76, 65, 90]
265 | }
266 | ]
267 | };
268 | myLineChart = new Chart(ctx).Line(data, options);
269 | });
270 |
--------------------------------------------------------------------------------
/app/view/assets/js/index.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | $('.sort').change(function (){
3 | $.ajax({
4 | url: 'msort.html',
5 | type: 'post',
6 | async: true,
7 | data: {
8 | bid: $(this).attr('data-id'),
9 | sort: $(this).val()
10 | },
11 | dataType: 'json',
12 | timeout: 3000,
13 | success: function(data) {
14 |
15 | },
16 | error: function(data) {
17 |
18 | },
19 | complete: function() {
20 |
21 | }
22 | });
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/app/view/assets/js/list.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | $(function() {
3 | var HtmlMode, editor;
4 | HtmlMode = ace.require("ace/mode/html").Mode;
5 | editor = ace.edit("code-preview-list");
6 | editor.getSession().setMode(new HtmlMode());
7 | editor.setTheme("ace/theme/github");
8 | });
9 |
10 | }).call(this);
11 |
--------------------------------------------------------------------------------
/app/view/assets/js/modal.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | $(function() {
3 | var HtmlMode, editor;
4 | HtmlMode = ace.require("ace/mode/html").Mode;
5 | editor = ace.edit("code-preview-modal");
6 | editor.getSession().setMode(new HtmlMode());
7 | editor.setTheme("ace/theme/github");
8 | });
9 |
10 | }).call(this);
11 |
--------------------------------------------------------------------------------
/app/view/assets/js/theming.js:
--------------------------------------------------------------------------------
1 | $("input:radio[name=radio-navbar]").bind("click", function() {
2 | var value;
3 | value = $(this).val();
4 | if (value === "default") {
5 | return $("#navbar").addClass("navbar-default").removeClass("navbar-inverse");
6 | } else if (value === "inverse") {
7 | return $("#navbar").removeClass("navbar-default").addClass("navbar-inverse");
8 | }
9 | });
10 |
11 | $("input:radio[name=radio-sidebar]").bind("click", function() {
12 | var value;
13 | value = $(this).val();
14 | if (value === "default") {
15 | return $("#sidebar").removeClass("sidebar-inverse");
16 | } else if (value === "inverse") {
17 | return $("#sidebar").addClass("sidebar-inverse");
18 | }
19 | });
20 |
21 | $("input:radio[name=radio-color]").bind("click", function() {
22 | var value;
23 | value = $(this).val();
24 | if (value === "blue") {
25 | return $("body").removeClass("flat-green").addClass("flat-blue");
26 | } else if (value === "green") {
27 | return $("body").removeClass("flat-blue").addClass("flat-green");
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/app/view/assets/lib/css/bootstrap-switch.min.css:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * bootstrap-switch - v3.3.2
3 | * http://www.bootstrap-switch.org
4 | * ========================================================================
5 | * Copyright 2012-2013 Mattia Larentis
6 | *
7 | * ========================================================================
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================================================
20 | */
21 |
22 | .bootstrap-switch{display:inline-block;direction:ltr;cursor:pointer;border-radius:4px;border:1px solid;border-color:#ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;z-index:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bootstrap-switch .bootstrap-switch-container{display:inline-block;top:0;border-radius:4px;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block !important;height:100%;padding:6px 12px;font-size:14px;line-height:20px}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off{text-align:center;z-index:1}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary{color:#fff;background:#428bca}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info{color:#fff;background:#5bc0de}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success{color:#fff;background:#5cb85c}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning{background:#f0ad4e;color:#fff}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger{color:#fff;background:#d9534f}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default{color:#000;background:#eee}.bootstrap-switch .bootstrap-switch-label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;color:#333;background:#fff}.bootstrap-switch .bootstrap-switch-handle-on{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch .bootstrap-switch-handle-off{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch input[type='radio'],.bootstrap-switch input[type='checkbox']{position:absolute !important;top:0;left:0;opacity:0;filter:alpha(opacity=0);z-index:-1}.bootstrap-switch input[type='radio'].form-control,.bootstrap-switch input[type='checkbox'].form-control{height:auto}.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label{padding:1px 5px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label{padding:5px 10px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label{padding:6px 16px;font-size:18px;line-height:1.33}.bootstrap-switch.bootstrap-switch-disabled,.bootstrap-switch.bootstrap-switch-readonly,.bootstrap-switch.bootstrap-switch-indeterminate{cursor:default !important}.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label{opacity:.5;filter:alpha(opacity=50);cursor:default !important}.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container{-webkit-transition:margin-left .5s;transition:margin-left .5s}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on{border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off{border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch.bootstrap-switch-focused{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label{border-bottom-left-radius:3px;border-top-left-radius:3px}
--------------------------------------------------------------------------------
/app/view/assets/lib/css/checkbox3.min.css:
--------------------------------------------------------------------------------
1 | .checkbox3 label::before,.radio3 label::before{overflow:hidden;vertical-align:middle;text-align:center}.checkbox3 label,.radio3 label{white-space:nowrap;cursor:pointer}.checkbox3{position:relative}.checkbox3 input{position:absolute;left:-9999px}.checkbox3 label::after,.checkbox3 label::before{content:'';top:10px;bottom:10px;left:0;display:block}.checkbox3 label{display:block;position:relative;padding:11px 0 11px 30px;font-size:12px;margin-bottom:0;margin-top:-4px}.checkbox3 label::before{position:absolute;width:21px;height:21px;border:1px solid #CCC;-moz-border-radius:1px;border-radius:1px;-webkit-transition:background-color .2s;-moz-transition:background-color .2s;transition:background-color .2s}.checkbox3 label::after{position:absolute;width:19px;height:19px;border:12px solid #FFF;margin:1px;-webkit-transition:all 50ms;-moz-transition:all 50ms;transition:all 50ms;opacity:0}.checkbox3 input:checked+label::before{border-width:1px;border-style:solid;background-color:#444;border-color:#444;color:#fff}.checkbox3 input:checked+label::after{border:3px solid #FFF;opacity:1}.checkbox3.checkbox-sm label{padding:8px 0 8px 22px}.checkbox3.checkbox-sm label::before{width:14px;height:14px;line-height:14px}.checkbox3.checkbox-sm label::after{width:12px;height:12px}.checkbox3.checkbox-lg label{padding:15px 0 15px 40px}.checkbox3.checkbox-lg label::before{width:28px;height:27px;line-height:24px}.checkbox3.checkbox-lg label::after{width:26px;height:25px}.checkbox3.checkbox-inline,.radio3.radio-inline{padding-top:0;padding-left:0;padding-right:0;margin-left:0;margin-right:20px}.checkbox3.checkbox-inline input[type=checkbox],.checkbox3.checkbox-inline input[type=radio],.radio3.radio-inline input[type=checkbox],.radio3.radio-inline input[type=radio]{position:absolute}.checkbox3.checkbox-check input:checked+label::after,.checkbox3.checkbox-check label::after{border:0}.checkbox3.checkbox-check label::after{content:"\f00c";font-family:FontAwesome;font-size:12px;color:#FFF;width:19px;height:20px;line-height:20px;vertical-align:middle;text-align:center;border-width:0}.checkbox3.checkbox-check.checkbox-sm label::after{font-size:9px;line-height:12px;width:12px}.checkbox3.checkbox-check.checkbox-lg label::after{font-size:16px;line-height:26px;width:26px}.checkbox3.checkbox-check.checkbox-light label::after{color:#444}.checkbox3.checkbox-circle label::after,.checkbox3.checkbox-circle label::before{-moz-border-radius:20px;border-radius:20px}.checkbox3.checkbox-round label::after,.checkbox3.checkbox-round label::before,.checkbox3.checkbox-s1 label::after,.checkbox3.checkbox-s1 label::before{-moz-border-radius:4px;border-radius:4px}.checkbox3.checkbox-light label::before{background-color:transparent}.checkbox3.checkbox-light input:checked+label::before{background-color:transparent;border-color:#444}.checkbox3.checkbox-info input:checked+label::before{background-color:#2caef5;border-color:#2caef5}.checkbox3.checkbox-primary input:checked+label::before{background-color:#4183d7;border-color:#4183d7}.checkbox3.checkbox-success input:checked+label::before{background-color:#36b846;border-color:#36b846}.checkbox3.checkbox-warning input:checked+label::before{background-color:#ff9c00;border-color:#ff9c00}.checkbox3.checkbox-danger input:checked+label::before{background-color:#e50011;border-color:#e50011}.checkbox3.checkbox-primary.checkbox-light input:checked+label::before{background-color:transparent;border-color:#4183d7}.checkbox3.checkbox-primary.checkbox-light input:checked+label::after{color:#4183d7}.checkbox3.checkbox-info.checkbox-light input:checked+label::before{background-color:transparent;border-color:#2caef5}.checkbox3.checkbox-info.checkbox-light input:checked+label::after{color:#2caef5}.checkbox3.checkbox-success.checkbox-light input:checked+label::before{background-color:transparent;border-color:#36b846}.checkbox3.checkbox-success.checkbox-light input:checked+label::after{color:#36b846}.checkbox3.checkbox-warning.checkbox-light input:checked+label::before{background-color:transparent;border-color:#ff9c00}.checkbox3.checkbox-warning.checkbox-light input:checked+label::after{color:#ff9c00}.checkbox3.checkbox-danger.checkbox-light input:checked+label::before{background-color:transparent;border-color:#e50011}.checkbox3.checkbox-danger.checkbox-light input:checked+label::after{color:#e50011}.radio3{position:relative}.radio3 input{position:absolute;left:-9999px}.radio3 label{display:block;position:relative;padding:11px 0 11px 30px;font-size:12px;margin-bottom:0;margin-top:-4px}.radio3 label::after,.radio3 label::before{content:'';display:block;position:absolute;top:10px;bottom:10px;left:0}.radio3 label::before{width:21px;height:21px;border:1px solid #CCC;-webkit-transition:background-color .2s;-moz-transition:background-color .2s;transition:background-color .2s}.radio3 label::after{width:19px;height:19px;border:12px solid #FFF;margin:1px;-webkit-transition:all 50ms;-moz-transition:all 50ms;transition:all 50ms;opacity:0}.radio3 input:checked+label::before{font-family:FontAwesome;border-width:1px;border-style:solid;background-color:#444;border-color:#444;color:#fff}.radio3 input:checked+label::after{border:3px solid #FFF;opacity:1}.radio3.radio-check label::after,.radio3.radio-check.radio-light label::after{content:"\f00c";font-family:FontAwesome;color:#FFF;width:19px;height:20px;line-height:20px;vertical-align:middle;text-align:center;border-width:0}.radio3 label::after,.radio3 label::before{-moz-border-radius:20px;border-radius:20px}.radio3.radio-check input:checked+label::after{border-width:0}.radio3.radio-check.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-check.radio-light input:checked+label::after{border-width:0;color:#444}.radio3.radio-sm label{padding:8px 0 8px 22px}.radio3.radio-sm label::before{width:14px;height:14px;line-height:14px}.radio3.radio-sm label::after{width:12px;height:12px}.radio3.radio-lg label{padding:15px 0 15px 40px}.radio3.radio-lg label::before{width:28px;height:27px;line-height:24px}.radio3.radio-lg label::after{width:26px;height:25px}.radio3.radio-check.radio-sm label::after{font-size:9px;line-height:12px;width:12px}.radio3.radio-check.radio-lg label::after{font-size:16px;line-height:26px;width:26px}.radio3.radio-primary input:checked+label::before{background-color:#4183d7;border-color:#4183d7}.radio3.radio-info input:checked+label::before{background-color:#2caef5;border-color:#2caef5}.radio3.radio-success input:checked+label::before{background-color:#36b846;border-color:#36b846}.radio3.radio-warning input:checked+label::before{background-color:#ff9c00;border-color:#ff9c00}.radio3.radio-danger input:checked+label::before{background-color:#e50011;border-color:#e50011}.radio3.radio-primary.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-primary.radio-light input:checked+label::after{color:#4183d7}.radio3.radio-info.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-info.radio-light input:checked+label::after{color:#2caef5}.radio3.radio-success.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-success.radio-light input:checked+label::after{color:#36b846}.radio3.radio-warning.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-warning.radio-light input:checked+label::after{color:#ff9c00}.radio3.radio-danger.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-danger.radio-light input:checked+label::after{color:#e50011}
--------------------------------------------------------------------------------
/app/view/assets/lib/css/dataTables.bootstrap.css:
--------------------------------------------------------------------------------
1 | table.dataTable {
2 | clear: both;
3 | margin-top: 6px !important;
4 | margin-bottom: 6px !important;
5 | max-width: none !important;
6 | }
7 | table.dataTable td,
8 | table.dataTable th {
9 | -webkit-box-sizing: content-box;
10 | -moz-box-sizing: content-box;
11 | box-sizing: content-box;
12 | }
13 | table.dataTable td.dataTables_empty,
14 | table.dataTable th.dataTables_empty {
15 | text-align: center;
16 | }
17 | table.dataTable.nowrap th,
18 | table.dataTable.nowrap td {
19 | white-space: nowrap;
20 | }
21 |
22 | div.dataTables_wrapper div.dataTables_length label {
23 | font-weight: normal;
24 | text-align: left;
25 | white-space: nowrap;
26 | }
27 | div.dataTables_wrapper div.dataTables_length select {
28 | width: 75px;
29 | display: inline-block;
30 | }
31 | div.dataTables_wrapper div.dataTables_filter {
32 | text-align: right;
33 | }
34 | div.dataTables_wrapper div.dataTables_filter label {
35 | font-weight: normal;
36 | white-space: nowrap;
37 | text-align: left;
38 | }
39 | div.dataTables_wrapper div.dataTables_filter input {
40 | margin-left: 0.5em;
41 | display: inline-block;
42 | width: auto;
43 | }
44 | div.dataTables_wrapper div.dataTables_info {
45 | padding-top: 8px;
46 | white-space: nowrap;
47 | }
48 | div.dataTables_wrapper div.dataTables_paginate {
49 | margin: 0;
50 | white-space: nowrap;
51 | text-align: right;
52 | }
53 | div.dataTables_wrapper div.dataTables_paginate ul.pagination {
54 | margin: 2px 0;
55 | white-space: nowrap;
56 | }
57 | div.dataTables_wrapper div.dataTables_processing {
58 | position: absolute;
59 | top: 50%;
60 | left: 50%;
61 | width: 200px;
62 | margin-left: -100px;
63 | margin-top: -26px;
64 | text-align: center;
65 | padding: 1em 0;
66 | }
67 |
68 | table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
69 | table.dataTable thead > tr > td.sorting_asc,
70 | table.dataTable thead > tr > td.sorting_desc,
71 | table.dataTable thead > tr > td.sorting {
72 | padding-right: 30px;
73 | }
74 | table.dataTable thead > tr > th:active,
75 | table.dataTable thead > tr > td:active {
76 | outline: none;
77 | }
78 | table.dataTable thead .sorting,
79 | table.dataTable thead .sorting_asc,
80 | table.dataTable thead .sorting_desc,
81 | table.dataTable thead .sorting_asc_disabled,
82 | table.dataTable thead .sorting_desc_disabled {
83 | cursor: pointer;
84 | position: relative;
85 | }
86 | table.dataTable thead .sorting:after,
87 | table.dataTable thead .sorting_asc:after,
88 | table.dataTable thead .sorting_desc:after,
89 | table.dataTable thead .sorting_asc_disabled:after,
90 | table.dataTable thead .sorting_desc_disabled:after {
91 | position: absolute;
92 | bottom: 8px;
93 | right: 8px;
94 | display: block;
95 | font-family: 'Glyphicons Halflings';
96 | opacity: 0.5;
97 | }
98 | table.dataTable thead .sorting:after {
99 | opacity: 0.2;
100 | content: "\e150";
101 | /* sort */
102 | }
103 | table.dataTable thead .sorting_asc:after {
104 | content: "\e155";
105 | /* sort-by-attributes */
106 | }
107 | table.dataTable thead .sorting_desc:after {
108 | content: "\e156";
109 | /* sort-by-attributes-alt */
110 | }
111 | table.dataTable thead .sorting_asc_disabled:after,
112 | table.dataTable thead .sorting_desc_disabled:after {
113 | color: #eee;
114 | }
115 |
116 | div.dataTables_scrollHead table.dataTable {
117 | margin-bottom: 0 !important;
118 | }
119 |
120 | div.dataTables_scrollBody table {
121 | border-top: none;
122 | margin-top: 0 !important;
123 | margin-bottom: 0 !important;
124 | }
125 | div.dataTables_scrollBody table thead .sorting:after,
126 | div.dataTables_scrollBody table thead .sorting_asc:after,
127 | div.dataTables_scrollBody table thead .sorting_desc:after {
128 | display: none;
129 | }
130 | div.dataTables_scrollBody table tbody tr:first-child th,
131 | div.dataTables_scrollBody table tbody tr:first-child td {
132 | border-top: none;
133 | }
134 |
135 | div.dataTables_scrollFoot table {
136 | margin-top: 0 !important;
137 | border-top: none;
138 | }
139 |
140 | @media screen and (max-width: 767px) {
141 | div.dataTables_wrapper div.dataTables_length,
142 | div.dataTables_wrapper div.dataTables_filter,
143 | div.dataTables_wrapper div.dataTables_info,
144 | div.dataTables_wrapper div.dataTables_paginate {
145 | text-align: center;
146 | }
147 | }
148 | table.dataTable.table-condensed > thead > tr > th {
149 | padding-right: 20px;
150 | }
151 | table.dataTable.table-condensed .sorting:after,
152 | table.dataTable.table-condensed .sorting_asc:after,
153 | table.dataTable.table-condensed .sorting_desc:after {
154 | top: 6px;
155 | right: 6px;
156 | }
157 |
158 | table.table-bordered.dataTable {
159 | border-collapse: separate !important;
160 | }
161 | table.table-bordered.dataTable th,
162 | table.table-bordered.dataTable td {
163 | border-left-width: 0;
164 | }
165 | table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
166 | table.table-bordered.dataTable td:last-child,
167 | table.table-bordered.dataTable td:last-child {
168 | border-right-width: 0;
169 | }
170 | table.table-bordered.dataTable tbody th,
171 | table.table-bordered.dataTable tbody td {
172 | border-bottom-width: 0;
173 | }
174 |
175 | div.dataTables_scrollHead table.table-bordered {
176 | border-bottom-width: 0;
177 | }
178 |
179 | div.table-responsive > div.dataTables_wrapper > div.row {
180 | margin: 0;
181 | }
182 | div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
183 | padding-left: 0;
184 | }
185 | div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
186 | padding-right: 0;
187 | }
188 |
--------------------------------------------------------------------------------
/app/view/assets/lib/css/jquery.dataTables.min.css:
--------------------------------------------------------------------------------
1 | table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{cursor:pointer;*cursor:hand}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table,.dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}}
2 |
--------------------------------------------------------------------------------
/app/view/assets/lib/css/select2.min.css:
--------------------------------------------------------------------------------
1 | .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
2 |
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/app/view/assets/lib/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zheng-Shaozhuo/php_frame/59b431ce00254910ffb1e44129680b3c02fb5a40/app/view/assets/lib/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/app/view/assets/lib/js/ace/theme-github.js:
--------------------------------------------------------------------------------
1 | define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
2 |
3 | exports.isDark = false;
4 | exports.cssClass = "ace-github";
5 | exports.cssText = "\
6 | .ace-github .ace_gutter {\
7 | background: #e8e8e8;\
8 | color: #AAA;\
9 | }\
10 | .ace-github {\
11 | background: #fff;\
12 | color: #000;\
13 | }\
14 | .ace-github .ace_keyword {\
15 | font-weight: bold;\
16 | }\
17 | .ace-github .ace_string {\
18 | color: #D14;\
19 | }\
20 | .ace-github .ace_variable.ace_class {\
21 | color: teal;\
22 | }\
23 | .ace-github .ace_constant.ace_numeric {\
24 | color: #099;\
25 | }\
26 | .ace-github .ace_constant.ace_buildin {\
27 | color: #0086B3;\
28 | }\
29 | .ace-github .ace_support.ace_function {\
30 | color: #0086B3;\
31 | }\
32 | .ace-github .ace_comment {\
33 | color: #998;\
34 | font-style: italic;\
35 | }\
36 | .ace-github .ace_variable.ace_language {\
37 | color: #0086B3;\
38 | }\
39 | .ace-github .ace_paren {\
40 | font-weight: bold;\
41 | }\
42 | .ace-github .ace_boolean {\
43 | font-weight: bold;\
44 | }\
45 | .ace-github .ace_string.ace_regexp {\
46 | color: #009926;\
47 | font-weight: normal;\
48 | }\
49 | .ace-github .ace_variable.ace_instance {\
50 | color: teal;\
51 | }\
52 | .ace-github .ace_constant.ace_language {\
53 | font-weight: bold;\
54 | }\
55 | .ace-github .ace_cursor {\
56 | color: black;\
57 | }\
58 | .ace-github.ace_focus .ace_marker-layer .ace_active-line {\
59 | background: rgb(255, 255, 204);\
60 | }\
61 | .ace-github .ace_marker-layer .ace_active-line {\
62 | background: rgb(245, 245, 245);\
63 | }\
64 | .ace-github .ace_marker-layer .ace_selection {\
65 | background: rgb(181, 213, 255);\
66 | }\
67 | .ace-github.ace_multiselect .ace_selection.ace_start {\
68 | box-shadow: 0 0 3px 0px white;\
69 | }\
70 | .ace-github.ace_nobold .ace_line > span {\
71 | font-weight: normal !important;\
72 | }\
73 | .ace-github .ace_marker-layer .ace_step {\
74 | background: rgb(252, 255, 0);\
75 | }\
76 | .ace-github .ace_marker-layer .ace_stack {\
77 | background: rgb(164, 229, 101);\
78 | }\
79 | .ace-github .ace_marker-layer .ace_bracket {\
80 | margin: -1px 0 0 -1px;\
81 | border: 1px solid rgb(192, 192, 192);\
82 | }\
83 | .ace-github .ace_gutter-active-line {\
84 | background-color : rgba(0, 0, 0, 0.07);\
85 | }\
86 | .ace-github .ace_marker-layer .ace_selected-word {\
87 | background: rgb(250, 250, 255);\
88 | border: 1px solid rgb(200, 200, 250);\
89 | }\
90 | .ace-github .ace_invisible {\
91 | color: #BFBFBF\
92 | }\
93 | .ace-github .ace_print-margin {\
94 | width: 1px;\
95 | background: #e8e8e8;\
96 | }\
97 | .ace-github .ace_indent-guide {\
98 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
99 | }";
100 |
101 | var dom = require("../lib/dom");
102 | dom.importCssString(exports.cssText, exports.cssClass);
103 | });
104 |
--------------------------------------------------------------------------------
/app/view/assets/lib/js/bootstrap-switch.min.js:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * bootstrap-switch - v3.3.2
3 | * http://www.bootstrap-switch.org
4 | * ========================================================================
5 | * Copyright 2012-2013 Mattia Larentis
6 | *
7 | * ========================================================================
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================================================
20 | */
21 |
22 | (function(){var t=[].slice;!function(e,i){"use strict";var n;return n=function(){function t(t,i){null==i&&(i={}),this.$element=e(t),this.options=e.extend({},e.fn.bootstrapSwitch.defaults,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")},i),this.$wrapper=e("",{"class":function(t){return function(){var e;return e=[""+t.options.baseClass].concat(t._getClasses(t.options.wrapperClass)),e.push(t.options.state?""+t.options.baseClass+"-on":""+t.options.baseClass+"-off"),null!=t.options.size&&e.push(""+t.options.baseClass+"-"+t.options.size),t.options.disabled&&e.push(""+t.options.baseClass+"-disabled"),t.options.readonly&&e.push(""+t.options.baseClass+"-readonly"),t.options.indeterminate&&e.push(""+t.options.baseClass+"-indeterminate"),t.options.inverse&&e.push(""+t.options.baseClass+"-inverse"),t.$element.attr("id")&&e.push(""+t.options.baseClass+"-id-"+t.$element.attr("id")),e.join(" ")}}(this)()}),this.$container=e("
",{"class":""+this.options.baseClass+"-container"}),this.$on=e("
",{html:this.options.onText,"class":""+this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor}),this.$off=e("",{html:this.options.offText,"class":""+this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor}),this.$label=e("",{html:this.options.labelText,"class":""+this.options.baseClass+"-label"}),this.$element.on("init.bootstrapSwitch",function(e){return function(){return e.options.onInit.apply(t,arguments)}}(this)),this.$element.on("switchChange.bootstrapSwitch",function(e){return function(){return e.options.onSwitchChange.apply(t,arguments)}}(this)),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch")}return t.prototype._constructor=t,t.prototype.state=function(t,e){return"undefined"==typeof t?this.options.state:this.options.disabled||this.options.readonly?this.$element:this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.options.indeterminate&&this.indeterminate(!1),t=!!t,this.$element.prop("checked",t).trigger("change.bootstrapSwitch",e),this.$element)},t.prototype.toggleState=function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)},t.prototype.size=function(t){return"undefined"==typeof t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(""+this.options.baseClass+"-"+this.options.size),t&&this.$wrapper.addClass(""+this.options.baseClass+"-"+t),this._width(),this._containerPosition(),this.options.size=t,this.$element)},t.prototype.animate=function(t){return"undefined"==typeof t?this.options.animate:(t=!!t,t===this.options.animate?this.$element:this.toggleAnimate())},t.prototype.toggleAnimate=function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(""+this.options.baseClass+"-animate"),this.$element},t.prototype.disabled=function(t){return"undefined"==typeof t?this.options.disabled:(t=!!t,t===this.options.disabled?this.$element:this.toggleDisabled())},t.prototype.toggleDisabled=function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(""+this.options.baseClass+"-disabled"),this.$element},t.prototype.readonly=function(t){return"undefined"==typeof t?this.options.readonly:(t=!!t,t===this.options.readonly?this.$element:this.toggleReadonly())},t.prototype.toggleReadonly=function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(""+this.options.baseClass+"-readonly"),this.$element},t.prototype.indeterminate=function(t){return"undefined"==typeof t?this.options.indeterminate:(t=!!t,t===this.options.indeterminate?this.$element:this.toggleIndeterminate())},t.prototype.toggleIndeterminate=function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(""+this.options.baseClass+"-indeterminate"),this._containerPosition(),this.$element},t.prototype.inverse=function(t){return"undefined"==typeof t?this.options.inverse:(t=!!t,t===this.options.inverse?this.$element:this.toggleInverse())},t.prototype.toggleInverse=function(){var t,e;return this.$wrapper.toggleClass(""+this.options.baseClass+"-inverse"),e=this.$on.clone(!0),t=this.$off.clone(!0),this.$on.replaceWith(t),this.$off.replaceWith(e),this.$on=t,this.$off=e,this.options.inverse=!this.options.inverse,this.$element},t.prototype.onColor=function(t){var e;return e=this.options.onColor,"undefined"==typeof t?e:(null!=e&&this.$on.removeClass(""+this.options.baseClass+"-"+e),this.$on.addClass(""+this.options.baseClass+"-"+t),this.options.onColor=t,this.$element)},t.prototype.offColor=function(t){var e;return e=this.options.offColor,"undefined"==typeof t?e:(null!=e&&this.$off.removeClass(""+this.options.baseClass+"-"+e),this.$off.addClass(""+this.options.baseClass+"-"+t),this.options.offColor=t,this.$element)},t.prototype.onText=function(t){return"undefined"==typeof t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)},t.prototype.offText=function(t){return"undefined"==typeof t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)},t.prototype.labelText=function(t){return"undefined"==typeof t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)},t.prototype.handleWidth=function(t){return"undefined"==typeof t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.labelWidth=function(t){return"undefined"==typeof t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.baseClass=function(){return this.options.baseClass},t.prototype.wrapperClass=function(t){return"undefined"==typeof t?this.options.wrapperClass:(t||(t=e.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)},t.prototype.radioAllOff=function(t){return"undefined"==typeof t?this.options.radioAllOff:(t=!!t,t===this.options.radioAllOff?this.$element:(this.options.radioAllOff=t,this.$element))},t.prototype.onInit=function(t){return"undefined"==typeof t?this.options.onInit:(t||(t=e.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=t,this.$element)},t.prototype.onSwitchChange=function(t){return"undefined"==typeof t?this.options.onSwitchChange:(t||(t=e.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=t,this.$element)},t.prototype.destroy=function(){var t;return t=this.$element.closest("form"),t.length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element},t.prototype._width=function(){var t,e;return t=this.$on.add(this.$off),t.add(this.$label).css("width",""),e="auto"===this.options.handleWidth?Math.max(this.$on.width(),this.$off.width()):this.options.handleWidth,t.width(e),this.$label.width(function(t){return function(i,n){return"auto"!==t.options.labelWidth?t.options.labelWidth:e>n?e:n}}(this)),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)},t.prototype._containerPosition=function(t,e){return null==t&&(t=this.options.state),this.$container.css("margin-left",function(e){return function(){var i;return i=[0,"-"+e._handleWidth+"px"],e.options.indeterminate?"-"+e._handleWidth/2+"px":t?e.options.inverse?i[1]:i[0]:e.options.inverse?i[0]:i[1]}}(this)),e?setTimeout(function(){return e()},50):void 0},t.prototype._init=function(){var t,e;return t=function(t){return function(){return t._width(),t._containerPosition(null,function(){return t.options.animate?t.$wrapper.addClass(""+t.options.baseClass+"-animate"):void 0})}}(this),this.$wrapper.is(":visible")?t():e=i.setInterval(function(n){return function(){return n.$wrapper.is(":visible")?(t(),i.clearInterval(e)):void 0}}(this),50)},t.prototype._elementHandlers=function(){return this.$element.on({"change.bootstrapSwitch":function(t){return function(i,n){var o;return i.preventDefault(),i.stopImmediatePropagation(),o=t.$element.is(":checked"),t._containerPosition(o),o!==t.options.state?(t.options.state=o,t.$wrapper.toggleClass(""+t.options.baseClass+"-off").toggleClass(""+t.options.baseClass+"-on"),n?void 0:(t.$element.is(":radio")&&e("[name='"+t.$element.attr("name")+"']").not(t.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),t.$element.trigger("switchChange.bootstrapSwitch",[o]))):void 0}}(this),"focus.bootstrapSwitch":function(t){return function(e){return e.preventDefault(),t.$wrapper.addClass(""+t.options.baseClass+"-focused")}}(this),"blur.bootstrapSwitch":function(t){return function(e){return e.preventDefault(),t.$wrapper.removeClass(""+t.options.baseClass+"-focused")}}(this),"keydown.bootstrapSwitch":function(t){return function(e){if(e.which&&!t.options.disabled&&!t.options.readonly)switch(e.which){case 37:return e.preventDefault(),e.stopImmediatePropagation(),t.state(!1);case 39:return e.preventDefault(),e.stopImmediatePropagation(),t.state(!0)}}}(this)})},t.prototype._handleHandlers=function(){return this.$on.on("click.bootstrapSwitch",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}}(this)),this.$off.on("click.bootstrapSwitch",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")}}(this))},t.prototype._labelHandlers=function(){return this.$label.on({"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(t){return function(e){return t._dragStart||t.options.disabled||t.options.readonly?void 0:(e.preventDefault(),e.stopPropagation(),t._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(t.$container.css("margin-left"),10),t.options.animate&&t.$wrapper.removeClass(""+t.options.baseClass+"-animate"),t.$element.trigger("focus.bootstrapSwitch"))}}(this),"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(t){return function(e){var i;if(null!=t._dragStart&&(e.preventDefault(),i=(e.pageX||e.originalEvent.touches[0].pageX)-t._dragStart,!(i<-t._handleWidth||i>0)))return t._dragEnd=i,t.$container.css("margin-left",""+t._dragEnd+"px")}}(this),"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(t){return function(e){var i;if(t._dragStart)return e.preventDefault(),t.options.animate&&t.$wrapper.addClass(""+t.options.baseClass+"-animate"),t._dragEnd?(i=t._dragEnd>-(t._handleWidth/2),t._dragEnd=!1,t.state(t.options.inverse?!i:i)):t.state(!t.options.state),t._dragStart=!1}}(this),"mouseleave.bootstrapSwitch":function(t){return function(){return t.$label.trigger("mouseup.bootstrapSwitch")}}(this)})},t.prototype._externalLabelHandler=function(){var t;return t=this.$element.closest("label"),t.on("click",function(e){return function(i){return i.preventDefault(),i.stopImmediatePropagation(),i.target===t[0]?e.toggleState():void 0}}(this))},t.prototype._formHandler=function(){var t;return t=this.$element.closest("form"),t.data("bootstrap-switch")?void 0:t.on("reset.bootstrapSwitch",function(){return i.setTimeout(function(){return t.find("input").filter(function(){return e(this).data("bootstrap-switch")}).each(function(){return e(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)},t.prototype._getClasses=function(t){var i,n,o,s;if(!e.isArray(t))return[""+this.options.baseClass+"-"+t];for(n=[],o=0,s=t.length;s>o;o++)i=t[o],n.push(""+this.options.baseClass+"-"+i);return n},t}(),e.fn.bootstrapSwitch=function(){var i,o,s;return o=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],s=this,this.each(function(){var t,a;return t=e(this),a=t.data("bootstrap-switch"),a||t.data("bootstrap-switch",a=new n(this,o)),"string"==typeof o?s=a[o].apply(a,i):void 0}),s},e.fn.bootstrapSwitch.Constructor=n,e.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:" ",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}(window.jQuery,window)}).call(this);
--------------------------------------------------------------------------------
/app/view/assets/lib/js/dataTables.bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | DataTables Bootstrap 3 integration
3 | ©2011-2015 SpryMedia Ltd - datatables.net/license
4 | */
5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,e){a||(a=window);if(!e||!e.fn.dataTable)e=require("datatables.net")(a,e).$;return b(e,a,a.document)}:b(jQuery,window,document)})(function(b,a,e){var d=b.fn.dataTable;b.extend(!0,d.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(d.ext.classes,
6 | {sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});d.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new d.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},f,g,p=0,q=function(d,e){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};
7 | l=0;for(h=e.length;l",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#",
8 | "aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(f)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(e.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};d.TableTools&&(b.extend(!0,d.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",
9 | buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,d.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}));return d});
10 |
--------------------------------------------------------------------------------
/app/view/assets/lib/js/jquery.matchHeight-min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * jquery.matchHeight-min.js master
3 | * http://brm.io/jquery-match-height/
4 | * License: MIT
5 | */
6 | (function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight=
7 | function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this);
8 | a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b="inline-block"===a.css("display")?"inline-block":"block";a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b),f=0;if(d.target)f=
9 | d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b={display:"inline-block"===a.css("display")?"inline-block":"block"};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))),a.css(d.property,
10 | f-b))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements,
11 | this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1},b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery);
--------------------------------------------------------------------------------
/app/view/blist.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 我的博客
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
111 |
165 |
166 |
167 |
241 |
242 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
--------------------------------------------------------------------------------
/app/view/classify.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 我的博客
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
108 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
176 |
177 |
178 |
179 |
180 | # |
181 | First Name |
182 | Last Name |
183 | Username |
184 |
185 |
186 |
187 |
188 | 1 |
189 | Mark |
190 | Otto |
191 | @mdo |
192 |
193 |
194 | 2 |
195 | Jacob |
196 | Thornton |
197 | @fat |
198 |
199 |
200 | 3 |
201 | Larry |
202 | the Bird |
203 | @twitter |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
--------------------------------------------------------------------------------
/app/view/index/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | View demo
6 |
7 |
8 | This is a view file.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/view/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 用户登录
5 |
6 |
7 |
8 |
9 |
10 |
11 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/app/view/tags.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 我的博客
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
108 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
176 |
177 |
178 |
179 |
180 | # |
181 | First Name |
182 | Last Name |
183 | Username |
184 |
185 |
186 |
187 |
188 | 1 |
189 | Mark |
190 | Otto |
191 | @mdo |
192 |
193 |
194 | 2 |
195 | Jacob |
196 | Thornton |
197 | @fat |
198 |
199 |
200 | 3 |
201 | Larry |
202 | the Bird |
203 | @twitter |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
--------------------------------------------------------------------------------
/config/commom.config.php:
--------------------------------------------------------------------------------
1 | 'app',
16 | // 应用调试模式
17 | 'app_debug' => false,
18 | // 应用Trace
19 | 'app_trace' => false,
20 | // 应用模式状态
21 | 'app_status' => '',
22 | // 是否支持多模块
23 | 'app_multi_module' => true,
24 | // 入口自动绑定模块
25 | 'auto_bind_module' => false,
26 | // 注册的根命名空间
27 | 'root_namespace' => array(),
28 | // 扩展函数文件
29 | 'extra_file_list' => array(THINK_PATH . 'helper' . EXT),
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' => false,
42 | // 默认全局过滤方法 用逗号分隔多个
43 | 'default_filter' => '',
44 | // 默认语言
45 | 'default_lang' => 'zh-cn',
46 | // 应用类库后缀
47 | 'class_suffix' => false,
48 | // 控制器类后缀
49 | 'controller_suffix' => false,
50 |
51 | // +----------------------------------------------------------------------
52 | // | 模块设置
53 | // +----------------------------------------------------------------------
54 |
55 | // 默认模块名
56 | 'default_module' => 'index',
57 | // 禁止访问模块
58 | 'deny_module_list' => array('common'),
59 | // 默认控制器名
60 | 'default_controller' => 'Index',
61 | // 默认操作名
62 | 'default_action' => 'index',
63 | // 默认验证器
64 | 'default_validate' => '',
65 | // 默认的空控制器名
66 | 'empty_controller' => 'Error',
67 | // 操作方法后缀
68 | 'action_suffix' => '',
69 | // 自动搜索控制器
70 | 'controller_auto_search' => false,
71 |
72 | // +----------------------------------------------------------------------
73 | // | URL设置
74 | // +----------------------------------------------------------------------
75 |
76 | // PATHINFO变量名 用于兼容模式
77 | 'var_pathinfo' => 's',
78 | // 兼容PATH_INFO获取
79 | 'pathinfo_fetch' => array('ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'),
80 | // pathinfo分隔符
81 | 'pathinfo_depr' => '/',
82 | // URL伪静态后缀
83 | 'url_html_suffix' => 'html',
84 | // URL普通方式参数 用于自动生成
85 | 'url_common_param' => false,
86 | // URL参数方式 0 按名称成对解析 1 按顺序解析
87 | 'url_param_type' => 0,
88 | // 是否开启路由
89 | 'url_route_on' => true,
90 | // 路由使用完整匹配
91 | 'route_complete_match' => false,
92 | // 路由配置文件(支持配置多个)
93 | 'route_config_file' => array('route'),
94 | // 是否强制使用路由
95 | 'url_route_must' => false,
96 | // 域名部署
97 | 'url_domain_deploy' => false,
98 | // 域名根,如thinkphp.cn
99 | 'url_domain_root' => '',
100 | // 是否自动转换URL中的控制器和操作名
101 | 'url_convert' => true,
102 | // 默认的访问控制器层
103 | 'url_controller_layer' => 'controller',
104 | // 表单请求类型伪装变量
105 | 'var_method' => '_method',
106 | // 表单ajax伪装变量
107 | 'var_ajax' => '_ajax',
108 | // 表单pjax伪装变量
109 | 'var_pjax' => '_pjax',
110 | // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
111 | 'request_cache' => false,
112 | // 请求缓存有效期
113 | 'request_cache_expire' => null,
114 | // 全局请求缓存排除规则
115 | 'request_cache_except' => array(),
116 |
117 | // +----------------------------------------------------------------------
118 | // | 模板设置
119 | // +----------------------------------------------------------------------
120 |
121 | 'template' => array(
122 | // 模板引擎类型 支持 php think 支持扩展
123 | 'type' => 'Think',
124 | // 模板路径
125 | 'view_path' => '',
126 | // 模板后缀
127 | 'view_suffix' => 'html',
128 | // 模板文件名分隔符
129 | 'view_depr' => DS,
130 | // 模板引擎普通标签开始标记
131 | 'tpl_begin' => '{',
132 | // 模板引擎普通标签结束标记
133 | 'tpl_end' => '}',
134 | // 标签库标签开始标记
135 | 'taglib_begin' => '{',
136 | // 标签库标签结束标记
137 | 'taglib_end' => '}',
138 | ),
139 |
140 | // 视图输出字符串内容替换
141 | 'view_replace_str' => array(),
142 | // 默认跳转页面对应的模板文件
143 | 'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
144 | 'dispatch_error_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
145 |
146 | // +----------------------------------------------------------------------
147 | // | 异常及错误设置
148 | // +----------------------------------------------------------------------
149 |
150 | // 异常页面的模板文件
151 | 'exception_tmpl' => THINK_PATH . 'tpl' . DS . 'think_exception.tpl',
152 |
153 | // 错误显示信息,非调试模式有效
154 | 'error_message' => '页面错误!请稍后再试~',
155 | // 显示错误信息
156 | 'show_error_msg' => false,
157 | // 异常处理handle类 留空使用 \think\exception\Handle
158 | 'exception_handle' => '',
159 |
160 | // +----------------------------------------------------------------------
161 | // | 日志设置
162 | // +----------------------------------------------------------------------
163 |
164 | 'log' => array(
165 | // 日志记录方式,内置 file socket 支持扩展
166 | 'type' => 'File',
167 | // 日志保存目录
168 | 'path' => LOG_PATH,
169 | // 日志记录级别
170 | 'level' => array(),
171 | ),
172 |
173 | // +----------------------------------------------------------------------
174 | // | Trace设置 开启 app_trace 后 有效
175 | // +----------------------------------------------------------------------
176 | 'trace' => array(
177 | // 内置Html Console 支持扩展
178 | 'type' => 'Html',
179 | ),
180 |
181 | // +----------------------------------------------------------------------
182 | // | 缓存设置
183 | // +----------------------------------------------------------------------
184 |
185 | 'cache' => array(
186 | // 驱动方式
187 | 'type' => 'File',
188 | // 缓存保存目录
189 | 'path' => CACHE_PATH,
190 | // 缓存前缀
191 | 'prefix' => '',
192 | // 缓存有效期 0表示永久缓存
193 | 'expire' => 0,
194 | ),
195 |
196 | // +----------------------------------------------------------------------
197 | // | 会话设置
198 | // +----------------------------------------------------------------------
199 |
200 | 'session' => array(
201 | 'id' => '',
202 | // SESSION_ID的提交变量,解决flash上传跨域
203 | 'var_session_id' => '',
204 | // SESSION 前缀
205 | 'prefix' => 'think',
206 | // 驱动方式 支持redis memcache memcached
207 | 'type' => '',
208 | // 是否自动开启 SESSION
209 | 'auto_start' => true,
210 | ),
211 |
212 | // +----------------------------------------------------------------------
213 | // | Cookie设置
214 | // +----------------------------------------------------------------------
215 | 'cookie' => array(
216 | // cookie 名称前缀
217 | 'prefix' => '',
218 | // cookie 保存时间
219 | 'expire' => 0,
220 | // cookie 保存路径
221 | 'path' => '/',
222 | // cookie 有效域名
223 | 'domain' => '',
224 | // cookie 启用安全传输
225 | 'secure' => false,
226 | // httponly设置
227 | 'httponly' => '',
228 | // 是否使用 setcookie
229 | 'setcookie' => true,
230 | ),
231 |
232 | //分页配置
233 | 'paginate' => array(
234 | 'type' => 'bootstrap',
235 | 'var_page' => 'page',
236 | 'list_rows' => 15,
237 | ),
238 | );
239 |
--------------------------------------------------------------------------------
/config/db.config.php:
--------------------------------------------------------------------------------
1 | 'mysql',
11 | // 服务器地址
12 | 'hostname' => '127.0.0.1',
13 | // 数据库名
14 | 'database' => 'vgambler',
15 | // 用户名
16 | 'username' => 'root',
17 | // 密码
18 | 'password' => 'dnmall',
19 | // 端口
20 | 'hostport' => '',
21 | // 连接dsn
22 | 'dsn' => '',
23 | // 数据库连接参数
24 | 'params' => [],
25 | // 数据库编码默认采用utf8
26 | 'charset' => 'utf8',
27 | // 数据库表前缀
28 | 'prefix' => '',
29 | // 数据库调试模式
30 | 'debug' => true,
31 | // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
32 | 'deploy' => 0,
33 | // 数据库读写是否分离 主从式有效
34 | 'rw_separate' => false,
35 | // 读写分离后 主服务器数量
36 | 'master_num' => 1,
37 | // 指定从服务器序号
38 | 'slave_no' => '',
39 | // 是否严格检查字段是否存在
40 | 'fields_strict' => true,
41 | // 数据集返回类型
42 | 'resultset_type' => 'array',
43 | // 自动写入时间戳字段
44 | 'auto_timestamp' => false,
45 | // 时间字段取出后的默认时间格式
46 | 'datetime_format' => 'Y-m-d H:i:s',
47 | // 是否需要进行SQL性能分析
48 | 'sql_explain' => false,
49 | );
--------------------------------------------------------------------------------
/core/Controller.php:
--------------------------------------------------------------------------------
1 | init();
16 | }
17 |
18 | public function assign($name, $value)
19 | {
20 | $this->assign[$name] = $value;
21 | }
22 |
23 | public function display($file)
24 | {
25 | $path = ROOT . MODULE . '/view/' . $file . '.html';
26 | if (is_file($path))
27 | {
28 | extract($this->assign);
29 | include $path;
30 | }
31 | }
32 |
33 | private function init() {
34 | session_start();
35 | }
36 |
37 | protected function redirect($url) {
38 | header('Location:' . HU . '/' . $url);
39 | }
40 |
41 | protected function post($name = '', $default = null, $filter = '') {
42 | $_post = $_POST;
43 |
44 | return empty($_post[$name]) ? $default : $_post[$name];
45 | }
46 |
47 | protected function get($name = '', $default = null, $filter = '') {
48 | $_get = $_GET;
49 |
50 | return empty($_get[$name]) ? $default : $_get[$name];
51 | }
52 |
53 | protected function input($key = '', $default = null, $filter = '') {
54 | if (0 === strpos($key, '?')) {
55 | $key = substr($key, 1);
56 | $has = true;
57 | }
58 |
59 | if ($pos = strpos($key, '.')) {
60 | // 指定参数来源
61 | list($method, $key) = explode('.', $key, 2);
62 | if (!in_array($method, ['get', 'post', 'put', 'patch', 'delete', 'route', 'param', 'request', 'session', 'cookie', 'server', 'env', 'path', 'file'])) {
63 | $key = $method . '.' . $key;
64 | $method = 'param';
65 | }
66 | } else {
67 | // 默认为自动判断
68 | $method = 'param';
69 | }
70 | }
71 |
72 | protected function showMsg($url, $msg = '操作成功', $isSuccess = true) {
73 |
74 | }
75 |
76 | protected function goBackMsg($msg) {
77 |
78 | }
79 | }
--------------------------------------------------------------------------------
/core/common/config.inc.php:
--------------------------------------------------------------------------------
1 | $row){
35 | if($columnKeyIsNumber) {
36 | $tmp= array_slice($row, $columnKey, 1);
37 | $tmp= (is_array($tmp) && !empty($tmp))?current($tmp):null;
38 | }
39 | else {
40 | $tmp= isset($row[$columnKey]) ? $row[$columnKey] : null;
41 | }
42 |
43 | if(!$indexKeyIsNull){
44 | if($indexKeyIsNumber){
45 | $key = array_slice($row, $indexKey, 1);
46 | $key = (is_array($key) && !empty($key))?current($key):null;
47 | $key = is_null($key)?0:$key;
48 | }else{
49 | $key = isset($row[$indexKey]) ? $row[$indexKey] : 0;
50 | }
51 | }
52 | $result[$key] = $tmp;
53 | }
54 | return $result;
55 | }else{
56 | return array_column($array, $columnKey, $indexKey);
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/core/frame.php:
--------------------------------------------------------------------------------
1 | control, $route->action);
22 |
23 | }
24 |
25 | public static function runAction($control, $action)
26 | {
27 | $control = ucfirst(strtolower($control));
28 | $path = str_replace('\\', DIRECTORY_SEPARATOR, ROOT . '/' . MODULE . '/control/' . $control . 'Controller.php');
29 | if (is_file($path))
30 | {
31 | include $path;
32 | $class = '\\' . MODULE . '\control\\' . $control . 'Controller';
33 | $obj = new $class();
34 |
35 | $extension = String::getFileExtension($action);
36 | $action = isset($extension) ? str_replace(".$extension", null, $action) : $action;
37 | $obj->$action();
38 | }
39 | else
40 | {
41 | throw new \Exception('Control: ' . $control . ', Action: ' . $action . ' is not found');
42 | }
43 | }
44 |
45 | static function func_autoload($class)
46 | {
47 | if (isset(self::$classMap[$class])){
48 | return true;
49 | }
50 |
51 | $path = ROOT . $class . '.php';
52 | $class = str_replace('\\', '/', $class);
53 | if (false != strpos($class, 'core') >= 0) {
54 | if (false != strpos($class, 'common')) {
55 | $path = ROOT . $class . '.inc.php';
56 | }
57 | }
58 |
59 | if (is_file($path)) {
60 | include $path;
61 | self::$classMap[$class] = $class;
62 | } else{
63 | return false;
64 | }
65 | return false;
66 | }
67 | }
--------------------------------------------------------------------------------
/core/lib/DbMysqli.php:
--------------------------------------------------------------------------------
1 | getConn();
19 | if ($_dbConn['flag']) {
20 | self::$_dbInstance = $_dbConn['conn'];
21 | if (!mysqli_set_charset(self::$_dbInstance, $this->_charset)) {
22 | $this->_errno = mysqli_errno(self::$_dbInstance);
23 | $this->_error = mysqli_error(self::$_dbInstance);
24 | }
25 | } else {
26 | $this->_error = $_dbConn['error'];
27 | $this->_errno = $_dbConn['errno'];
28 | self::$_dbInstance = null;
29 | }
30 | }
31 | }
32 |
33 | /*
34 | * 获取链接
35 | */
36 | protected function getConn() {
37 | $conn = mysqli_connect($this->_host, $this->_user, $this->_pass, $this->_dbname);
38 | if (!$conn) {
39 | return array('conn' => null, 'flag' => false, 'errno' => mysqli_connect_errno(), 'error' => mysqli_connect_error());
40 | }
41 | return array('conn' => $conn, 'flag' => true, 'errno' => -1, 'error' => '');
42 | }
43 |
44 | /*
45 | * 选择数据库
46 | */
47 | public function database($dbname) {
48 | if (mysqli_select_db(self::$_dbInstance, $dbname)) {
49 | $this->_dbname = $dbname;
50 | }
51 | return $this;
52 | }
53 |
54 | /*
55 | * 数据库用户更换
56 | */
57 | public function db_changeUser($user, $pass) {
58 | if (mysqli_change_user(self::$_dbInstance, $user, $pass, $this->_dbname)) {
59 | $this->_user = $user;
60 | $this->_pass = $pass;
61 | }
62 | return $this;
63 | }
64 |
65 | /*
66 | * 事务开始
67 | */
68 | public function startTrans() {
69 | return mysqli_begin_transaction(self::$_dbInstance);
70 | }
71 |
72 | /*
73 | * 事务提交
74 | */
75 | public function commitTrans() {
76 | return mysqli_commit(self::$_dbInstance);
77 | }
78 |
79 | /*
80 | * 事务回退
81 | */
82 | public function rollbackTrans() {
83 | return mysqli_rollback(self::$_dbInstance);
84 | }
85 |
86 | /*
87 | * SQL查询
88 | */
89 | public function query($sql, $type = 'all', $resultmode = MYSQLI_STORE_RESULT) {
90 | $res = null;
91 | if (is_string($sql)) {
92 | $this->_lastquery = $sql;
93 |
94 | $querys = mysqli_query(self::$_dbInstance, $sql, $resultmode);
95 | if ($querys) {
96 | if ('all' == $type) {
97 | if ($querys instanceof \mysqli_result) {
98 | while ($row = $querys->fetch_assoc()) {
99 | $res[] = $row;
100 | }
101 | } else {
102 | $res = array();
103 | }
104 | } else if ('single' == $type) {
105 | if ($querys instanceof \mysqli_result) {
106 | $res = $querys->fetch_assoc();
107 | } else {
108 | $res = array();
109 | }
110 | } else if ('count' == $type) {
111 | $res = $querys->num_rows;
112 | } else {
113 | $res = array();
114 | }
115 |
116 | $mysqli_result_codes = array('select', 'show', 'describe', 'desc', 'explain');
117 | $sql_type = strtolower(explode(' ', $sql)[0]);
118 | if (in_array($sql_type, $mysqli_result_codes)) {
119 | mysqli_free_result($querys);
120 | }
121 | } else {
122 | $this->_errno = mysqli_errno(self::$_dbInstance);
123 | $this->_error = mysqli_error(self::$_dbInstance);
124 | }
125 |
126 | return $res;
127 | } else {
128 | $this->_errno = -1;
129 | $this->_error = 'query命令不合法, 为 [' . gettype($sql) . '] 类型, 请检查!';
130 | }
131 | return $res;
132 | }
133 |
134 | /*
135 | * SQL执行
136 | */
137 | public function exec($sql) {
138 | $flag = false;
139 | if ($stmt = mysqli_prepare(self::$_dbInstance, $sql)) {
140 | $flag = mysqli_stmt_execute($stmt);
141 | mysqli_stmt_close($stmt);
142 | }
143 | return $flag;
144 | }
145 |
146 | /*
147 | * 关闭连接
148 | */
149 | public function close() {
150 | return mysqli_close(self::$_dbInstance);
151 | }
152 |
153 | }
154 |
--------------------------------------------------------------------------------
/core/lib/DbPDO.php:
--------------------------------------------------------------------------------
1 | getConnParams($this->_host, $this->_dbname, $this->_charset, $this->_user, $this->_pass);
19 | if ($_dbConn['flag']) {
20 | self::$_dbInstance = $_dbConn['conn'];
21 | } else {
22 | $this->_error = $_dbConn['error'];
23 | $this->_errno = $_dbConn['errno'];
24 | self::$_dbInstance = null;
25 | }
26 | } else {
27 | if (self::$_dbInstance->inTransaction()) {
28 | $_dbConn = $this->getConnParams($this->_host, $this->_dbname, $this->_charset, $this->_user, $this->_pass);
29 | if ($_dbConn['flag']) {
30 | self::$_dbInstance = $_dbConn['conn'];
31 | } else {
32 | $this->_error = $_dbConn['error'];
33 | $this->_errno = $_dbConn['errno'];
34 | self::$_dbInstance = null;
35 | }
36 | }
37 | }
38 | }
39 |
40 | /*
41 | * 获取链接
42 | */
43 | protected function getConnParams($_host, $_dbname, $_charset, $_user, $_pass) {
44 | $dsn = 'mysql:host=' . $_host . ';dbname=' . $_dbname . ';charset=' . $_charset;
45 | try {
46 | $conn = new \PDO($dsn, $_user, $_pass);
47 | $conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
48 | } catch (\PDOException $e) {
49 | return array('conn' => null, 'flag' => false, 'errno' => $e->getCode(), 'error' => $e->getMessage());
50 | }
51 |
52 | return array('conn' => $conn, 'flag' => true, 'errno' => -1, 'error' => '');
53 | }
54 |
55 | /*
56 | * 选择数据库
57 | */
58 | public function database($dbname) {
59 | $_dbConn = $this->getConnParams($this->_host, $dbname, $this->_charset, $this->_user, $this->_pass);
60 | if ($_dbConn['flag']) {
61 | self::$_dbInstance = $_dbConn['conn'];
62 | $this->_dbname = $dbname;
63 | }
64 |
65 | return $this;
66 | }
67 |
68 | /*
69 | * 数据库用户更换
70 | */
71 | public function db_changeUser($user, $pass) {
72 | $_dbConn = $this->getConnParams($this->_host, $this->_dbname, $this->_charset, $user, $pass);
73 | if ($_dbConn['flag']) {
74 | self::$_dbInstance = $_dbConn['conn'];
75 | $this->_user = $user;
76 | $this->_pass = $pass;
77 | }
78 | return $this;
79 | }
80 |
81 | /*
82 | * 事务开始
83 | */
84 | public function startTrans() {
85 | return self::$_dbInstance->beginTransaction();
86 | }
87 |
88 | /*
89 | * 事务提交
90 | */
91 | public function commitTrans() {
92 | return self::$_dbInstance->commit();
93 | }
94 |
95 | /*
96 | * 事务回退
97 | */
98 | public function rollbackTrans() {
99 | return self::$_dbInstance->rollback();
100 | }
101 |
102 | /*
103 | * SQL查询
104 | */
105 | public function query($sql, $type = 'all', $resultmode = MYSQLI_STORE_RESULT) {
106 | $res = null;
107 | if (is_string($sql)) {
108 | $this->_lastquery = $sql;
109 | try {
110 | $stmt = self::$_dbInstance->prepare($sql);
111 | $stmt->execute();
112 |
113 | if ($stmt) {
114 | if ('all' == $type) {
115 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
116 | } else if ('single' == $type) {
117 | $res = $stmt->fetch(\PDO::FETCH_ASSOC);
118 | } else if ('count' == $type) {
119 | $res = $stmt->rowCount();
120 | } else {
121 | $res = array();
122 | }
123 |
124 | $stmt = null;
125 | } else {
126 | $res = array();
127 | }
128 | } catch (\PDOException $e) {
129 | $this->_errno = $e->getCode();
130 | $this->_error = $e->getMessage();
131 | }
132 |
133 | return $res;
134 | } else {
135 | $this->_errno = -1;
136 | $this->_error = 'query命令不合法, 为 [' . gettype($sql) . '] 类型, 请检查!';
137 | }
138 | return $res;
139 | }
140 |
141 | /*
142 | * SQL执行
143 | */
144 | public function exec($sql) {
145 | try {
146 | $stmt = self::$_dbInstance->prepare($sql);
147 | $stmt->execute();
148 | $res = $stmt->rowCount() > 0 ? true : false;
149 | $stmt = null;
150 | return $res;
151 | } catch (\PDOException $e) {
152 | $this->_errno = $e->getCode();
153 | $this->_error = $e->getMessage();
154 | return false;
155 | }
156 | }
157 |
158 | /*
159 | * 关闭连接
160 | */
161 | public function close() {
162 | self::$_dbInstance = null;
163 | }
164 |
165 | }
166 |
--------------------------------------------------------------------------------
/core/lib/Image.php:
--------------------------------------------------------------------------------
1 | strlen($str) ? str_repeat($str, ceil($len / strlen($str))) : $str;
32 | return substr(str_shuffle($str), 0, $len);
33 | }
34 |
35 | public static function getUniString() {
36 | return md5(uniqid(microtime(true), true));
37 | }
38 |
39 | public static function getFileExtension($filename) {
40 | $params = explode('.', $filename);
41 | if (2 == count($params)) {
42 | return strtolower(end($params));
43 | }
44 | return null;
45 | }
46 |
47 | public static function getFileNameRemoveExtension($filename) {
48 | $params = explode('.', $filename);
49 | if (2 == count($params)) {
50 | return strtolower(reset($params));
51 | }
52 | return null;
53 | }
54 |
55 | public static function getRewriteValue($param) {
56 | $params = explode('.', $param);
57 | if (2 == count($params)) {
58 | return substr(strtolower(reset($params)), 1);
59 | }
60 | return null;
61 | }
62 | }
--------------------------------------------------------------------------------
/core/lib/db.php:
--------------------------------------------------------------------------------
1 | _charset = $config['charset'];
49 | $this->_host = $config['hostname'];
50 | $this->_user = $config['username'];
51 | $this->_pass = $config['password'];
52 | $this->_dbname = $config['database'];
53 | $this->_port = $config['hostport'];
54 | $this->_tableprefix = $config['prefix'];
55 | } else {
56 | $this->_charset = $charset;
57 | $this->_host = $host;
58 | $this->_user = $user;
59 | $this->_pass = $pass;
60 | $this->_dbname = $dbname;
61 | $this->_port = $port;
62 | $this->_tableprefix = $prefix;
63 | }
64 | $this->_dsn = 'mysql:host=' . $this->_host . ';dbname=' . $this->_dbname;
65 | }
66 | }
67 |
68 | /*
69 | * 获取数据库链接
70 | */
71 | protected function getConn() {
72 | /* 子类实现 */
73 | }
74 |
75 | /*
76 | * 获取当前数据表名
77 | */
78 | public function getTable() {
79 | return $this->getFullTable($this->_table);
80 | }
81 |
82 | /*
83 | * 选择当前表
84 | */
85 | public function table($table) {
86 | $this->_table = $table;
87 | return $this;
88 | }
89 |
90 | /*
91 | * 获取完整表名
92 | */
93 | private function getFullTable($table) {
94 | return isset($this->_tableprefix) ? $this->_tableprefix . '_' . $table : $table;
95 | }
96 |
97 | /*
98 | * 获取当前数据库名
99 | */
100 | public function getDatabase() {
101 | return $this->_dbname;
102 | }
103 |
104 | /*
105 | * 选择数据库
106 | */
107 | public function database($dbname) {
108 | /* 子类实现 */
109 | }
110 |
111 | /*
112 | * 获取查询字段
113 | */
114 | public function getField() {
115 | if (empty($this->_datas['join'])) {
116 | return isset($this->_fields) ? $this->_fields : '*';
117 | } else {
118 | $fields = '*';
119 | if (isset($this->_fields)) {
120 | $params = explode(',', $this->_fields);
121 | $fields = implode(',', array_map(function($v) {
122 | $tps = explode('.', trim($v));
123 | if (2 == count($tps)) {
124 | return 'vg_' . $this->getFullTable($tps[0]) . '.' . $tps[1];
125 | }
126 | return $v;
127 | }, $params));
128 | }
129 | return $fields;
130 | }
131 | }
132 |
133 | /*
134 | * 设置查询字段
135 | */
136 | public function field($fields = '*') {
137 | $this->_fields = $fields;
138 | return $this;
139 | }
140 |
141 | /*
142 | * 返回错误信息
143 | */
144 | public function error() {
145 | return $this->_error;
146 | }
147 |
148 | /*
149 | * 返回错误编号
150 | */
151 | public function errno() {
152 | return $this->_errno;
153 | }
154 |
155 | /*
156 | * 回调方法, 初始化模型
157 | */
158 | protected function _initialize() {
159 | }
160 |
161 | /*
162 | * 设置数据对象值
163 | */
164 | public function __set($name, $value) {
165 | $this->_datas[$name] = $value;
166 | }
167 |
168 | /*
169 | * 获取数据对象值
170 | */
171 | public function __get($name) {
172 | return isset($this->_datas[$name]) ? $this->_datas[$name] : null;
173 | }
174 |
175 | /*
176 | * 检测数据对象值
177 | */
178 | public function __isset($name) {
179 | return isset($this->_datas[$name]);
180 | }
181 |
182 | /*
183 | * 销毁数据对象值
184 | */
185 | public function __unset($name) {
186 | unset($this->_datas[$name]);
187 | }
188 |
189 | /*
190 | * 解决类中不存在方法,待实现
191 | */
192 | public function __call($name, $arguments) {
193 | // TODO: Implement __call() method.
194 | }
195 |
196 | /*
197 | * 数据库用户更换
198 | */
199 | public function db_changeUser($user, $pass) {
200 | /* 子类实现 */
201 | }
202 |
203 | /*
204 | * 获取数据库中所有的表名
205 | */
206 | public function db_getTables() {
207 | $sql = 'show tables';
208 | return $this->query($sql);
209 | }
210 |
211 | /*
212 | * 获取指定表中所有信息
213 | */
214 | public function db_getTableDesc($table) {
215 | $sql = "desc $table";
216 | return $this->query($sql);
217 | }
218 |
219 | /*
220 | * 获取指定表的字段详情
221 | */
222 | public function db_selectTableFields($table) {
223 | $res = $this->db_getTableDesc($this->getFullTable($table));
224 | $fields = null;
225 | if (isset($res) && is_array($res)) {
226 | $fields = implode(',', Functions::vg_array_column($res, 'Field'));
227 | }
228 | return $fields;
229 | }
230 |
231 | /*
232 | * 查询表达式$option处理函数
233 | */
234 | protected function option() {
235 | $options = $this->_options;
236 | $option = '';
237 | if (isset($options['where'])) {
238 | $option .= 'where ' . $options['where'] . ' ';
239 | }
240 | if (isset($options['order'])) {
241 | $option .= 'order by ' . $options['order'] . ' ' . $options['order_type'] . ' ';
242 | }
243 | if (isset($options['limit'])) {
244 | $option .= 'limit ' . $options['limit'];
245 | }
246 | if (empty($this->_datas['join'])) {
247 | $this->_datas['join'] = '';
248 | }
249 | return $option;
250 | }
251 |
252 | /*
253 | * 传入参数处理
254 | */
255 | protected function param_handle($param) {
256 | if (is_string($param) && !empty($param)) {
257 | $params = explode(',', $param);
258 | } elseif (is_array($param) && !empty($param)) {
259 | $params = $param;
260 | } else {
261 | return false;
262 | }
263 | return $params;
264 | }
265 |
266 | /*
267 | * 表达式查询where处理函数
268 | */
269 | public function where($where) {
270 | $this->_options['where'] = self::options_handle($where);
271 | return $this;
272 | }
273 |
274 | /*
275 | * 表达式查询limit处理函数
276 | */
277 | public function limit($limit) {
278 | $this->_options['limit'] = self::options_handle($limit);
279 | return $this;
280 | }
281 |
282 | /*
283 | * 表达式查询order处理函数
284 | */
285 | public function order($order, $type = 'desc') {
286 | $this->_options['order'] = $order;
287 | $this->_options['order_type'] = $type;
288 | return $this;
289 | }
290 |
291 | /*
292 | * 表达式查询order处理函数
293 | */
294 | public function join($table, $on = null, $type = 'left') {
295 | $join_table = $this->getFullTable($table);
296 | $alias_join_table = 'vg_' . $join_table;
297 | $master_table = $this->getFullTable($this->_table);
298 | $alias_master_table = 'vg_' . $master_table;
299 | if (is_array($on)) {
300 | $arrOn = array();
301 | foreach ($on as $k => $v) {
302 | array_push($arrOn, $alias_master_table . ".$k = $alias_join_table.$v");
303 | }
304 | $ons = implode(' and ', $arrOn);
305 | } elseif (is_string($on)) {
306 | if (2 == substr_count($on, 'vg_')) {
307 | $ons = $on;
308 | } elseif (2 == count($params = explode('=', $on))) {
309 | $ons = 'vg_' . $this->getFullTable(trim($params[0])) . ' = ' . 'vg_' . $this->getFullTable(trim($params[1]));
310 | } else {
311 | $ons = '1 = 1';
312 | }
313 | } else {
314 | $ons = '1 = 1';
315 | }
316 | $joins = "$type join $join_table $alias_join_table on $ons";
317 | $this->_datas['join'] = isset($this->_datas['join']) ? $this->_datas['join'] . " $joins" : $alias_master_table . " $joins";
318 | return $this;
319 | }
320 |
321 | /*
322 | * 查询表达式参数处理函数
323 | */
324 | public function options_handle($param) {
325 | if (is_numeric($param)) {
326 | $option = $param;
327 | } elseif (is_string($param) && !empty($param) && !is_numeric($param)) {
328 | $params = explode(',', $param);
329 | $option = implode(' and ', $params);
330 | } elseif (is_array($param) && !empty($param)) {
331 | $arr = array();
332 |
333 | foreach ($param as $key => $value) {
334 | $tip = "$key = '$value'";
335 | array_push($arr, $tip);
336 | }
337 | $option = implode(' and ', $arr);
338 | } else {
339 | return false;
340 | }
341 | return $option;
342 | }
343 |
344 | /*
345 | * 根据查询表达式查询数据
346 | */
347 | public function find($table = null) {
348 | self::limit(1);
349 | return self::select($table)[0];
350 | }
351 |
352 | /*
353 | * 根据查询表达式查询数据
354 | */
355 | public function select($table = null) {
356 | if (isset($table)) {
357 | $this->_table = $table;
358 | }
359 |
360 | $option = self::option();
361 | $sql = 'select ' . $this->getField() .' from ' . $this->getTable() . ' ' . $this->_datas['join'] . ' ' . $option;
362 | return $this->query($sql);
363 | }
364 |
365 | /*
366 | * 数据处理函数
367 | */
368 | public function data($data = array()) {
369 | $values = array();
370 | $fields = array();
371 | $tip = 0;
372 | if (is_array($data) && isset($data)) {
373 | foreach ($data as $key => $value) {
374 | if (is_array($value)) {
375 | $tip = 1;
376 | array_push($values, '(' . implode(',', array_values($value)) . ')');
377 | array_push($fields, '(' . implode(',', array_keys($value)) . ')');
378 | } else {
379 | $tip = 0;
380 | }
381 | }
382 | } else {
383 | return false;
384 | }
385 |
386 | if (!$tip) {
387 | array_push($values, '(' . implode(',', array_values($data)) . ')');
388 | array_push($fields, '(' . implode(',', array_keys($data)) . ')');
389 | }
390 | $this->_datas['fields'] = $fields[0];
391 | $this->_datas['values'] = implode(',', $values);
392 | return $this;
393 | }
394 |
395 | /*
396 | * 数据新增
397 | */
398 | public function add() {
399 | $fields = $this->_datas['fields'];
400 | $values = $this->_datas['values'];
401 | $sql = 'insert into ' . $this->getTable() . $fields . ' values' . $values;
402 | return $this->query($sql);
403 | }
404 |
405 | /*
406 | * 数据更新
407 | */
408 | public function save($data = null) {
409 | $tip = array();
410 | $updates = '';
411 | if (is_array($data) && isset($data)) {
412 | foreach ($data as $key => $value) {
413 | array_push($tip, "$key = $value");
414 | }
415 | $updates = implode(',', $tip);
416 | } elseif (is_string($data) && false != strpos($data, '=')) {
417 | $updates = $data;
418 | } else {
419 | return false;
420 | }
421 |
422 | $sql = 'update ' . $this->getTable() . ' set ' . $updates . ' where ' . $this->_options['where'];
423 | return $this->exec($sql);
424 | }
425 |
426 | /*
427 | * 数据删除
428 | */
429 | public function delete() {
430 | $sql = 'delete from ' . $this->getTable() . ' where ' . $this->_options['where'];
431 | return $this->exec($sql);
432 | }
433 |
434 | /*
435 | * 事务开始
436 | */
437 | public function startTrans() {
438 | /* 子类实现 */
439 | }
440 |
441 | /*
442 | * 事务提交
443 | */
444 | public function commitTrans() {
445 | /* 子类实现 */
446 | }
447 |
448 | /*
449 | * 事务回退
450 | */
451 | public function rollbackTrans() {
452 | /* 子类实现 */
453 | }
454 |
455 | /*
456 | * SQL查询
457 | * $type all、single、count
458 | */
459 | public function query($sql) {
460 | /* 子类实现 */
461 | return null;
462 | }
463 |
464 | /*
465 | * SQL执行
466 | */
467 | public function exec($sql) {
468 | /* 子类实现 */
469 | return null;
470 | }
471 |
472 | /*
473 | * 关闭连接
474 | */
475 | public function close() {
476 | /* 子类实现 */
477 | }
478 |
479 | function __destruct() {
480 | // mysqli_close($this->_dbInstance);
481 | }
482 | }
483 |
--------------------------------------------------------------------------------
/core/lib/model.php:
--------------------------------------------------------------------------------
1 | getMessage());
27 | }
28 |
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/core/lib/route.php:
--------------------------------------------------------------------------------
1 | 0) {
20 | $uri = trim(str_replace('/index.php', null, $uri), '/');
21 | $params = explode('/', $uri);
22 |
23 | if (is_null($uri) || '' == $uri)
24 | {
25 | $this->control = 'index';
26 | $this->action = 'index';
27 | }
28 | else if (isset($params[0]))
29 | {
30 | $this->control = $params[0];
31 | unset($params[0]);
32 | if (isset($params[1]))
33 | {
34 | $this->action = $params[1];
35 | unset($params[1]);
36 | }
37 | else
38 | {
39 | $this->action = 'index';
40 | }
41 |
42 | $count = count($params);
43 | $i = 2;
44 | while ($i < $count)
45 | {
46 | if (isset($params[$i + 1]))
47 | {
48 | $_GET[$params[$i++]] = $params[$i++];
49 | }
50 | else
51 | {
52 | break;
53 | }
54 | }
55 | }
56 | } elseif (!strncasecmp('/index.php' . $_SERVER['REQUEST_URI'], $_SERVER['PHP_SELF'], strlen($_SERVER['PHP_SELF'])) && '/index.php' != $_SERVER['PHP_SELF']) {
57 | $routes = Config::RC('route', true);
58 | $target = $_SERVER['REQUEST_URI'];
59 | $res = $this->getRewriteParam($routes, $target);
60 | if ($res['state']) {
61 | $this->control = $res['control'];
62 | $this->action = $res['action'];
63 | }
64 | } else {
65 | $this->control = 'index';
66 | $this->action = 'index';
67 | }
68 | }
69 |
70 | private function getRewriteParam($routes, $target) {
71 | $state = true;
72 | $control = null;
73 | $action = null;
74 | if (empty($routes) || empty($target)) {
75 | return array('state' => $state, 'control' => $control, 'action' => $action);
76 | }
77 |
78 | $target = String::getRewriteValue($target);
79 | foreach ($routes as $k => $v) {
80 | if ($target == strtolower($k)) {
81 | foreach ($v as $tk => $tv) {
82 | if (0 == $tk) {
83 | $params = explode('/', $tv);
84 | if (2 == count($params)) {
85 | $control = $params[0];
86 | $action = $params[1];
87 | } else {
88 | $state = false;
89 | }
90 | } else {
91 | if (1 == count($tv)) {
92 | $key = array_keys($tv)[0];
93 | $value = array_values($tv)[0];
94 | switch (strtolower($key)) {
95 | case 'method':
96 | if ($_SERVER['REQUEST_METHOD'] != strtoupper($value)) {
97 | $state = false;
98 | }
99 | break;
100 | default:
101 | break;
102 | }
103 | }
104 | }
105 |
106 | if (!$state) {
107 | $control = null;
108 | $action = null;
109 | break;
110 | }
111 | }
112 | } else {
113 | continue;
114 | }
115 | }
116 | return array('state' => $state, 'control' => $control, 'action' => $action);
117 | }
118 | }
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |