dever 4 éve
commit
ab13a6ecc0
100 módosított fájl, 20851 hozzáadás és 0 törlés
  1. 14 0
      LICENSE
  2. 2 0
      README.md
  3. 26 0
      api/main.php
  4. 325 0
      assets/layadmin/html/console.html
  5. 64 0
      assets/layadmin/html/home.html
  6. 27 0
      assets/layadmin/html/inc/head.html
  7. 345 0
      assets/layadmin/html/inc/menu.html
  8. 87 0
      assets/layadmin/html/inc/nav.html
  9. 49 0
      assets/layadmin/html/inc/script.html
  10. 80 0
      assets/layadmin/html/login.html
  11. 154 0
      assets/layadmin/html/project/database/list.html
  12. 175 0
      assets/layadmin/html/project/database/update.html
  13. 325 0
      assets/layadmin_dever/html/console.html
  14. 64 0
      assets/layadmin_dever/html/home.html
  15. 27 0
      assets/layadmin_dever/html/inc/head.html
  16. 345 0
      assets/layadmin_dever/html/inc/menu.html
  17. 94 0
      assets/layadmin_dever/html/inc/nav.html
  18. 49 0
      assets/layadmin_dever/html/inc/script.html
  19. 80 0
      assets/layadmin_dever/html/login.html
  20. 145 0
      assets/layadmin_dever/html/project/database/list.html
  21. 173 0
      assets/layadmin_dever/html/project/database/update.html
  22. 1470 0
      assets/moltran/css/components.css
  23. 1397 0
      assets/moltran/css/core.css
  24. 3 0
      assets/moltran/css/demo.css
  25. 473 0
      assets/moltran/css/menu.css
  26. 763 0
      assets/moltran/css/pages.css
  27. 125 0
      assets/moltran/css/responsive.css
  28. 142 0
      assets/moltran/html/doc/view.html
  29. 23 0
      assets/moltran/html/example/foreach.html
  30. 27 0
      assets/moltran/html/example/render.html
  31. 136 0
      assets/moltran/html/home.html
  32. 19 0
      assets/moltran/html/inc/chat.html
  33. 5 0
      assets/moltran/html/inc/foot.html
  34. 47 0
      assets/moltran/html/inc/head.html
  35. 46 0
      assets/moltran/html/inc/menu.html
  36. 118 0
      assets/moltran/html/inc/nav.html
  37. 86 0
      assets/moltran/html/inc/script.html
  38. 199 0
      assets/moltran/html/list.html
  39. 44 0
      assets/moltran/html/list/photo.html
  40. 90 0
      assets/moltran/html/login.html
  41. 1 0
      assets/moltran/html/manage/test.html
  42. 28 0
      assets/moltran/html/map.html
  43. 59 0
      assets/moltran/html/notice.html
  44. 1 0
      assets/moltran/html/project/database/list.html
  45. 126 0
      assets/moltran/html/project/database/stat.html
  46. 155 0
      assets/moltran/html/project/database/update.html
  47. BIN
      assets/moltran/img/bg/bg.jpg
  48. BIN
      assets/moltran/img/users/avatar-1.jpg
  49. 3 0
      assets/moltran/js/demo.js
  50. 6 0
      assets/moltran/js/detect.js
  51. 841 0
      assets/moltran/js/fastclick.js
  52. 370 0
      assets/moltran/js/jquery.app.js
  53. 470 0
      assets/moltran/js/jquery.slimscroll.js
  54. 0 0
      assets/moltran/js/modernizr.min.js
  55. 337 0
      assets/moltran/js/waves.js
  56. 1 0
      assets/moltran/js/wow.min.js
  57. 16 0
      common.php
  58. 98 0
      config/base.php
  59. 28 0
      config/route.php
  60. 7 0
      daemon/loop.php
  61. 7 0
      daemon/main.php
  62. 619 0
      database/admin.php
  63. 106 0
      database/admin_role.php
  64. 190 0
      database/api.php
  65. 96 0
      database/api_request.php
  66. 96 0
      database/api_response.php
  67. 175 0
      database/auth.php
  68. 208 0
      database/config.php
  69. 174 0
      database/cron.php
  70. 121 0
      database/filter.php
  71. 99 0
      database/filter_task.php
  72. 106 0
      database/group.php
  73. 142 0
      database/log.php
  74. 358 0
      database/menu.php
  75. 120 0
      database/menu_group.php
  76. 154 0
      database/node.php
  77. 151 0
      database/notice.php
  78. 230 0
      database/opt.php
  79. 576 0
      database/role.php
  80. 68 0
      database/signature.php
  81. 157 0
      database/top.php
  82. 8 0
      index.php
  83. 3 0
      package.json
  84. 42 0
      page/list.php
  85. 440 0
      src/Api.php
  86. 830 0
      src/Auth.php
  87. 201 0
      src/Config.php
  88. 3529 0
      src/Database.php
  89. 358 0
      src/Doc.php
  90. 100 0
      src/Filter.php
  91. 82 0
      src/Filter/Bao10jie.php
  92. 40 0
      src/Filter/Manage.php
  93. 462 0
      src/Filter/bao10jie/BCPurifyClient.php
  94. 99 0
      src/Filter/bao10jie/BCPurifyItem.php
  95. 40 0
      src/Filter/bao10jie/BCPurifyResult.php
  96. 13 0
      src/Filter/bao10jie/config/Cfg.php
  97. 56 0
      src/Filter/bao10jie/lib/BCClientProxy.php
  98. 55 0
      src/Filter/bao10jie/lib/BCLogger.php
  99. 8 0
      src/Filter/bao10jie/readme.txt
  100. 122 0
      src/Filter/bao10jie/testDemo.php

+ 14 - 0
LICENSE

@@ -0,0 +1,14 @@
+Apache License
+Copyright 2016-2017 Dever(dever.cc)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.

+ 2 - 0
README.md

@@ -0,0 +1,2 @@
+# manage
+

+ 26 - 0
api/main.php

@@ -0,0 +1,26 @@
+<?php
+# 注册api
+# api仅有三种类型:get、update、delete,每种类型对应的加密key不同 1,2,3
+
+return array
+(
+	# 输出数据库菜单
+	'role-*get' => array
+	(
+		# 接口名
+		'name' => '获取角色',
+		# 请求参数
+		'request' => array
+		(
+			'where_id' => '角色id',
+		),
+		# 返回参数 一般定义给外部使用的,此处无实际意义
+		'response' => array
+		(
+			'array' => '数组类型',
+		),
+		'order' => 1,
+		# 接口类型
+		'type' => 1,
+	),
+);

+ 325 - 0
assets/layadmin/html/console.html

@@ -0,0 +1,325 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+</head>
+<body>
+  
+  <div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+    <blockquote class="layui-elem-quote layui-quote-nm" id="content">欢迎光临本系统,控制台功能迭代优化中</blockquote>
+    </div>
+    <div class="layui-row layui-col-space15" style="display:none;">
+      <div class="layui-col-md8">
+        <div class="layui-row layui-col-space15">
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">快捷方式</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-shortcut">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage1.html">
+                          <i class="layui-icon layui-icon-console"></i>
+                          <cite>主页一</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage2.html">
+                          <i class="layui-icon layui-icon-chart"></i>
+                          <cite>主页二</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/layer/list.html">
+                          <i class="layui-icon layui-icon-template-1"></i>
+                          <cite>弹层</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a layadmin-event="im">
+                          <i class="layui-icon layui-icon-chat"></i>
+                          <cite>聊天</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/progress/index.html">
+                          <i class="layui-icon layui-icon-find-fill"></i>
+                          <cite>进度条</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="app/workorder/list.html">
+                          <i class="layui-icon layui-icon-survey"></i>
+                          <cite>工单</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="user/user/list.html">
+                          <i class="layui-icon layui-icon-user"></i>
+                          <cite>用户</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/system/website.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>设置</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">待办事项</div>
+              <div class="layui-card-body">
+
+                <div class="layui-carousel layadmin-carousel layadmin-backlog">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/content/comment.html" class="layadmin-backlog-body">
+                          <h3>待审评论</h3>
+                          <p><cite>66</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/forum/list.html" class="layadmin-backlog-body">
+                          <h3>待审帖子</h3>
+                          <p><cite>12</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="template/goodslist.html" class="layadmin-backlog-body">
+                          <h3>待审商品</h3>
+                          <p><cite>99</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" onclick="layer.tips('不跳转', this, {tips: 3});" class="layadmin-backlog-body">
+                          <h3>待发货</h3>
+                          <p><cite>20</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" class="layadmin-backlog-body">
+                          <h3>待审友情链接</h3>
+                          <p><cite style="color: #FF5722;">5</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md12">
+            <div class="layui-card">
+              <div class="layui-card-header">数据概览</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-dataview">
+                  <div carousel-item id="LAY-index-dataview">
+                    <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
+                    <div></div>
+                    <div></div>
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+            <div class="layui-card">
+              <div class="layui-tab layui-tab-brief layadmin-latestData">
+                <ul class="layui-tab-title">
+                  <li class="layui-this">今日热搜</li>
+                  <li>今日热帖</li>
+                </ul>
+                <div class="layui-tab-content">
+                  <div class="layui-tab-item layui-show">
+                    <table id="LAY-index-topSearch"></table>
+                  </div>
+                  <div class="layui-tab-item">
+                    <table id="LAY-index-topCard"></table>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      
+      <div class="layui-col-md4">
+
+        <div class="layui-card dever-notice">
+          <div class="layui-card-header">系统公告</div>
+          <div class="layui-card-body">
+            <div class="layui-carousel layadmin-carousel layadmin-news" data-autoplay="true" data-anim="fade" lay-filter="news">
+              <div carousel-item id="dever-notice">
+                <div><a href="http://fly.layui.com/docs/2/" target="_blank" class="layui-bg-red">layuiAdmin 快速上手文档</a></div>
+                <div><a href="http://fly.layui.com/vipclub/list/layuiadmin/" target="_blank" class="layui-bg-green">layuiAdmin 会员讨论专区</a></div> 
+                <div><a href="http://www.layui.com/admin/#get" target="_blank" class="layui-bg-blue">获得 layui 官方后台模板系统</a></div>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">版本信息</div>
+          <div class="layui-card-body layui-text">
+            <table class="layui-table">
+              <colgroup>
+                <col width="100">
+                <col>
+              </colgroup>
+              <tbody>
+                <tr>
+                  <td>当前版本</td>
+                  <td>
+                    <script type="text/html" template>
+                      v{{ layui.admin.v }}
+                    </script>
+                  </td>
+                </tr>
+                <tr>
+                  <td>基于框架</td>
+                  <td>
+                    <script type="text/html" template>
+                      layui-v{{ layui.v }}
+                    </script>
+                 </td>
+                </tr>
+                <tr>
+                  <td>主要特色</td>
+                  <td>零门槛 / 响应式 / 清爽 / 极简</td>
+                </tr>
+                <tr>
+                  <td>获取渠道</td>
+                  <td style="padding-bottom: 0;">
+                    <div class="layui-btn-container">
+                      <a href="http://www.layui.com/admin/" target="_blank" class="layui-btn layui-btn-danger">获取授权</a>
+                      <a href="http://fly.layui.com/download/layuiAdmin/" target="_blank" class="layui-btn">立即下载</a>
+                    </div>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">效果报告</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>转化率(日同比 28% <span class="layui-edge layui-edge-top" lay-tips="增长" lay-offset="-15"></span></h3>
+              <div class="layui-progress-bar" lay-percent="65%"></div>
+            </div>
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>签到率(日同比 11% <span class="layui-edge layui-edge-bottom" lay-tips="下降" lay-offset="-15"></span></h3>
+              <div class="layui-progress-bar" lay-percent="32%"></div>
+            </div>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">实时监控</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>CPU使用率</h3>
+              <div class="layui-progress-bar" lay-percent="58%"></div>
+            </div>
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>内存占用率</h3>
+              <div class="layui-progress-bar layui-bg-red" lay-percent="90%"></div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">
+            作者心语
+            <i class="layui-icon layui-icon-tips" lay-tips="要支持的噢" lay-offset="5"></i>
+          </div>
+          <div class="layui-card-body layui-text layadmin-text">
+            <p>一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。</p>
+            <p>在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。</p>
+            <p>子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 <a href="http://www.layui.com/admin/" target="_blank">layuiAdmin</a></p>
+            <p>—— 贤心(<a href="http://www.layui.com/" target="_blank">layui.com</a></p>
+          </div>
+        </div>
+      </div>
+      
+    </div>
+  </div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script>
+    layui.config({
+        base: '../script/lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use(['index', 'console']);
+</script>
+</body>
+</html>
+

+ 64 - 0
assets/layadmin/html/home.html

@@ -0,0 +1,64 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+</head>
+<body class="layui-layout-body fixed-left">
+
+  <div id="LAY_app">
+    <div class="layui-layout layui-layout-admin">
+
+      <script class="include" system="" path="inc/" file="nav">include()</script>
+
+      <script class="include" system="" path="inc/" file="menu">include()</script>
+
+      <!-- 页面标签 -->
+      <div class="layadmin-pagetabs" id="LAY_app_tabs">
+        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-down">
+          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
+            <li class="layui-nav-item" lay-unselect>
+              <a href="javascript:;"></a>
+              <dl class="layui-nav-child layui-anim-fadein">
+                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
+                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
+                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
+              </dl>
+            </li>
+          </ul>
+        </div>
+        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
+          <ul class="layui-tab-title" id="LAY_app_tabsheader">
+            <li lay-id="home/console.html" lay-attr="home/console.html" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
+          </ul>
+        </div>
+      </div>
+      
+      
+      <!-- 主体内容 -->
+      <div class="layui-body" id="LAY_app_body">
+        <div class="layadmin-tabsbody-item layui-show">
+          <iframe src="home/console.html" frameborder="0" class="layadmin-iframe"></iframe>
+        </div>
+      </div>
+      
+      <!-- 辅助元素,一般用于移动设备下遮罩 -->
+      <div class="layadmin-body-shade" layadmin-event="shade"></div>
+    </div>
+  </div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script>
+    layui.config({
+        base: '../script/lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use('index');
+</script>
+</body>
+</html>
+
+

+ 27 - 0
assets/layadmin/html/inc/head.html

@@ -0,0 +1,27 @@
+<meta charset="utf-8">
+<title>后台管理</title>
+<meta name="keywords" content="后台管理">
+<meta name="description" content="后台管理">
+<meta name="apple-mobile-web-app-title" content="后台管理" />
+<meta name="author" content="rabin">
+<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<link rel="stylesheet" type="text/css" href="../script/lib/layui/css/layui.css" />
+<link rel="stylesheet" href="../script/lib/layui/admin/style/admin.css?v3" media="all">
+
+<!-- plugin -->
+<link rel="stylesheet" type="text/css" href="../script/lib/color/colpick.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/kindeditor/themes/default/default.css?v1" />
+<link rel="stylesheet" type="text/css" href="../script/lib/valid/validationEngine.jquery.css">
+<!--link rel="stylesheet" type="text/css" href="../script/lib/pnotify/pnotify.css"-->
+<link rel="stylesheet" type="text/css" href="../script/lib/fancybox/jquery.fancybox.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/highlight/highlight.min.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/datetime/jquery.datetimepicker.css">
+
+<link rel="stylesheet" type="text/css" href="../script/lib/ui/ui.min.css">
+
+<script type="text/javascript" src="../script/lib/jquery/jquery.min.js"></script>
+<script id="script">var config={};</script>
+<style type="text/css" id="style">
+</style>

+ 345 - 0
assets/layadmin/html/inc/menu.html

@@ -0,0 +1,345 @@
+<!-- 侧边菜单 -->
+      <div class="layui-side layui-side-menu">
+        <div class="layui-side-scroll">
+          <div class="layui-logo" id="console-url" lay-href="home/console.html">
+            <span id="dever-name">layuiAdmin</span>
+          </div>
+          
+          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
+            <li data-name="home" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="主页" lay-direction="2">
+                <i class="layui-icon layui-icon-home"></i>
+                <cite>主页</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd data-name="console" class="layui-this">
+                  <a lay-href="home/console.html">控制台</a>
+                </dd>
+                <dd data-name="console">
+                  <a lay-href="home/homepage1.html">主页一</a>
+                </dd>
+                <dd data-name="console">
+                  <a lay-href="home/homepage2.html">主页二</a>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="component" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="组件" lay-direction="2">
+                <i class="layui-icon layui-icon-component"></i>
+                <cite>组件</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd data-name="grid">
+                  <a href="javascript:;">栅格</a>
+                  <dl class="layui-nav-child">
+                    <dd data-name="list"><a lay-href="component/grid/list.html">等比例列表排列</a></dd>
+                    <dd data-name="mobile"><a lay-href="component/grid/mobile.html">按移动端排列</a></dd>
+                    <dd data-name="mobile-pc"><a lay-href="component/grid/mobile-pc.html">移动桌面端组合</a></dd>
+                    <dd data-name="all"><a lay-href="component/grid/all.html">全端复杂组合</a></dd>
+                    <dd data-name="stack"><a lay-href="component/grid/stack.html">低于桌面堆叠排列</a></dd>
+                    <dd data-name="speed-dial"><a lay-href="component/grid/speed-dial.html">九宫格</a></dd>
+                  </dl>
+                </dd>
+                <dd data-name="button">
+                  <a lay-href="component/button/index.html">按钮</a>
+                </dd>
+                <dd data-name="form">
+                  <a href="javascript:;">表单</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="component/form/element.html">表单元素</a></dd>
+                    <dd><a lay-href="component/form/group.html">表单组合</a></dd>
+                  </dl>
+                </dd>
+                <dd data-name="nav">
+                  <a lay-href="component/nav/index.html">导航</a>
+                </dd>
+                <dd data-name="tabs">
+                  <a lay-href="component/tabs/index.html">选项卡</a>
+                </dd>
+                <dd data-name="progress">
+                  <a lay-href="component/progress/index.html">进度条</a>
+                </dd>
+                <dd data-name="panel"> 
+                  <a lay-href="component/panel/index.html">面板</a>  
+                </dd>
+                <dd data-name="badge"> 
+                  <a lay-href="component/badge/index.html">徽章</a>  
+                </dd>
+                <dd data-name="timeline"> 
+                  <a lay-href="component/timeline/index.html">时间线</a>  
+                </dd>
+                <dd data-name="anim"> 
+                  <a lay-href="component/anim/index.html">动画</a>  
+                </dd>
+                <dd data-name="auxiliar"> 
+                  <a lay-href="component/auxiliar/index.html">辅助</a>  
+                </dd>
+                <dd data-name="layer"> 
+                  <a href="javascript:;">通用弹层<span class="layui-nav-more"></span></a>  
+                  <dl class="layui-nav-child">  
+                    <dd data-name="list"> 
+                      <a lay-href="component/layer/list.html" lay-text="layer 功能演示">功能演示</a> 
+                    </dd>  
+                    <dd data-name="special-demo"> 
+                      <a lay-href="component/layer/special-demo.html" lay-text="layer 特殊示例">特殊示例</a> 
+                    </dd>  
+                    <dd data-name="theme"> 
+                      <a lay-href="component/layer/theme.html" lay-text="layer 风格定制">风格定制</a> 
+                    </dd>  
+                  </dl>  
+                </dd>
+                <dd data-name="laydate"> 
+                  <a href="javascript:;">日期时间</a>
+                  <dl class="layui-nav-child">  
+                    <dd data-name="demo1"> 
+                      <a lay-href="component/laydate/demo1.html" lay-text="layDate 功能演示一">功能演示一</a> 
+                    </dd>
+                    <dd data-name="demo2"> 
+                      <a lay-href="component/laydate/demo2.html" lay-text="layDate 功能演示二">功能演示二</a> 
+                    </dd>
+                    <dd data-name="theme"> 
+                      <a lay-href="component/laydate/theme.html" lay-text="layDate 设定主题">设定主题</a> 
+                    </dd>
+                    <dd data-name="special-demo"> 
+                      <a lay-href="component/laydate/special-demo.html" lay-text="layDate 特殊示例">特殊示例</a> 
+                    </dd>  
+                  </dl>  
+                </dd>
+                <dd data-name="table-static"> 
+                  <a lay-href="component/table/static.html">静态表格</a>
+                </dd>
+                <dd data-name="table"> 
+                  <a href="javascript:;">数据表格</a>
+                  <dl class="layui-nav-child">  
+                    <dd data-name="simple"> 
+                      <a lay-href="component/table/simple.html" lay-text="">简单数据表格</a> 
+                    </dd>
+                    <dd data-name="auto"> 
+                      <a lay-href="component/table/auto.html" lay-text="">列宽自动分配</a> 
+                    </dd>
+                    <dd data-name="data"> 
+                      <a lay-href="component/table/data.html" lay-text="">赋值已知数据</a> 
+                    </dd>
+                    <dd data-name="tostatic"> 
+                      <a lay-href="component/table/tostatic.html" lay-text="">转化静态表格</a> 
+                    </dd>
+                    <dd data-name="page"> 
+                      <a lay-href="component/table/page.html" lay-text="">开启分页</a> 
+                    </dd>
+                    <dd data-name="resetPage"> 
+                      <a lay-href="component/table/resetPage.html" lay-text="">自定义分页</a> 
+                    </dd>
+                    <dd data-name="toolbar"> 
+                      <a lay-href="component/table/toolbar.html" lay-text="">开启头部工具栏</a> 
+                    </dd>
+                    <dd data-name="totalRow"> 
+                      <a lay-href="component/table/totalRow.html" lay-text="">开启合计行</a> 
+                    </dd>
+                    <dd data-name="height"> 
+                      <a lay-href="component/table/height.html" lay-text="">高度最大适应</a> 
+                    </dd>
+                    <dd data-name="checkbox"> 
+                      <a lay-href="component/table/checkbox.html" lay-text="">开启复选框</a> 
+                    </dd>
+                    <dd data-name="radio"> 
+                      <a lay-href="component/table/radio.html" lay-text="">开启单选框</a> 
+                    </dd>
+                    <dd data-name="cellEdit"> 
+                      <a lay-href="component/table/cellEdit.html" lay-text="">开启单元格编辑</a> 
+                    </dd>
+                    <dd data-name="form"> 
+                      <a lay-href="component/table/form.html" lay-text="">加入表单元素</a> 
+                    </dd>
+                    <dd data-name="style"> 
+                      <a lay-href="component/table/style.html" lay-text="">设置单元格样式</a> 
+                    </dd>
+                    <dd data-name="fixed"> 
+                      <a lay-href="component/table/fixed.html" lay-text="">固定列</a> 
+                    </dd>
+                    <dd data-name="operate"> 
+                      <a lay-href="component/table/operate.html" lay-text="">数据操作</a> 
+                    </dd>
+                    <dd data-name="parseData"> 
+                      <a lay-href="component/table/parseData.html" lay-text="">解析任意数据格式</a> 
+                    </dd>
+                    <dd data-name="onrow"> 
+                      <a lay-href="component/table/onrow.html" lay-text="">监听行事件</a> 
+                    </dd>
+                    <dd data-name="reload">
+                      <a lay-href="component/table/reload.html" lay-text="">数据表格的重载</a> 
+                    </dd>
+                    <dd data-name="initSort"> 
+                      <a lay-href="component/table/initSort.html" lay-text="">设置初始排序</a> 
+                    </dd>
+                    <dd data-name="cellEvent"> 
+                      <a lay-href="component/table/cellEvent.html" lay-text="">监听单元格事件</a> 
+                    </dd>
+                    <dd data-name="thead"> 
+                      <a lay-href="component/table/thead.html" lay-text="">复杂表头</a> 
+                    </dd>
+                  </dl>
+                </dd>
+                <dd data-name="laypage"> 
+                  <a href="javascript:;">分页</a>  
+                  <dl class="layui-nav-child">  
+                    <dd data-name="demo1"> 
+                      <a lay-href="component/laypage/demo1.html" lay-text="layPage 功能演示一">功能演示一</a> 
+                    </dd>
+                    <dd data-name="demo2"> 
+                      <a lay-href="component/laypage/demo2.html" lay-text="layPage 功能演示二">功能演示二</a> 
+                    </dd> 
+                  </dl>  
+                </dd>
+                <dd data-name="upload"> 
+                  <a href="javascript:;">上传</a>  
+                  <dl class="layui-nav-child">  
+                    <dd data-name="demo1"> 
+                      <a lay-href="component/upload/demo1.html" lay-text="上传功能演示一">功能演示一</a> 
+                    </dd>
+                    <dd data-name="demo2"> 
+                      <a lay-href="component/upload/demo2.html" lay-text="上传功能演示二">功能演示二</a> 
+                    </dd> 
+                  </dl>  
+                </dd>
+                <dd data-name="colorpicker">
+                  <a lay-href="component/colorpicker/index.html">颜色选择器</a>
+                </dd>
+                <dd data-name="slider">
+                  <a lay-href="component/slider/index.html">滑块组件</a>
+                </dd>
+                <dd data-name="rate">
+                  <a lay-href="component/rate/index.html">评分</a>
+                </dd>
+                <dd data-name="carousel"> 
+                  <a lay-href="component/carousel/index.html">轮播</a>  
+                </dd>
+                <dd data-name="flow"> 
+                  <a lay-href="component/flow/index.html">流加载</a>  
+                </dd>
+                <dd data-name="util"> 
+                  <a lay-href="component/util/index.html">工具</a>  
+                </dd>
+                <dd data-name="code"> 
+                  <a lay-href="component/code/index.html">代码修饰</a> 
+                </dd>
+              </dl>
+            </li>
+            <li data-name="template" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="页面" lay-direction="2">
+                <i class="layui-icon layui-icon-template"></i>
+                <cite>页面</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd><a lay-href="template/personalpage.html">个人主页</a></dd>
+                <dd><a lay-href="template/addresslist.html">通讯录</a></dd>
+                <dd><a lay-href="template/caller.html">客户列表</a></dd>
+                <dd><a lay-href="template/goodslist.html">商品列表</a></dd>
+                <dd><a lay-href="template/msgboard.html">留言板</a></dd>
+                <dd><a lay-href="template/search.html">搜索结果</a></dd>
+                <dd><a href="user/reg.html" target="_blank">注册</a></dd>
+                <dd><a href="user/login.html" target="_blank">登入</a></dd>
+                <dd><a href="user/forget.html" target="_blank">忘记密码</a></dd>
+                <dd><a lay-href="template/tips/404.html">404页面不存在</a></dd>
+                <dd><a lay-href="template/tips/error.html">错误提示</a></dd>
+                <dd><a lay-href="//www.baidu.com/">百度一下</a></dd>
+                <dd><a lay-href="//www.layui.com/">layui官网</a></dd>
+                <dd><a lay-href="//www.layui.com/admin/">layuiAdmin官网</a></dd>
+              </dl>
+            </li>
+            <li data-name="app" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="应用" lay-direction="2">
+                <i class="layui-icon layui-icon-app"></i>
+                <cite>应用</cite>
+              </a>
+              <dl class="layui-nav-child">
+                
+                <dd data-name="content">
+                  <a href="javascript:;">内容系统</a>
+                  <dl class="layui-nav-child">
+                    <dd data-name="list"><a lay-href="app/content/list.html">文章列表</a></dd>
+                    <dd data-name="tags"><a lay-href="app/content/tags.html">分类管理</a></dd>
+                    <dd data-name="comment"><a lay-href="app/content/comment.html">评论管理</a></dd>
+                  </dl>
+                </dd>
+                <dd data-name="forum">
+                  <a href="javascript:;">社区系统</a>
+                  <dl class="layui-nav-child">
+                    <dd data-name="list"><a lay-href="app/forum/list.html">帖子列表</a></dd>
+                    <dd data-name="replys"><a lay-href="app/forum/replys.html">回帖列表</a></dd>
+                  </dl>
+                </dd>
+                <dd>
+                  <a lay-href="app/message/index.html">消息中心</a>
+                </dd>
+                <dd data-name="workorder">
+                  <a lay-href="app/workorder/list.html">工单系统</a>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="senior" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="高级" lay-direction="2">
+                <i class="layui-icon layui-icon-senior"></i>
+                <cite>高级</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd>
+                  <a layadmin-event="im">LayIM 通讯系统</a>  
+                </dd>
+                <dd data-name="echarts">
+                  <a href="javascript:;">Echarts集成</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="senior/echarts/line.html">折线图</a></dd>
+                    <dd><a lay-href="senior/echarts/bar.html">柱状图</a></dd>
+                    <dd><a lay-href="senior/echarts/map.html">地图</a></dd>
+                  </dl>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="user" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="用户" lay-direction="2">
+                <i class="layui-icon layui-icon-user"></i>
+                <cite>用户</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd>
+                  <a lay-href="user/user/list.html">网站用户</a>
+                </dd>
+                <dd>
+                  <a lay-href="user/administrators/list.html">后台管理员</a>
+                </dd>
+                <dd>
+                  <a lay-href="user/administrators/role.html">角色管理</a>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="set" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="设置" lay-direction="2">
+                <i class="layui-icon layui-icon-set"></i>
+                <cite>设置</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd class="layui-nav-itemed">
+                  <a href="javascript:;">系统设置</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="set/system/website.html">网站设置</a></dd>
+                    <dd><a lay-href="set/system/email.html">邮件服务</a></dd>
+                  </dl>
+                </dd>
+                <dd class="layui-nav-itemed">
+                  <a href="javascript:;">我的设置</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="set/user/info.html">基本资料</a></dd>
+                    <dd><a lay-href="set/user/password.html">修改密码</a></dd>
+                  </dl>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="get" class="layui-nav-item">
+              <a href="javascript:;" lay-href="//www.layui.com/admin/#get" lay-tips="授权" lay-direction="2">
+                <i class="layui-icon layui-icon-auz"></i>
+                <cite>授权</cite>
+              </a>
+            </li>
+          </ul>
+        </div>
+      </div>

+ 87 - 0
assets/layadmin/html/inc/nav.html

@@ -0,0 +1,87 @@
+<div id="load_style" style="display:none;">
+</div>
+<div id="dever-name" style="display:none;"></div>
+<div class="layui-header" id="nav">
+<!-- 头部区域 -->
+<ul class="layui-nav layui-layout-left" id="top">
+  <li class="layui-nav-item layadmin-flexible" lay-unselect>
+    <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
+      <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="back" title="上一页">
+      <i class="layui-icon layui-icon-return"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" id="front-url" lay-unselect style="display:none;">
+    <a href="http://www.layui.com/admin/" target="_blank" title="前台">
+      <i class="layui-icon layui-icon-website"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;" layadmin-event="refresh" title="刷新">
+      <i class="layui-icon layui-icon-refresh-3"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search.html?keywords="> 
+  </li>
+
+  <li class="layui-nav-item" style=""><a data-menu-node="m-1" href="#"><span>后台首页</span></a></li><li class="layui-nav-item" style=""><a data-menu-node="m-16" data-open="#"><span>微信管理</span></a></li><li class="layui-nav-item" style=""><a data-menu-node="m-37" data-open="#"><span>开放平台</span></a></li><li class="layui-nav-item" style=""><a data-menu-node="m-2" data-open="#"><span>系统管理</span></a></li><li class="layui-nav-item" style=""><a data-menu-node="m-62" data-open="#"><span>送钱券</span></a></li><li class="layui-nav-item layui-this" style=""><a data-menu-node="m-68" data-open="#"><span>优选店</span></a></li><li class="layui-nav-item" style=""><a data-menu-node="m-73" data-open="#"><span>用户管理</span></a></li>
+
+</ul>
+
+<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
+
+  <li class="layui-nav-item auth-top" lay-unselect style="display:none;">
+    <a href="javascript:;">
+      <cite><span></span></cite>
+    </a>
+    <ul class="layui-nav-child">
+      <li><a lay-href="set/user/info.html">基本资料</a></li>
+    </ul>
+  </li>
+
+  <li class="layui-nav-item" lay-unselect style="display:none;">
+    <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
+      <i class="layui-icon layui-icon-notice"></i>  
+      
+      <!-- 如果有新消息,则显示小圆点 -->
+      <span class="layui-badge-dot"></span>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect>
+    <a href="javascript:;" layadmin-event="theme">
+      <i class="layui-icon layui-icon-theme"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="note">
+      <i class="layui-icon layui-icon-note"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="fullscreen">
+      <i class="layui-icon layui-icon-screen-full"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;">
+      <cite id="manage-name"></cite>
+    </a>
+    <dl class="layui-nav-child">
+      <dd><a id="edit_password" onclick="pass($(this));" style="cursor: pointer;">修改密码</a></dd>
+      <hr>
+      <dd style="text-align: center;"><a id="logout-url" href="javascript:;">退出</a></dd>
+    </dl>
+  </li>
+  
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+  <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
+    <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+</ul>
+</div>

+ 49 - 0
assets/layadmin/html/inc/script.html

@@ -0,0 +1,49 @@
+<script type="text/javascript" src="../script/lib/pic/webp.js"></script>
+
+<!--[if (gte IE 9)|!(IE)]><!-->
+<script type="text/javascript" src="../script/lib/jquery/store.js"></script>
+<script type="text/javascript" src="../script/lib/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="../script/lib/pjax/pjax.js"></script>
+<script type="text/javascript" src="../script/lib/pjax/nprogress.js"></script>
+<!--<![endif]-->
+
+<!-- 加载颜色控件 -->
+<script type="text/javascript" src="../script/lib/color/colpick.js"></script>
+
+<!-- 加载时间控件 -->
+<script type="text/javascript" src="../script/lib/datetime/jquery.datetimepicker.min.js"></script>
+
+<!-- 加载notify提醒 -->
+<!--script type="text/javascript" src="../script/lib/pnotify/pnotify.js"></script-->
+
+<!-- 加载图片展示 -->
+<script type="text/javascript" src="../script/lib/fancybox/jquery.fancybox.js"></script>
+
+<!-- 加载echarts -->
+<script type="text/javascript" src="../script/lib/echarts/echarts.common.min.js?v1"></script>
+
+<!-- 加载highlight.min.js -->
+<script type="text/javascript" src="../script/lib/highlight/highlight.min.js"></script>
+
+<!-- 加载valid -->
+<script type="text/javascript" src="../script/lib/valid/jquery.validationEngine.min.js?v3"></script>
+
+<!-- 加载文本编辑器 -->
+<script type="text/javascript" src="../script/lib/kindeditor/kindeditor-all-min.js?v9"></script>
+<script type="text/javascript" src="../script/lib/kindeditor/lang/zh-CN.js?v7"></script>
+
+<script type="text/javascript" src="../script/lib/ui/ui.min.js"></script>
+
+
+<script type="text/javascript" src="../script/lib/qiniu/upload/plupload.full.min.js"></script>
+
+<script type="text/javascript" src="../script/lib/qiniu/qiniu.upload.js"></script>
+<script type="text/javascript" src="../script/lib/tool/md5.js"></script>
+
+<script type="text/javascript" src="../script/lib/layui/upload.js?v6"></script>
+<script type="text/javascript" src="../script/lib/layui/layui.js"></script>
+
+<script type="text/javascript" src="../script/lib/clipboard/clipboard.js"></script>
+
+<!-- 加载主要js,很乱,后续优化 -->
+<script type="text/javascript" src="../script/lib/manage/main.js?v31"></script>

+ 80 - 0
assets/layadmin/html/login.html

@@ -0,0 +1,80 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+  <link rel="stylesheet" href="../script/lib/layui/admin/style/login.css" media="all">
+</head>
+<body>
+
+  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
+    <form action="/auth.login" method="post" target="f1" class="form-horizontal m-t-20" id="login">
+    <input type="hidden" name="function" id="function" value="msg">
+    <input type="hidden" name="refer" id="refer" value="">
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+    <div class="layadmin-user-login-main">
+      <div class="layadmin-user-login-box layadmin-user-login-header">
+        <h2 id="name">dever</h2>
+      </div>
+      <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
+          <input type="text" name="username" id="username" lay-verify="required" placeholder="账号" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
+          <input name="password" id="password" type="password" lay-verify="required" placeholder="密码" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit">登 入</button>
+        </div>
+      </div>
+    </div>
+    
+    <div class="layui-trans layadmin-user-login-footer">
+      <p id="footer">© 2015-2020 dever.cc,Inc. Licensed under MIT license.</p>
+    </div>
+    
+    <div class="ladmin-user-login-theme" style="display:none;">
+      <script type="text/html" template>
+        <ul>
+          <li data-theme=""><img src="{{ layui.setter.base }}style/res/bg-none.jpg"></li>
+          <li data-theme="#03152A" style="background-color: #03152A;"></li>
+          <li data-theme="#2E241B" style="background-color: #2E241B;"></li>
+          <li data-theme="#50314F" style="background-color: #50314F;"></li>
+          <li data-theme="#344058" style="background-color: #344058;"></li>
+          <li data-theme="#20222A" style="background-color: #20222A;"></li>
+        </ul>
+      </script>
+    </div>
+    </form> 
+  </div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script>
+  $(function()
+  {
+    $("#login").bind("keydown",function(e){
+      var theEvent = e || window.event;    
+      var code = theEvent.keyCode || theEvent.which || theEvent.charCode;    
+      if (code == 13) {    
+              $("#login").submit();
+          }
+     });
+  });
+
+  </script>
+  <script>
+  layui.config({
+    base: '../script/lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'user'], function(){
+    var $ = layui.$
+    ,setter = layui.setter
+    ,admin = layui.admin
+  });
+  </script>
+</body>
+</html>

+ 154 - 0
assets/layadmin/html/project/database/list.html

@@ -0,0 +1,154 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+  <link rel="stylesheet" href="../script/lib/layui/admin/modules/plugin/formselects/formselects.css" media="all" />
+</head>
+<body>
+<style id="addstyle">
+</style>
+<style>
+.layui-table-cell .layui-select,.layui-table-cell .layui-input
+{
+    height: 25px;
+}
+.layui-table-cell {
+    height: auto;
+}
+
+.table th,.table td {
+  min-width: 70px;
+}
+#table_2,#table_1 {
+  overflow: auto;
+}
+.layui-btn-xs
+{
+  margin-top:1px;
+}
+.dever-emoji img {
+  width:16px;
+}
+.layui-tab-title {
+  height: 100%;
+  white-space: inherit;
+}
+</style>
+<div id="load_style" style="display:none;">
+</div>
+<span id="dever-name" style="display:none;"></span>
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+
+<div id="content_1" style="display:none;"></div>
+<div id="content_2">
+  <div class="layui-fluid">
+    <div class="layui-card">
+      <input type="hidden" name="url1" id="url" value=""/>
+
+      <form id="form1" name="form1" method="get" target="f1">
+      <input type="hidden" name="l" id="l" value="msg"/>
+      <input type="hidden" name="project" id="project" value="msg"/>
+      <input type="hidden" name="table" id="tables" value="msg"/>
+      <input type="hidden" name="menu" id="menu" value="msg"/>
+      <input type="hidden" name="menu_id" id="menu_id" value="msg"/>
+      <input type="hidden" name="search_option_state" id="search_option_state" value="msg"/>
+
+      <input type="hidden" name="function" id="function" value="msg"/>
+      <input type="hidden" name="method" id="method" value="search"/>
+      <div id="search_param"></div> 
+      <iframe id="f1" name="f1" style="display:none;"></iframe>
+      <div class="layui-card-header" style="display:none;"><span id="list-name">网站设置</span> > <span id="list-project"></span></div>
+        <div class="layui-card-body" id="search_content">
+
+          <div class="layui-form layui-card-header layuiadmin-card-header-auto">
+            <div class="layui-form-item">
+              <div id="search"></div>
+            </div>
+          </div>
+        </div>
+      <div class="layui-card-body">
+        <div style="padding-bottom: 10px;">
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-parent" style="display:none;">返回上一页</a>
+
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-add">新增</a>
+
+          <span id="list-button"></span>
+        </div>
+        <div id="table_1" style="display:none;"></div>
+        <div id="table_2"> 
+          <table class="table layui-table layui-table-body" id="table">
+          <thead id="list-thead">
+              <tr>
+                  <th>Company</th>
+              </tr>
+          </thead>
+          <tbody id="list-tbody">
+              <tr>
+                  <th></th>
+              </tr>      
+              
+          </tbody>
+      </table>
+
+      <div id="mul"></div>
+      <div id="page"></div>
+      <div class="dever_desc" id="desc"></div>
+        </div>
+      </div>
+       </div>
+        </div>
+      </form>
+      <form id="form2" name="form2" method="get" style="display: none;"></form>
+      <div id="struct" style="display:none;"></div>
+    </div>
+  </div>
+</div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script id="list-thead-data">
+    config.table = {};
+    config.table.cols = [];
+  </script>
+  <script id="list-tbody-data">
+    config.table.data = [];
+  </script>
+  <script>
+  layui.config({
+    base: '../script/lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    formSelects: 'plugin/formselects/formselects',
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'contlist', 'table', 'form', 'formSelects'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+    var formSelects = layui.formSelects;
+
+    /*
+    table.render({
+      elem: '#table'
+      ,page: false
+      ,limit:20
+      ,cols: config.table.cols
+      ,data: config.table.data
+    });
+    */
+
+    init();
+
+    if ($('.dever-manage').length) {
+      $('.dever-manage').click(function()
+      {
+        showMsg('数据结构', $(this), '#struct');
+      })
+    }
+  });
+  </script>
+</body>
+</html>

+ 175 - 0
assets/layadmin/html/project/database/update.html

@@ -0,0 +1,175 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+<link rel="stylesheet" href="../script/lib/layui/admin/modules/plugin/formselects/formselects.css" media="all" />
+  <style>
+    .layui-input,.xm-select-parent
+    {
+      width: 50%;
+    }
+
+    textarea{
+      padding-top: 5px;
+    }
+
+    .dever-color {
+      width: 100%;
+    }
+
+    .dever_form_add_child {
+      padding:15px;
+    }
+    .dever_form_delete {
+      float: right;
+      margin-right: 10px;
+      color: red;
+    }
+    .dever_score_child {
+      margin: 15px;
+    }
+    .layui-tab-title {
+      height: 100%;
+      white-space: inherit;
+    }
+    </style>
+</head>
+<body>
+  <div id="load_style" style="display:none;">
+</div>
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+<div id="content_1" style="display:none;"></div>
+<div id="content_2">
+  <div class="layui-fluid">
+    <div style="display:none;"><span id="list-name">网站设置</span> > <span id="list-project"></span></div>
+    <form method="post" target="f1" class="form1" role="form" autocomplete="off">
+    <input type="hidden" name="function" id="function" value="msg"/>
+    <input type="hidden" name="url" id="url" />
+    <input type="hidden" name="project" id="project" />
+    <input type="hidden" name="table" id="table" />
+    <input type="hidden" name="update_where_id" id="update_where_id"/>
+    <input type="hidden" name="copy_num" id="copy_num" value="0"/>
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+
+    <div class="layui-row layui-col-space15">
+      <div class="layui-col-md12">
+        <div class="layui-card">
+          <div class="layui-card-header" style="display:none;">响应式组合</div>
+          <div class="layui-card-body" id="content">
+            <form class="layui-form" action="" lay-filter="component-form-element">
+              <div class="layui-row layui-col-space10 layui-form-item">
+                <div class="layui-col-lg12">
+                  <label class="layui-form-label">员工姓名:</label>
+                  <div class="layui-input-block">
+                    <input type="text" name="fullname" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
+                  </div>
+                </div>
+                <div class="layui-col-lg12">
+                  <label class="layui-form-label">技术工种:</label>
+                  <div class="layui-input-block">
+                    <select name="type" lay-verify="required" lay-filter="aihao">
+                      <option value=""></option>
+                      <option value="0">前端工程师</option>
+                      <option value="1">Node.js工程师</option>
+                      <option value="2">PHP工程师</option>
+                      <option value="3">Java工程师</option>
+                      <option value="4">运维</option>
+                      <option value="4">视觉设计师</option>
+                    </select>
+                  </div>
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">兴趣爱好:</label>
+                <div class="layui-input-block">
+                  <input type="checkbox" name="interest[write]" title="写作">
+                  <input type="checkbox" name="interest[read]" title="阅读">
+                  <input type="checkbox" name="interest[code]" title="代码" checked>
+                  <input type="checkbox" name="interest[dreaming]" title="做梦">
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">是否婚姻:</label>
+                <div class="layui-input-block">
+                  <input type="checkbox" name="marriage" lay-skin="switch" lay-text="是|否">
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">所属职称:</label>
+                <div class="layui-input-block">
+                  <input type="radio" name="role" value="" title="经理">
+                  <input type="radio" name="role" value="" title="主管">
+                  <input type="radio" name="role" value="" title="码农" checked>
+                  <input type="radio" name="role" value="" title="端水">
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">其它信息:</label>
+                <div class="layui-input-block">
+                  <textarea name="other" placeholder="" class="layui-textarea"></textarea>
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label"> </label>
+                <div class="layui-input-block">
+                  <input type="checkbox" name="agreement" title="同意" lay-skin="primary" checked>
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <div class="layui-input-block">
+                  <button class="layui-btn" lay-submit lay-filter="component-form-element">立即提交</button>
+                  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
+                </div>
+              </div>
+            </form>
+          </div>
+          <div class="layui-card-body">
+            <div class="layui-form-item">
+                <div id="update_button">
+                  <button class="layui-btn" lay-submit lay-filter="component-form-element">立即提交</button>
+                  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
+                </div>
+              </div>
+            </div>
+        </div>
+      </div>
+    </div>
+    <div id="valid"></div>
+    <div id="struct" style="display:none;"></div>
+    </form>
+  </div>
+</div>
+
+  
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script id="update_script">
+  layui.config({
+    base: '../script/lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index', //主入口模块
+    formSelects: 'plugin/formselects/formselects'
+  }).use(['index', 'contlist', 'table', 'form', 'formSelects'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+    var formSelects = layui.formSelects;
+
+    /*
+    $('select').each(function() {
+        if ($(this).attr('xm-value')) {
+          formSelects.value($(this).attr('xm-select'), $(this).attr('xm-value'));
+        }
+    });
+    */
+
+    init();
+  });
+  </script>
+</body>
+</html>

+ 325 - 0
assets/layadmin_dever/html/console.html

@@ -0,0 +1,325 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+</head>
+<body>
+  
+  <div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+    <blockquote class="layui-elem-quote layui-quote-nm" id="content">欢迎光临本系统,控制台功能迭代优化中</blockquote>
+    </div>
+    <div class="layui-row layui-col-space15" style="display:none;">
+      <div class="layui-col-md8">
+        <div class="layui-row layui-col-space15">
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">快捷方式</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-shortcut">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage1.html">
+                          <i class="layui-icon layui-icon-console"></i>
+                          <cite>主页一</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage2.html">
+                          <i class="layui-icon layui-icon-chart"></i>
+                          <cite>主页二</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/layer/list.html">
+                          <i class="layui-icon layui-icon-template-1"></i>
+                          <cite>弹层</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a layadmin-event="im">
+                          <i class="layui-icon layui-icon-chat"></i>
+                          <cite>聊天</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/progress/index.html">
+                          <i class="layui-icon layui-icon-find-fill"></i>
+                          <cite>进度条</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="app/workorder/list.html">
+                          <i class="layui-icon layui-icon-survey"></i>
+                          <cite>工单</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="user/user/list.html">
+                          <i class="layui-icon layui-icon-user"></i>
+                          <cite>用户</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/system/website.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>设置</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">待办事项</div>
+              <div class="layui-card-body">
+
+                <div class="layui-carousel layadmin-carousel layadmin-backlog">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/content/comment.html" class="layadmin-backlog-body">
+                          <h3>待审评论</h3>
+                          <p><cite>66</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/forum/list.html" class="layadmin-backlog-body">
+                          <h3>待审帖子</h3>
+                          <p><cite>12</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="template/goodslist.html" class="layadmin-backlog-body">
+                          <h3>待审商品</h3>
+                          <p><cite>99</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" onclick="layer.tips('不跳转', this, {tips: 3});" class="layadmin-backlog-body">
+                          <h3>待发货</h3>
+                          <p><cite>20</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" class="layadmin-backlog-body">
+                          <h3>待审友情链接</h3>
+                          <p><cite style="color: #FF5722;">5</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md12">
+            <div class="layui-card">
+              <div class="layui-card-header">数据概览</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-dataview">
+                  <div carousel-item id="LAY-index-dataview">
+                    <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
+                    <div></div>
+                    <div></div>
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+            <div class="layui-card">
+              <div class="layui-tab layui-tab-brief layadmin-latestData">
+                <ul class="layui-tab-title">
+                  <li class="layui-this">今日热搜</li>
+                  <li>今日热帖</li>
+                </ul>
+                <div class="layui-tab-content">
+                  <div class="layui-tab-item layui-show">
+                    <table id="LAY-index-topSearch"></table>
+                  </div>
+                  <div class="layui-tab-item">
+                    <table id="LAY-index-topCard"></table>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      
+      <div class="layui-col-md4">
+
+        <div class="layui-card dever-notice">
+          <div class="layui-card-header">系统公告</div>
+          <div class="layui-card-body">
+            <div class="layui-carousel layadmin-carousel layadmin-news" data-autoplay="true" data-anim="fade" lay-filter="news">
+              <div carousel-item id="dever-notice">
+                <div><a href="http://fly.layui.com/docs/2/" target="_blank" class="layui-bg-red">layuiAdmin 快速上手文档</a></div>
+                <div><a href="http://fly.layui.com/vipclub/list/layuiadmin/" target="_blank" class="layui-bg-green">layuiAdmin 会员讨论专区</a></div> 
+                <div><a href="http://www.layui.com/admin/#get" target="_blank" class="layui-bg-blue">获得 layui 官方后台模板系统</a></div>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">版本信息</div>
+          <div class="layui-card-body layui-text">
+            <table class="layui-table">
+              <colgroup>
+                <col width="100">
+                <col>
+              </colgroup>
+              <tbody>
+                <tr>
+                  <td>当前版本</td>
+                  <td>
+                    <script type="text/html" template>
+                      v{{ layui.admin.v }}
+                    </script>
+                  </td>
+                </tr>
+                <tr>
+                  <td>基于框架</td>
+                  <td>
+                    <script type="text/html" template>
+                      layui-v{{ layui.v }}
+                    </script>
+                 </td>
+                </tr>
+                <tr>
+                  <td>主要特色</td>
+                  <td>零门槛 / 响应式 / 清爽 / 极简</td>
+                </tr>
+                <tr>
+                  <td>获取渠道</td>
+                  <td style="padding-bottom: 0;">
+                    <div class="layui-btn-container">
+                      <a href="http://www.layui.com/admin/" target="_blank" class="layui-btn layui-btn-danger">获取授权</a>
+                      <a href="http://fly.layui.com/download/layuiAdmin/" target="_blank" class="layui-btn">立即下载</a>
+                    </div>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">效果报告</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>转化率(日同比 28% <span class="layui-edge layui-edge-top" lay-tips="增长" lay-offset="-15"></span></h3>
+              <div class="layui-progress-bar" lay-percent="65%"></div>
+            </div>
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>签到率(日同比 11% <span class="layui-edge layui-edge-bottom" lay-tips="下降" lay-offset="-15"></span></h3>
+              <div class="layui-progress-bar" lay-percent="32%"></div>
+            </div>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">实时监控</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>CPU使用率</h3>
+              <div class="layui-progress-bar" lay-percent="58%"></div>
+            </div>
+            <div class="layui-progress" lay-showPercent="yes">
+              <h3>内存占用率</h3>
+              <div class="layui-progress-bar layui-bg-red" lay-percent="90%"></div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">
+            作者心语
+            <i class="layui-icon layui-icon-tips" lay-tips="要支持的噢" lay-offset="5"></i>
+          </div>
+          <div class="layui-card-body layui-text layadmin-text">
+            <p>一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。</p>
+            <p>在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。</p>
+            <p>子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 <a href="http://www.layui.com/admin/" target="_blank">layuiAdmin</a></p>
+            <p>—— 贤心(<a href="http://www.layui.com/" target="_blank">layui.com</a></p>
+          </div>
+        </div>
+      </div>
+      
+    </div>
+  </div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script>
+    layui.config({
+        base: '../script/lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use(['index', 'console']);
+</script>
+</body>
+</html>
+

+ 64 - 0
assets/layadmin_dever/html/home.html

@@ -0,0 +1,64 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+</head>
+<body class="layui-layout-body fixed-left">
+
+  <div id="LAY_app">
+    <div class="layui-layout layui-layout-admin">
+
+      <script class="include" system="" path="inc/" file="nav">include()</script>
+
+      <script class="include" system="" path="inc/" file="menu">include()</script>
+
+      <!-- 页面标签 -->
+      <div class="layadmin-pagetabs" id="LAY_app_tabs">
+        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-down">
+          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
+            <li class="layui-nav-item" lay-unselect>
+              <a href="javascript:;"></a>
+              <dl class="layui-nav-child layui-anim-fadein">
+                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
+                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
+                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
+              </dl>
+            </li>
+          </ul>
+        </div>
+        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
+          <ul class="layui-tab-title" id="LAY_app_tabsheader">
+            <li lay-id="home/console.html" lay-attr="home/console.html" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
+          </ul>
+        </div>
+      </div>
+      
+      
+      <!-- 主体内容 -->
+      <div class="layui-body" id="LAY_app_body">
+        <div class="layadmin-tabsbody-item layui-show">
+          <iframe src="home/console.html" frameborder="0" class="layadmin-iframe"></iframe>
+        </div>
+      </div>
+      
+      <!-- 辅助元素,一般用于移动设备下遮罩 -->
+      <div class="layadmin-body-shade" layadmin-event="shade"></div>
+    </div>
+  </div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script>
+    layui.config({
+        base: '../script/lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use('index');
+</script>
+</body>
+</html>
+
+

+ 27 - 0
assets/layadmin_dever/html/inc/head.html

@@ -0,0 +1,27 @@
+<meta charset="utf-8">
+<title>后台管理</title>
+<meta name="keywords" content="后台管理">
+<meta name="description" content="后台管理">
+<meta name="apple-mobile-web-app-title" content="后台管理" />
+<meta name="author" content="rabin">
+<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<link rel="stylesheet" type="text/css" href="../script/lib/layui/css/layui.css" />
+<link rel="stylesheet" href="../script/lib/layui/admin/style/admin.css?v3" media="all">
+
+<!-- plugin -->
+<link rel="stylesheet" type="text/css" href="../script/lib/color/colpick.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/kindeditor/themes/default/default.css?v1" />
+<link rel="stylesheet" type="text/css" href="../script/lib/valid/validationEngine.jquery.css">
+<!--link rel="stylesheet" type="text/css" href="../script/lib/pnotify/pnotify.css"-->
+<link rel="stylesheet" type="text/css" href="../script/lib/fancybox/jquery.fancybox.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/highlight/highlight.min.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/datetime/jquery.datetimepicker.css">
+
+<link rel="stylesheet" type="text/css" href="../script/lib/ui/ui.min.css">
+
+<script type="text/javascript" src="../script/lib/jquery/jquery.min.js"></script>
+<script id="script">var config={};</script>
+<style type="text/css" id="style">
+</style>

+ 345 - 0
assets/layadmin_dever/html/inc/menu.html

@@ -0,0 +1,345 @@
+<!-- 侧边菜单 -->
+      <div class="layui-side layui-side-menu">
+        <div class="layui-side-scroll">
+          <div class="layui-logo" id="console-url" lay-href="home/console.html">
+            <span id="dever-name">layuiAdmin</span>
+          </div>
+          
+          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
+            <li data-name="home" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="主页" lay-direction="2">
+                <i class="layui-icon layui-icon-home"></i>
+                <cite>主页</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd data-name="console" class="layui-this">
+                  <a lay-href="home/console.html">控制台</a>
+                </dd>
+                <dd data-name="console">
+                  <a lay-href="home/homepage1.html">主页一</a>
+                </dd>
+                <dd data-name="console">
+                  <a lay-href="home/homepage2.html">主页二</a>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="component" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="组件" lay-direction="2">
+                <i class="layui-icon layui-icon-component"></i>
+                <cite>组件</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd data-name="grid">
+                  <a href="javascript:;">栅格</a>
+                  <dl class="layui-nav-child">
+                    <dd data-name="list"><a lay-href="component/grid/list.html">等比例列表排列</a></dd>
+                    <dd data-name="mobile"><a lay-href="component/grid/mobile.html">按移动端排列</a></dd>
+                    <dd data-name="mobile-pc"><a lay-href="component/grid/mobile-pc.html">移动桌面端组合</a></dd>
+                    <dd data-name="all"><a lay-href="component/grid/all.html">全端复杂组合</a></dd>
+                    <dd data-name="stack"><a lay-href="component/grid/stack.html">低于桌面堆叠排列</a></dd>
+                    <dd data-name="speed-dial"><a lay-href="component/grid/speed-dial.html">九宫格</a></dd>
+                  </dl>
+                </dd>
+                <dd data-name="button">
+                  <a lay-href="component/button/index.html">按钮</a>
+                </dd>
+                <dd data-name="form">
+                  <a href="javascript:;">表单</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="component/form/element.html">表单元素</a></dd>
+                    <dd><a lay-href="component/form/group.html">表单组合</a></dd>
+                  </dl>
+                </dd>
+                <dd data-name="nav">
+                  <a lay-href="component/nav/index.html">导航</a>
+                </dd>
+                <dd data-name="tabs">
+                  <a lay-href="component/tabs/index.html">选项卡</a>
+                </dd>
+                <dd data-name="progress">
+                  <a lay-href="component/progress/index.html">进度条</a>
+                </dd>
+                <dd data-name="panel"> 
+                  <a lay-href="component/panel/index.html">面板</a>  
+                </dd>
+                <dd data-name="badge"> 
+                  <a lay-href="component/badge/index.html">徽章</a>  
+                </dd>
+                <dd data-name="timeline"> 
+                  <a lay-href="component/timeline/index.html">时间线</a>  
+                </dd>
+                <dd data-name="anim"> 
+                  <a lay-href="component/anim/index.html">动画</a>  
+                </dd>
+                <dd data-name="auxiliar"> 
+                  <a lay-href="component/auxiliar/index.html">辅助</a>  
+                </dd>
+                <dd data-name="layer"> 
+                  <a href="javascript:;">通用弹层<span class="layui-nav-more"></span></a>  
+                  <dl class="layui-nav-child">  
+                    <dd data-name="list"> 
+                      <a lay-href="component/layer/list.html" lay-text="layer 功能演示">功能演示</a> 
+                    </dd>  
+                    <dd data-name="special-demo"> 
+                      <a lay-href="component/layer/special-demo.html" lay-text="layer 特殊示例">特殊示例</a> 
+                    </dd>  
+                    <dd data-name="theme"> 
+                      <a lay-href="component/layer/theme.html" lay-text="layer 风格定制">风格定制</a> 
+                    </dd>  
+                  </dl>  
+                </dd>
+                <dd data-name="laydate"> 
+                  <a href="javascript:;">日期时间</a>
+                  <dl class="layui-nav-child">  
+                    <dd data-name="demo1"> 
+                      <a lay-href="component/laydate/demo1.html" lay-text="layDate 功能演示一">功能演示一</a> 
+                    </dd>
+                    <dd data-name="demo2"> 
+                      <a lay-href="component/laydate/demo2.html" lay-text="layDate 功能演示二">功能演示二</a> 
+                    </dd>
+                    <dd data-name="theme"> 
+                      <a lay-href="component/laydate/theme.html" lay-text="layDate 设定主题">设定主题</a> 
+                    </dd>
+                    <dd data-name="special-demo"> 
+                      <a lay-href="component/laydate/special-demo.html" lay-text="layDate 特殊示例">特殊示例</a> 
+                    </dd>  
+                  </dl>  
+                </dd>
+                <dd data-name="table-static"> 
+                  <a lay-href="component/table/static.html">静态表格</a>
+                </dd>
+                <dd data-name="table"> 
+                  <a href="javascript:;">数据表格</a>
+                  <dl class="layui-nav-child">  
+                    <dd data-name="simple"> 
+                      <a lay-href="component/table/simple.html" lay-text="">简单数据表格</a> 
+                    </dd>
+                    <dd data-name="auto"> 
+                      <a lay-href="component/table/auto.html" lay-text="">列宽自动分配</a> 
+                    </dd>
+                    <dd data-name="data"> 
+                      <a lay-href="component/table/data.html" lay-text="">赋值已知数据</a> 
+                    </dd>
+                    <dd data-name="tostatic"> 
+                      <a lay-href="component/table/tostatic.html" lay-text="">转化静态表格</a> 
+                    </dd>
+                    <dd data-name="page"> 
+                      <a lay-href="component/table/page.html" lay-text="">开启分页</a> 
+                    </dd>
+                    <dd data-name="resetPage"> 
+                      <a lay-href="component/table/resetPage.html" lay-text="">自定义分页</a> 
+                    </dd>
+                    <dd data-name="toolbar"> 
+                      <a lay-href="component/table/toolbar.html" lay-text="">开启头部工具栏</a> 
+                    </dd>
+                    <dd data-name="totalRow"> 
+                      <a lay-href="component/table/totalRow.html" lay-text="">开启合计行</a> 
+                    </dd>
+                    <dd data-name="height"> 
+                      <a lay-href="component/table/height.html" lay-text="">高度最大适应</a> 
+                    </dd>
+                    <dd data-name="checkbox"> 
+                      <a lay-href="component/table/checkbox.html" lay-text="">开启复选框</a> 
+                    </dd>
+                    <dd data-name="radio"> 
+                      <a lay-href="component/table/radio.html" lay-text="">开启单选框</a> 
+                    </dd>
+                    <dd data-name="cellEdit"> 
+                      <a lay-href="component/table/cellEdit.html" lay-text="">开启单元格编辑</a> 
+                    </dd>
+                    <dd data-name="form"> 
+                      <a lay-href="component/table/form.html" lay-text="">加入表单元素</a> 
+                    </dd>
+                    <dd data-name="style"> 
+                      <a lay-href="component/table/style.html" lay-text="">设置单元格样式</a> 
+                    </dd>
+                    <dd data-name="fixed"> 
+                      <a lay-href="component/table/fixed.html" lay-text="">固定列</a> 
+                    </dd>
+                    <dd data-name="operate"> 
+                      <a lay-href="component/table/operate.html" lay-text="">数据操作</a> 
+                    </dd>
+                    <dd data-name="parseData"> 
+                      <a lay-href="component/table/parseData.html" lay-text="">解析任意数据格式</a> 
+                    </dd>
+                    <dd data-name="onrow"> 
+                      <a lay-href="component/table/onrow.html" lay-text="">监听行事件</a> 
+                    </dd>
+                    <dd data-name="reload">
+                      <a lay-href="component/table/reload.html" lay-text="">数据表格的重载</a> 
+                    </dd>
+                    <dd data-name="initSort"> 
+                      <a lay-href="component/table/initSort.html" lay-text="">设置初始排序</a> 
+                    </dd>
+                    <dd data-name="cellEvent"> 
+                      <a lay-href="component/table/cellEvent.html" lay-text="">监听单元格事件</a> 
+                    </dd>
+                    <dd data-name="thead"> 
+                      <a lay-href="component/table/thead.html" lay-text="">复杂表头</a> 
+                    </dd>
+                  </dl>
+                </dd>
+                <dd data-name="laypage"> 
+                  <a href="javascript:;">分页</a>  
+                  <dl class="layui-nav-child">  
+                    <dd data-name="demo1"> 
+                      <a lay-href="component/laypage/demo1.html" lay-text="layPage 功能演示一">功能演示一</a> 
+                    </dd>
+                    <dd data-name="demo2"> 
+                      <a lay-href="component/laypage/demo2.html" lay-text="layPage 功能演示二">功能演示二</a> 
+                    </dd> 
+                  </dl>  
+                </dd>
+                <dd data-name="upload"> 
+                  <a href="javascript:;">上传</a>  
+                  <dl class="layui-nav-child">  
+                    <dd data-name="demo1"> 
+                      <a lay-href="component/upload/demo1.html" lay-text="上传功能演示一">功能演示一</a> 
+                    </dd>
+                    <dd data-name="demo2"> 
+                      <a lay-href="component/upload/demo2.html" lay-text="上传功能演示二">功能演示二</a> 
+                    </dd> 
+                  </dl>  
+                </dd>
+                <dd data-name="colorpicker">
+                  <a lay-href="component/colorpicker/index.html">颜色选择器</a>
+                </dd>
+                <dd data-name="slider">
+                  <a lay-href="component/slider/index.html">滑块组件</a>
+                </dd>
+                <dd data-name="rate">
+                  <a lay-href="component/rate/index.html">评分</a>
+                </dd>
+                <dd data-name="carousel"> 
+                  <a lay-href="component/carousel/index.html">轮播</a>  
+                </dd>
+                <dd data-name="flow"> 
+                  <a lay-href="component/flow/index.html">流加载</a>  
+                </dd>
+                <dd data-name="util"> 
+                  <a lay-href="component/util/index.html">工具</a>  
+                </dd>
+                <dd data-name="code"> 
+                  <a lay-href="component/code/index.html">代码修饰</a> 
+                </dd>
+              </dl>
+            </li>
+            <li data-name="template" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="页面" lay-direction="2">
+                <i class="layui-icon layui-icon-template"></i>
+                <cite>页面</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd><a lay-href="template/personalpage.html">个人主页</a></dd>
+                <dd><a lay-href="template/addresslist.html">通讯录</a></dd>
+                <dd><a lay-href="template/caller.html">客户列表</a></dd>
+                <dd><a lay-href="template/goodslist.html">商品列表</a></dd>
+                <dd><a lay-href="template/msgboard.html">留言板</a></dd>
+                <dd><a lay-href="template/search.html">搜索结果</a></dd>
+                <dd><a href="user/reg.html" target="_blank">注册</a></dd>
+                <dd><a href="user/login.html" target="_blank">登入</a></dd>
+                <dd><a href="user/forget.html" target="_blank">忘记密码</a></dd>
+                <dd><a lay-href="template/tips/404.html">404页面不存在</a></dd>
+                <dd><a lay-href="template/tips/error.html">错误提示</a></dd>
+                <dd><a lay-href="//www.baidu.com/">百度一下</a></dd>
+                <dd><a lay-href="//www.layui.com/">layui官网</a></dd>
+                <dd><a lay-href="//www.layui.com/admin/">layuiAdmin官网</a></dd>
+              </dl>
+            </li>
+            <li data-name="app" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="应用" lay-direction="2">
+                <i class="layui-icon layui-icon-app"></i>
+                <cite>应用</cite>
+              </a>
+              <dl class="layui-nav-child">
+                
+                <dd data-name="content">
+                  <a href="javascript:;">内容系统</a>
+                  <dl class="layui-nav-child">
+                    <dd data-name="list"><a lay-href="app/content/list.html">文章列表</a></dd>
+                    <dd data-name="tags"><a lay-href="app/content/tags.html">分类管理</a></dd>
+                    <dd data-name="comment"><a lay-href="app/content/comment.html">评论管理</a></dd>
+                  </dl>
+                </dd>
+                <dd data-name="forum">
+                  <a href="javascript:;">社区系统</a>
+                  <dl class="layui-nav-child">
+                    <dd data-name="list"><a lay-href="app/forum/list.html">帖子列表</a></dd>
+                    <dd data-name="replys"><a lay-href="app/forum/replys.html">回帖列表</a></dd>
+                  </dl>
+                </dd>
+                <dd>
+                  <a lay-href="app/message/index.html">消息中心</a>
+                </dd>
+                <dd data-name="workorder">
+                  <a lay-href="app/workorder/list.html">工单系统</a>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="senior" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="高级" lay-direction="2">
+                <i class="layui-icon layui-icon-senior"></i>
+                <cite>高级</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd>
+                  <a layadmin-event="im">LayIM 通讯系统</a>  
+                </dd>
+                <dd data-name="echarts">
+                  <a href="javascript:;">Echarts集成</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="senior/echarts/line.html">折线图</a></dd>
+                    <dd><a lay-href="senior/echarts/bar.html">柱状图</a></dd>
+                    <dd><a lay-href="senior/echarts/map.html">地图</a></dd>
+                  </dl>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="user" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="用户" lay-direction="2">
+                <i class="layui-icon layui-icon-user"></i>
+                <cite>用户</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd>
+                  <a lay-href="user/user/list.html">网站用户</a>
+                </dd>
+                <dd>
+                  <a lay-href="user/administrators/list.html">后台管理员</a>
+                </dd>
+                <dd>
+                  <a lay-href="user/administrators/role.html">角色管理</a>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="set" class="layui-nav-item">
+              <a href="javascript:;" lay-tips="设置" lay-direction="2">
+                <i class="layui-icon layui-icon-set"></i>
+                <cite>设置</cite>
+              </a>
+              <dl class="layui-nav-child">
+                <dd class="layui-nav-itemed">
+                  <a href="javascript:;">系统设置</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="set/system/website.html">网站设置</a></dd>
+                    <dd><a lay-href="set/system/email.html">邮件服务</a></dd>
+                  </dl>
+                </dd>
+                <dd class="layui-nav-itemed">
+                  <a href="javascript:;">我的设置</a>
+                  <dl class="layui-nav-child">
+                    <dd><a lay-href="set/user/info.html">基本资料</a></dd>
+                    <dd><a lay-href="set/user/password.html">修改密码</a></dd>
+                  </dl>
+                </dd>
+              </dl>
+            </li>
+            <li data-name="get" class="layui-nav-item">
+              <a href="javascript:;" lay-href="//www.layui.com/admin/#get" lay-tips="授权" lay-direction="2">
+                <i class="layui-icon layui-icon-auz"></i>
+                <cite>授权</cite>
+              </a>
+            </li>
+          </ul>
+        </div>
+      </div>

+ 94 - 0
assets/layadmin_dever/html/inc/nav.html

@@ -0,0 +1,94 @@
+<div id="load_style" style="display:none;">
+</div>
+<div id="dever-name" style="display:none;"></div>
+<div class="layui-header" id="nav">
+
+  <div class="layui-tab" id="dever-menu" style="margin: 3px 221px;">
+  <ul class="layui-tab-title">
+    <li class="layui-this">网站设置</li>
+    <li>用户基本管理</li>
+    <li>权限分配</li>
+    <li>全部历史商品管理文字长一点试试</li>
+    <li>订单管理</li>
+  </ul>
+</div>
+
+<!-- 头部区域 -->
+<ul class="layui-nav layui-layout-left" style="display: none;">
+  <li class="layui-nav-item layadmin-flexible" lay-unselect>
+    <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
+      <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;" layadmin-event="back" title="上一页">
+      <i class="layui-icon layui-icon-return"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" id="front-url" lay-unselect style="display:none;">
+    <a href="http://www.layui.com/admin/" target="_blank" title="前台">
+      <i class="layui-icon layui-icon-website"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;" layadmin-event="refresh" title="刷新">
+      <i class="layui-icon layui-icon-refresh-3"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search.html?keywords="> 
+  </li>
+</ul>
+<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
+
+  <li class="layui-nav-item auth-top" lay-unselect style="display:none;">
+    <a href="javascript:;">
+      <cite><span></span></cite>
+    </a>
+    <ul class="layui-nav-child">
+      <li><a lay-href="set/user/info.html">基本资料</a></li>
+    </ul>
+  </li>
+
+  <li class="layui-nav-item" lay-unselect style="display:none;">
+    <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
+      <i class="layui-icon layui-icon-notice"></i>  
+      
+      <!-- 如果有新消息,则显示小圆点 -->
+      <span class="layui-badge-dot"></span>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="theme">
+      <i class="layui-icon layui-icon-theme"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="note">
+      <i class="layui-icon layui-icon-note"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect>
+    <a href="javascript:;" layadmin-event="fullscreen">
+      <i class="layui-icon layui-icon-screen-full"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;">
+      <cite id="manage-name"></cite>
+    </a>
+    <dl class="layui-nav-child">
+      <dd><a id="edit_password" onclick="pass($(this));" style="cursor: pointer;">修改密码</a></dd>
+      <hr>
+      <dd style="text-align: center;"><a id="logout-url" href="javascript:;">退出</a></dd>
+    </dl>
+  </li>
+  
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+  <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
+    <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+</ul>
+</div>

+ 49 - 0
assets/layadmin_dever/html/inc/script.html

@@ -0,0 +1,49 @@
+<script type="text/javascript" src="../script/lib/pic/webp.js"></script>
+
+<!--[if (gte IE 9)|!(IE)]><!-->
+<script type="text/javascript" src="../script/lib/jquery/store.js"></script>
+<script type="text/javascript" src="../script/lib/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="../script/lib/pjax/pjax.js"></script>
+<script type="text/javascript" src="../script/lib/pjax/nprogress.js"></script>
+<!--<![endif]-->
+
+<!-- 加载颜色控件 -->
+<script type="text/javascript" src="../script/lib/color/colpick.js"></script>
+
+<!-- 加载时间控件 -->
+<script type="text/javascript" src="../script/lib/datetime/jquery.datetimepicker.min.js"></script>
+
+<!-- 加载notify提醒 -->
+<!--script type="text/javascript" src="../script/lib/pnotify/pnotify.js"></script-->
+
+<!-- 加载图片展示 -->
+<script type="text/javascript" src="../script/lib/fancybox/jquery.fancybox.js"></script>
+
+<!-- 加载echarts -->
+<script type="text/javascript" src="../script/lib/echarts/echarts.common.min.js?v1"></script>
+
+<!-- 加载highlight.min.js -->
+<script type="text/javascript" src="../script/lib/highlight/highlight.min.js"></script>
+
+<!-- 加载valid -->
+<script type="text/javascript" src="../script/lib/valid/jquery.validationEngine.min.js?v3"></script>
+
+<!-- 加载文本编辑器 -->
+<script type="text/javascript" src="../script/lib/kindeditor/kindeditor-all-min.js?v9"></script>
+<script type="text/javascript" src="../script/lib/kindeditor/lang/zh-CN.js?v7"></script>
+
+<script type="text/javascript" src="../script/lib/ui/ui.min.js"></script>
+
+
+<script type="text/javascript" src="../script/lib/qiniu/upload/plupload.full.min.js"></script>
+
+<script type="text/javascript" src="../script/lib/qiniu/qiniu.upload.js"></script>
+<script type="text/javascript" src="../script/lib/tool/md5.js"></script>
+
+<script type="text/javascript" src="../script/lib/layui/upload.js?v6"></script>
+<script type="text/javascript" src="../script/lib/layui/layui.js"></script>
+
+<script type="text/javascript" src="../script/lib/clipboard/clipboard.js"></script>
+
+<!-- 加载主要js,很乱,后续优化 -->
+<script type="text/javascript" src="../script/lib/manage/main.js?v30"></script>

+ 80 - 0
assets/layadmin_dever/html/login.html

@@ -0,0 +1,80 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+  <link rel="stylesheet" href="../script/lib/layui/admin/style/login.css" media="all">
+</head>
+<body>
+
+  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
+    <form action="/auth.login" method="post" target="f1" class="form-horizontal m-t-20" id="login">
+    <input type="hidden" name="function" id="function" value="msg">
+    <input type="hidden" name="refer" id="refer" value="">
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+    <div class="layadmin-user-login-main">
+      <div class="layadmin-user-login-box layadmin-user-login-header">
+        <h2 id="name">dever</h2>
+      </div>
+      <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
+          <input type="text" name="username" id="username" lay-verify="required" placeholder="账号" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
+          <input name="password" id="password" type="password" lay-verify="required" placeholder="密码" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit">登 入</button>
+        </div>
+      </div>
+    </div>
+    
+    <div class="layui-trans layadmin-user-login-footer">
+      <p id="footer">© 2015-2020 dever.cc,Inc. Licensed under MIT license.</p>
+    </div>
+    
+    <div class="ladmin-user-login-theme" style="display:none;">
+      <script type="text/html" template>
+        <ul>
+          <li data-theme=""><img src="{{ layui.setter.base }}style/res/bg-none.jpg"></li>
+          <li data-theme="#03152A" style="background-color: #03152A;"></li>
+          <li data-theme="#2E241B" style="background-color: #2E241B;"></li>
+          <li data-theme="#50314F" style="background-color: #50314F;"></li>
+          <li data-theme="#344058" style="background-color: #344058;"></li>
+          <li data-theme="#20222A" style="background-color: #20222A;"></li>
+        </ul>
+      </script>
+    </div>
+    </form> 
+  </div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script>
+  $(function()
+  {
+    $("#login").bind("keydown",function(e){
+      var theEvent = e || window.event;    
+      var code = theEvent.keyCode || theEvent.which || theEvent.charCode;    
+      if (code == 13) {    
+              $("#login").submit();
+          }
+     });
+  });
+
+  </script>
+  <script>
+  layui.config({
+    base: '../script/lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'user'], function(){
+    var $ = layui.$
+    ,setter = layui.setter
+    ,admin = layui.admin
+  });
+  </script>
+</body>
+</html>

+ 145 - 0
assets/layadmin_dever/html/project/database/list.html

@@ -0,0 +1,145 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+  <link rel="stylesheet" href="../script/lib/layui/admin/modules/plugin/formselects/formselects.css" media="all" />
+</head>
+<body>
+<style id="addstyle">
+</style>
+<style>
+.layui-table-cell .layui-select,.layui-table-cell .layui-input
+{
+    height: 25px;
+}
+.layui-table-cell {
+    height: auto;
+}
+
+.table th,.table td {
+  min-width: 70px;
+}
+#table_2,#table_1 {
+  overflow: auto;
+}
+.layui-btn-xs
+{
+  margin-top:1px;
+}
+.dever-emoji img {
+  width:16px;
+}
+.layui-tab-title {
+  height: 100%;
+  white-space: inherit;
+}
+</style>
+<span id="dever-name" style="display:none;"></span>
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+
+<div id="content_1" style="display:none;"></div>
+<div id="content_2">
+  <div class="layui-fluid">
+    <div class="layui-card">
+      <input type="hidden" name="url1" id="url" value=""/>
+
+      <form id="form1" name="form1" method="get" target="f1">
+      <input type="hidden" name="l" id="l" value="msg"/>
+      <input type="hidden" name="project" id="project" value="msg"/>
+      <input type="hidden" name="table" id="tables" value="msg"/>
+      <input type="hidden" name="menu" id="menu" value="msg"/>
+      <input type="hidden" name="menu_id" id="menu_id" value="msg"/>
+      <input type="hidden" name="search_option_state" id="search_option_state" value="msg"/>
+
+      <input type="hidden" name="function" id="function" value="msg"/>
+      <input type="hidden" name="method" id="method" value="search"/>
+      <div id="search_param"></div> 
+      <iframe id="f1" name="f1" style="display:none;"></iframe>
+      <div class="layui-card-header" style="display:none;"><span id="list-name">网站设置</span> > <span id="list-project"></span></div>
+        <div class="layui-card-body" id="search_content">
+
+          <div class="layui-form layui-card-header layuiadmin-card-header-auto">
+            <div class="layui-form-item">
+              <div id="search"></div>
+            </div>
+          </div>
+        </div>
+      <div class="layui-card-body">
+        <div style="padding-bottom: 10px;">
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-parent" style="display:none;">返回上一页</a>
+
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-add">新增</a>
+
+          <span id="list-button"></span>
+        </div>
+        <div id="table_1" style="display:none;"></div>
+        <div id="table_2"> 
+          <table class="table layui-table layui-table-body" id="table">
+          <thead id="list-thead">
+              <tr>
+                  <th>Company</th>
+              </tr>
+          </thead>
+          <tbody id="list-tbody">
+              <tr>
+                  <th></th>
+              </tr>      
+              
+          </tbody>
+      </table>
+
+      <div id="mul"></div>
+      <div id="page"></div>
+      <div class="dever_desc" id="desc"></div>
+        </div>
+      </div>
+       </div>
+        </div>
+      </form>
+      <form id="form2" name="form2" method="get" style="display: none;"></form>
+      <div id="struct" style="display:none;"></div>
+    </div>
+  </div>
+</div>
+
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script ids="list-thead">
+    config.table = {};
+    config.table.cols = [];
+  </script>
+  <script ids="list-tbody">
+    config.table.data = [];
+  </script>
+  <script>
+  layui.config({
+    base: '../script/lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    formSelects: 'plugin/formselects/formselects',
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'contlist', 'table', 'form', 'formSelects'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+    var formSelects = layui.formSelects;
+
+    /*
+    table.render({
+      elem: '#table'
+      ,page: false
+      ,limit:20
+      ,cols: config.table.cols
+      ,data: config.table.data
+    });
+    */
+
+    init();
+  });
+  </script>
+</body>
+</html>

+ 173 - 0
assets/layadmin_dever/html/project/database/update.html

@@ -0,0 +1,173 @@
+
+
+<!DOCTYPE html>
+<html>
+<head>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+<link rel="stylesheet" href="../script/lib/layui/admin/modules/plugin/formselects/formselects.css" media="all" />
+  <style>
+    .layui-input,.xm-select-parent
+    {
+      width: 50%;
+    }
+
+    textarea{
+      padding-top: 5px;
+    }
+
+    .dever-color {
+      width: 100%;
+    }
+
+    .dever_form_add_child {
+      padding:15px;
+    }
+    .dever_form_delete {
+      float: right;
+      margin-right: 10px;
+      color: red;
+    }
+    .dever_score_child {
+      margin: 15px;
+    }
+    .layui-tab-title {
+      height: 100%;
+      white-space: inherit;
+    }
+    </style>
+</head>
+<body>
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+<div id="content_1" style="display:none;"></div>
+<div id="content_2">
+  <div class="layui-fluid">
+    <div style="display:none;"><span id="list-name">网站设置</span> > <span id="list-project"></span></div>
+    <form method="post" target="f1" class="form1" role="form" autocomplete="off">
+    <input type="hidden" name="function" id="function" value="msg"/>
+    <input type="hidden" name="url" id="url" />
+    <input type="hidden" name="project" id="project" />
+    <input type="hidden" name="table" id="table" />
+    <input type="hidden" name="update_where_id" id="update_where_id"/>
+    <input type="hidden" name="copy_num" id="copy_num" value="0"/>
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+
+    <div class="layui-row layui-col-space15">
+      <div class="layui-col-md12">
+        <div class="layui-card">
+          <div class="layui-card-header" style="display:none;">响应式组合</div>
+          <div class="layui-card-body" id="content">
+            <form class="layui-form" action="" lay-filter="component-form-element">
+              <div class="layui-row layui-col-space10 layui-form-item">
+                <div class="layui-col-lg12">
+                  <label class="layui-form-label">员工姓名:</label>
+                  <div class="layui-input-block">
+                    <input type="text" name="fullname" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
+                  </div>
+                </div>
+                <div class="layui-col-lg12">
+                  <label class="layui-form-label">技术工种:</label>
+                  <div class="layui-input-block">
+                    <select name="type" lay-verify="required" lay-filter="aihao">
+                      <option value=""></option>
+                      <option value="0">前端工程师</option>
+                      <option value="1">Node.js工程师</option>
+                      <option value="2">PHP工程师</option>
+                      <option value="3">Java工程师</option>
+                      <option value="4">运维</option>
+                      <option value="4">视觉设计师</option>
+                    </select>
+                  </div>
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">兴趣爱好:</label>
+                <div class="layui-input-block">
+                  <input type="checkbox" name="interest[write]" title="写作">
+                  <input type="checkbox" name="interest[read]" title="阅读">
+                  <input type="checkbox" name="interest[code]" title="代码" checked>
+                  <input type="checkbox" name="interest[dreaming]" title="做梦">
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">是否婚姻:</label>
+                <div class="layui-input-block">
+                  <input type="checkbox" name="marriage" lay-skin="switch" lay-text="是|否">
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">所属职称:</label>
+                <div class="layui-input-block">
+                  <input type="radio" name="role" value="" title="经理">
+                  <input type="radio" name="role" value="" title="主管">
+                  <input type="radio" name="role" value="" title="码农" checked>
+                  <input type="radio" name="role" value="" title="端水">
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label">其它信息:</label>
+                <div class="layui-input-block">
+                  <textarea name="other" placeholder="" class="layui-textarea"></textarea>
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <label class="layui-form-label"> </label>
+                <div class="layui-input-block">
+                  <input type="checkbox" name="agreement" title="同意" lay-skin="primary" checked>
+                </div>
+              </div>
+              <div class="layui-form-item">
+                <div class="layui-input-block">
+                  <button class="layui-btn" lay-submit lay-filter="component-form-element">立即提交</button>
+                  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
+                </div>
+              </div>
+            </form>
+          </div>
+          <div class="layui-card-body">
+            <div class="layui-form-item">
+                <div id="update_button">
+                  <button class="layui-btn" lay-submit lay-filter="component-form-element">立即提交</button>
+                  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
+                </div>
+              </div>
+            </div>
+        </div>
+      </div>
+    </div>
+    <div id="valid"></div>
+    <div id="struct" style="display:none;"></div>
+    </form>
+  </div>
+</div>
+
+  
+  <script class="include" system="" path="inc/" file="script">include()</script>
+  <script id="update_script">
+  layui.config({
+    base: '../script/lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index', //主入口模块
+    formSelects: 'plugin/formselects/formselects'
+  }).use(['index', 'contlist', 'table', 'form', 'formSelects'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+    var formSelects = layui.formSelects;
+
+    /*
+    $('select').each(function() {
+        if ($(this).attr('xm-value')) {
+          formSelects.value($(this).attr('xm-select'), $(this).attr('xm-value'));
+        }
+    });
+    */
+
+    init();
+  });
+  </script>
+</body>
+</html>

+ 1470 - 0
assets/moltran/css/components.css

@@ -0,0 +1,1470 @@
+/*
+Template Name: Moltran Dashboard
+Author: CoderThemes
+Email: coderthemes@gmail.com
+File: Components
+*/
+/*
+  - Buttons
+  - Panels
+  - Portlets
+  - Checkbox and Radio
+  - Progressbars
+  - Tables
+  - Form Elements
+  - Calendar
+  - Widgets
+*/
+/* ==============
+  Buttons
+===================*/
+.btn {
+  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  border-radius: 2px;
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  font-family: 'Nunito', sans-serif;
+  letter-spacing: 0.2px;
+  opacity: 0.93;
+}
+.btn:hover {
+  -moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+  -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+  opacity: 1;
+}
+.btn:focus {
+  -moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+  -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+  opacity: 1;
+}
+.btn-primary,
+.btn-success,
+.btn-info,
+.btn-warning,
+.btn-danger,
+.btn-inverse,
+.btn-purple,
+.btn-pink {
+  color: #ffffff !important;
+}
+.btn-default:hover {
+  background-color: #f9f9f9;
+}
+.btn-default:focus {
+  background-color: #f9f9f9;
+}
+.btn-default:active {
+  background-color: #f9f9f9;
+}
+.btn-primary,
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.focus,
+.btn-primary:active,
+.btn-primary:focus,
+.btn-primary:hover,
+.open > .dropdown-toggle.btn-primary {
+  background-color: #6e8cd7 !important;
+  border: 1px solid #6e8cd7 !important;
+}
+.btn-success,
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.btn-success.focus,
+.btn-success:active,
+.btn-success:focus,
+.btn-success:hover,
+.open > .dropdown-toggle.btn-success {
+  background-color: #33b86c !important;
+  border: 1px solid #33b86c !important;
+}
+.btn-info,
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.btn-info.focus,
+.btn-info:active,
+.btn-info:focus,
+.btn-info:hover,
+.open > .dropdown-toggle.btn-info {
+  background-color: #29b6f6 !important;
+  border: 1px solid #29b6f6 !important;
+}
+.btn-warning,
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.focus,
+.btn-warning:active,
+.btn-warning:focus,
+.btn-warning:hover,
+.open > .dropdown-toggle.btn-warning {
+  background-color: #ffd740 !important;
+  border: 1px solid #ffd740 !important;
+  color: #333333 !important;
+}
+.btn-danger,
+.btn-danger:active,
+.btn-danger:focus,
+.btn-danger:hover,
+.btn-danger.active,
+.btn-danger.focus,
+.btn-danger:active,
+.btn-danger:focus,
+.btn-danger:hover,
+.open > .dropdown-toggle.btn-danger {
+  background-color: #ef5350 !important;
+  border: 1px solid #ef5350 !important;
+}
+.btn-inverse,
+.btn-inverse:hover,
+.btn-inverse:focus,
+.btn-inverse:active,
+.btn-inverse.active,
+.btn-inverse.focus,
+.btn-inverse:active,
+.btn-inverse:focus,
+.btn-inverse:hover,
+.open > .dropdown-toggle.btn-inverse {
+  background-color: #212121 !important;
+  border: 1px solid #212121 !important;
+  color: #ffffff;
+}
+.btn-purple,
+.btn-purple:hover,
+.btn-purple:focus,
+.btn-purple:active {
+  background-color: #7e57c2 !important;
+  border: 1px solid #7e57c2 !important;
+  color: #ffffff;
+}
+.btn-pink,
+.btn-pink:hover,
+.btn-pink:focus,
+.btn-pink:active {
+  background-color: #ec407a !important;
+  border: 1px solid #ec407a !important;
+  color: #ffffff;
+}
+.btn-custom.btn-default:hover {
+  color: #333333 !important;
+}
+.btn-custom.btn-default:active {
+  color: #333333 !important;
+}
+.btn-custom.btn-default:focus {
+  color: #333333 !important;
+}
+.btn-custom.btn-primary {
+  color: #6e8cd7 !important;
+}
+.btn-custom.btn-success {
+  color: #33b86c !important;
+}
+.btn-custom.btn-info {
+  color: #29b6f6 !important;
+}
+.btn-custom.btn-warning {
+  color: #ffd740 !important;
+}
+.btn-custom.btn-danger {
+  color: #ef5350 !important;
+}
+.btn-custom.btn-inverse {
+  color: #212121 !important;
+}
+.btn-custom.btn-purple {
+  color: #7e57c2 !important;
+}
+.btn-custom.btn-pink {
+  color: #ec407a !important;
+}
+.btn-rounded {
+  border-radius: 2em;
+  padding: 6px 18px;
+}
+.btn-custom {
+  -moz-border-radius: 2px;
+  -moz-transition: all 400ms ease-in-out;
+  -o-transition: all 400ms ease-in-out;
+  -webkit-border-radius: 2px;
+  -webkit-transition: all 400ms ease-in-out;
+  background: transparent;
+  background-color: transparent !important;
+  border-radius: 2px;
+  border-width: 1px;
+  transition: all 400ms ease-in-out;
+}
+.btn-custom:hover {
+  color: #ffffff !important;
+}
+.btn-custom:focus {
+  color: #ffffff !important;
+}
+.fileupload {
+  overflow: hidden;
+  position: relative;
+}
+.fileupload input.upload {
+  cursor: pointer;
+  filter: alpha(opacity=0);
+  font-size: 20px;
+  margin: 0;
+  opacity: 0;
+  padding: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+}
+/* ==============
+  Panels
+===================*/
+.panel {
+  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  border-radius: 0px;
+  border: none;
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  margin-bottom: 20px;
+}
+.panel .panel-body {
+  padding: 20px;
+}
+.panel .panel-body p {
+  margin: 0px;
+}
+.panel .panel-body p + p {
+  margin-top: 15px;
+}
+.panel-heading {
+  border-radius: 0;
+  border: none !important;
+  padding: 10px 20px;
+}
+.panel-default > .panel-heading {
+  background-color: #fafafa;
+  border-bottom: none;
+  color: #797979;
+}
+.panel-title {
+  font-size: 14px;
+  font-weight: 600;
+  margin-bottom: 0;
+  margin-top: 0;
+  text-transform: uppercase;
+}
+.panel-footer {
+  background: #fafafa;
+  border-top: 0px;
+}
+.panel-color .panel-title {
+  color: #ffffff;
+}
+.panel-primary > .panel-heading {
+  background-color: #6e8cd7;
+}
+.panel-success > .panel-heading {
+  background-color: #33b86c;
+}
+.panel-info > .panel-heading {
+  background-color: #29b6f6;
+}
+.panel-warning > .panel-heading {
+  background-color: #ffd740;
+}
+.panel-danger > .panel-heading {
+  background-color: #ef5350;
+}
+.panel-purple > .panel-heading {
+  background-color: #7e57c2;
+}
+.panel-pink > .panel-heading {
+  background-color: #ec407a;
+}
+.panel-inverse > .panel-heading {
+  background-color: #212121;
+}
+.panel-border {
+  border-radius: 3px;
+}
+.panel-border .panel-heading {
+  background-color: #ffffff;
+  border-top: 3px solid #ccc !important;
+  border-radius: 3px;
+  padding: 10px 20px 0px;
+}
+.panel-border .panel-body {
+  padding: 15px 20px 20px 20px;
+}
+.panel-border.panel-primary .panel-heading {
+  border-color: #6e8cd7 !important;
+  color: #6e8cd7 !important;
+}
+.panel-border.panel-success .panel-heading {
+  border-color: #33b86c !important;
+  color: #33b86c !important;
+}
+.panel-border.panel-info .panel-heading {
+  border-color: #29b6f6 !important;
+  color: #29b6f6 !important;
+}
+.panel-border.panel-warning .panel-heading {
+  border-color: #ffd740 !important;
+  color: #ffd740 !important;
+}
+.panel-border.panel-danger .panel-heading {
+  border-color: #ef5350 !important;
+  color: #ef5350 !important;
+}
+.panel-border.panel-purple .panel-heading {
+  border-color: #7e57c2 !important;
+  color: #7e57c2 !important;
+}
+.panel-border.panel-pink .panel-heading {
+  border-color: #ec407a !important;
+  color: #ec407a !important;
+}
+.panel-border.panel-inverse .panel-heading {
+  border-color: #212121 !important;
+  color: #212121 !important;
+}
+.panel-fill {
+  border-radius: 3px;
+}
+.panel-fill .panel-heading {
+  background-color: transparent;
+  color: #ffffff;
+  border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
+}
+.panel-fill .panel-body {
+  color: rgba(255, 255, 255, 0.85);
+}
+.panel-fill.panel-default .panel-body {
+  color: #666;
+}
+.panel-fill.panel-default .panel-heading {
+  background-color: transparent;
+  color: #333333;
+  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
+}
+.panel-fill.panel-primary {
+  background-color: #489ce7;
+}
+.panel-fill.panel-success {
+  background-color: #58c386;
+}
+.panel-fill.panel-info {
+  background-color: #50c1f4;
+}
+.panel-fill.panel-warning {
+  background-color: #fcdc63;
+}
+.panel-fill.panel-danger {
+  background-color: #ef7270;
+}
+.panel-fill.panel-purple {
+  background-color: #9475cb;
+}
+.panel-fill.panel-pink {
+  background-color: #ec6391;
+}
+.panel-fill.panel-inverse {
+  background-color: #4a4a4a;
+}
+.panel-group .panel .panel-heading a[data-toggle=collapse].collapsed:before {
+  content: '\f067';
+}
+.panel-group .panel .panel-heading .accordion-toggle.collapsed:before {
+  content: '\f067';
+}
+.panel-group .panel .panel-heading a[data-toggle=collapse] {
+  display: block;
+}
+.panel-group .panel .panel-heading a[data-toggle=collapse]:before {
+  content: '\f068';
+  display: block;
+  float: right;
+  font-family: 'FontAwesome';
+  font-size: 14px;
+  text-align: right;
+  width: 25px;
+}
+.panel-group .panel .panel-heading .accordion-toggle {
+  display: block;
+}
+.panel-group .panel .panel-heading .accordion-toggle:before {
+  content: '\f068';
+  display: block;
+  float: right;
+  font-family: 'FontAwesome';
+  font-size: 14px;
+  text-align: right;
+  width: 25px;
+}
+.panel-group .panel .panel-heading + .panel-collapse .panel-body {
+  border-top: none;
+}
+.panel-group .panel-heading {
+  padding: 12px 26px;
+}
+.panel-group.panel-group-joined .panel + .panel {
+  border-top: 1px solid #eeeeee;
+  margin-top: 0;
+}
+.panel-group-joined .panel-group .panel + .panel {
+  border-top: 1px solid #eeeeee;
+  margin-top: 0;
+}
+/* ==============
+  Portlets
+===================*/
+.portlet {
+  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -moz-transition: all 0.4s;
+  -o-transition: all 0.4s;
+  -webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -webkit-transition: all 0.4s;
+  background: #ffffff;
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  margin-bottom: 20px;
+  transition: all 0.4s;
+}
+.portlet .portlet-heading {
+  border-radius: 3px;
+  color: #ffffff;
+  padding: 12px 20px;
+}
+.portlet .portlet-heading .portlet-title {
+  color: #ffffff;
+  float: left;
+  font-size: 16px;
+  font-weight: 600;
+  margin-bottom: 0;
+  margin-top: 0;
+}
+.portlet .portlet-heading .portlet-widgets {
+  display: inline-block;
+  float: right;
+  font-size: 15px;
+  line-height: 30px;
+  padding-left: 15px;
+  position: relative;
+  text-align: right;
+}
+.portlet .portlet-heading .portlet-widgets .divider {
+  margin: 0 5px;
+}
+.portlet .portlet-heading a {
+  color: #999999;
+}
+.portlet .portlet-body {
+  -moz-border-radius-bottomleft: 5px;
+  -moz-border-radius-bottomright: 5px;
+  -webkit-border-bottom-left-radius: 5px;
+  -webkit-border-bottom-right-radius: 5px;
+  background: #ffffff;
+  border-bottom-left-radius: 5px;
+  border-bottom-right-radius: 5px;
+  padding: 15px;
+}
+.portlet-default .portlet-title {
+  color: #797979 !important;
+}
+.portlet .portlet-heading.bg-purple a,
+.portlet .portlet-heading.bg-info a,
+.portlet .portlet-heading.bg-success a,
+.portlet .portlet-heading.bg-primary a,
+.portlet .portlet-heading.bg-danger a,
+.portlet .portlet-heading.bg-warning a,
+.portlet .portlet-heading.bg-inverse a,
+.portlet .portlet-heading.bg-pink a {
+  color: #ffffff;
+}
+.panel-disabled {
+  background: rgba(243, 242, 241, 0.5);
+  bottom: 15px;
+  left: 0px;
+  position: absolute;
+  right: -5px;
+  top: 0;
+}
+.loader-1 {
+  -moz-animation: loaderAnimate 1000ms linear infinite;
+  -o-animation: loaderAnimate 1000ms linear infinite;
+  -webkit-animation: loaderAnimate 1000ms linear infinite;
+  animation: loaderAnimate 1000ms linear infinite;
+  clip: rect(0, 30px, 30px, 15px);
+  height: 30px;
+  left: 50%;
+  margin-left: -15px;
+  margin-top: -15px;
+  position: absolute;
+  top: 50%;
+  width: 30px;
+}
+.loader-1:after {
+  -moz-animation: loaderAnimate2 1000ms ease-in-out infinite;
+  -o-animation: loaderAnimate2 1000ms ease-in-out infinite;
+  -webkit-animation: loaderAnimate2 1000ms ease-in-out infinite;
+  animation: loaderAnimate2 1000ms ease-in-out infinite;
+  border-radius: 50%;
+  clip: rect(0, 30px, 30px, 15px);
+  content: '';
+  height: 30px;
+  position: absolute;
+  width: 30px;
+}
+/* ==============
+  Checkbox and Radio
+===================*/
+.checkbox {
+  padding-left: 20px;
+}
+.checkbox label {
+  display: inline-block;
+  padding-left: 5px;
+  position: relative;
+}
+.checkbox label::before {
+  -o-transition: 0.3s ease-in-out;
+  -webkit-transition: 0.3s ease-in-out;
+  background-color: #ffffff;
+  border-radius: 3px;
+  border: 1px solid #cccccc;
+  content: "";
+  display: inline-block;
+  height: 17px;
+  left: 0;
+  margin-left: -20px;
+  position: absolute;
+  transition: 0.3s ease-in-out;
+  width: 17px;
+  outline: none !important;
+}
+.checkbox label::after {
+  color: #555555;
+  display: inline-block;
+  font-size: 11px;
+  height: 16px;
+  left: 0;
+  margin-left: -20px;
+  padding-left: 3px;
+  padding-top: 1px;
+  position: absolute;
+  top: 0;
+  width: 16px;
+}
+.checkbox input[type="checkbox"] {
+  cursor: pointer;
+  opacity: 0;
+  z-index: 1;
+  outline: none !important;
+}
+.checkbox input[type="checkbox"]:disabled + label {
+  opacity: 0.65;
+}
+.checkbox input[type="checkbox"]:focus + label::before {
+  outline-offset: -2px;
+  outline: none;
+}
+.checkbox input[type="checkbox"]:checked + label::after {
+  content: "\f00c";
+  font-family: 'FontAwesome';
+}
+.checkbox input[type="checkbox"]:disabled + label::before {
+  background-color: #eeeeee;
+  cursor: not-allowed;
+}
+.checkbox.checkbox-circle label::before {
+  border-radius: 50%;
+}
+.checkbox.checkbox-inline {
+  margin-top: 0;
+}
+.checkbox.checkbox-single label {
+  height: 17px;
+}
+.checkbox-primary input[type="checkbox"]:checked + label::before {
+  background-color: #6e8cd7;
+  border-color: #6e8cd7;
+}
+.checkbox-primary input[type="checkbox"]:checked + label::after {
+  color: #ffffff;
+}
+.checkbox-danger input[type="checkbox"]:checked + label::before {
+  background-color: #ef5350;
+  border-color: #ef5350;
+}
+.checkbox-danger input[type="checkbox"]:checked + label::after {
+  color: #ffffff;
+}
+.checkbox-info input[type="checkbox"]:checked + label::before {
+  background-color: #29b6f6;
+  border-color: #29b6f6;
+}
+.checkbox-info input[type="checkbox"]:checked + label::after {
+  color: #ffffff;
+}
+.checkbox-warning input[type="checkbox"]:checked + label::before {
+  background-color: #ffd740;
+  border-color: #ffd740;
+}
+.checkbox-warning input[type="checkbox"]:checked + label::after {
+  color: #ffffff;
+}
+.checkbox-success input[type="checkbox"]:checked + label::before {
+  background-color: #33b86c;
+  border-color: #33b86c;
+}
+.checkbox-success input[type="checkbox"]:checked + label::after {
+  color: #ffffff;
+}
+.radio {
+  padding-left: 20px;
+}
+.radio label {
+  display: inline-block;
+  padding-left: 5px;
+  position: relative;
+}
+.radio label::before {
+  -o-transition: border 0.5s ease-in-out;
+  -webkit-transition: border 0.5s ease-in-out;
+  background-color: #ffffff;
+  border-radius: 50%;
+  border: 1px solid #cccccc;
+  content: "";
+  display: inline-block;
+  height: 17px;
+  left: 0;
+  margin-left: -20px;
+  outline: none !important;
+  position: absolute;
+  transition: border 0.5s ease-in-out;
+  width: 17px;
+}
+.radio label::after {
+  -moz-transition: -moz-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
+  -ms-transform: scale(0, 0);
+  -o-transform: scale(0, 0);
+  -o-transition: -o-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
+  -webkit-transform: scale(0, 0);
+  -webkit-transition: -webkit-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
+  background-color: #555555;
+  border-radius: 50%;
+  content: " ";
+  display: inline-block;
+  height: 11px;
+  left: 3px;
+  margin-left: -20px;
+  position: absolute;
+  top: 3px;
+  transform: scale(0, 0);
+  transition: transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
+  width: 11px;
+}
+.radio input[type="radio"] {
+  cursor: pointer;
+  opacity: 0;
+  z-index: 1;
+  outline: none !important;
+}
+.radio input[type="radio"]:disabled + label {
+  opacity: 0.65;
+}
+.radio input[type="radio"]:focus + label::before {
+  outline-offset: -2px;
+  outline: none;
+}
+.radio input[type="radio"]:checked + label::after {
+  -ms-transform: scale(1, 1);
+  -o-transform: scale(1, 1);
+  -webkit-transform: scale(1, 1);
+  transform: scale(1, 1);
+}
+.radio input[type="radio"]:disabled + label::before {
+  cursor: not-allowed;
+}
+.radio.radio-inline {
+  margin-top: 0;
+}
+.radio.radio-single label {
+  height: 17px;
+}
+.radio-primary input[type="radio"] + label::after {
+  background-color: #6e8cd7;
+}
+.radio-primary input[type="radio"]:checked + label::before {
+  border-color: #6e8cd7;
+}
+.radio-primary input[type="radio"]:checked + label::after {
+  background-color: #6e8cd7;
+}
+.radio-danger input[type="radio"] + label::after {
+  background-color: #ef5350;
+}
+.radio-danger input[type="radio"]:checked + label::before {
+  border-color: #ef5350;
+}
+.radio-danger input[type="radio"]:checked + label::after {
+  background-color: #ef5350;
+}
+.radio-info input[type="radio"] + label::after {
+  background-color: #29b6f6;
+}
+.radio-info input[type="radio"]:checked + label::before {
+  border-color: #29b6f6;
+}
+.radio-info input[type="radio"]:checked + label::after {
+  background-color: #29b6f6;
+}
+.radio-warning input[type="radio"] + label::after {
+  background-color: #ffd740;
+}
+.radio-warning input[type="radio"]:checked + label::before {
+  border-color: #ffd740;
+}
+.radio-warning input[type="radio"]:checked + label::after {
+  background-color: #ffd740;
+}
+.radio-success input[type="radio"] + label::after {
+  background-color: #33b86c;
+}
+.radio-success input[type="radio"]:checked + label::before {
+  border-color: #33b86c;
+}
+.radio-success input[type="radio"]:checked + label::after {
+  background-color: #33b86c;
+}
+/* ==============
+  Progressbars
+===================*/
+.progress {
+  -webkit-box-shadow: none !important;
+  background-color: #f5f5f5;
+  box-shadow: none !important;
+  height: 10px;
+  margin-bottom: 18px;
+  overflow: hidden;
+}
+.progress-bar {
+  box-shadow: none;
+  font-size: 8px;
+  font-weight: 600;
+  line-height: 12px;
+}
+.progress.progress-sm {
+  height: 5px !important;
+}
+.progress.progress-sm .progress-bar {
+  font-size: 8px;
+  line-height: 5px;
+}
+.progress.progress-md {
+  height: 15px !important;
+}
+.progress.progress-md .progress-bar {
+  font-size: 10.8px;
+  line-height: 14.4px;
+}
+.progress.progress-lg {
+  height: 20px !important;
+}
+.progress.progress-lg .progress-bar {
+  font-size: 12px;
+  line-height: 20px;
+}
+.progress-bar-primary {
+  background-color: #6e8cd7;
+}
+.progress-bar-success {
+  background-color: #33b86c;
+}
+.progress-bar-info {
+  background-color: #29b6f6;
+}
+.progress-bar-warning {
+  background-color: #ffd740;
+}
+.progress-bar-danger {
+  background-color: #ef5350;
+}
+.progress-bar-inverse {
+  background-color: #212121;
+}
+.progress-bar-purple {
+  background-color: #7e57c2;
+}
+.progress-bar-pink {
+  background-color: #ec407a;
+}
+.progress-animated {
+  -webkit-animation-duration: 5s;
+  -webkit-animation-name: animationProgress;
+  -webkit-transition: 5s all;
+  animation-duration: 5s;
+  animation-name: animationProgress;
+  transition: 5s all;
+}
+/* ==============
+  Tables
+===================*/
+.table {
+  margin-bottom: 10px;
+}
+tbody {
+  color: #797979;
+}
+th {
+  color: #666666;
+  font-size: 15px;
+}
+table.focus-on tbody tr.focused th {
+  background-color: #6e8cd7;
+  color: #ffffff;
+}
+table.focus-on tbody tr.focused td {
+  background-color: #6e8cd7;
+  color: #ffffff;
+}
+.table-rep-plugin tbody th {
+  font-size: 14px;
+  font-weight: normal;
+}
+.modal-block {
+  background: transparent;
+  margin: 40px auto;
+  max-width: 600px;
+  padding: 0;
+  position: relative;
+  text-align: left;
+}
+.dt-buttons {
+  float: left;
+}
+div#datatable-buttons_info {
+  float: left;
+}
+table.dataTable th.focus,
+table.dataTable td.focus {
+  outline: 3px solid #6e8cd7 !important;
+  outline-offset: -1px;
+}
+.fixedHeader-floating {
+  top: 70px !important;
+}
+#datatable-editable .actions a {
+  padding: 5px;
+}
+#datatable-editable .form-control {
+  background-color: #ffffff;
+  width: 100%;
+}
+#datatable-editable .fa-trash-o {
+  color: #ef5350;
+}
+#datatable-editable .fa-times {
+  color: #ef5350;
+}
+#datatable-editable .fa-pencil {
+  color: #29b6f6;
+}
+#datatable-editable .fa-save {
+  color: #33b86c;
+}
+#datatable td {
+  font-weight: normal;
+}
+div.dataTables_paginate ul.pagination {
+  margin-top: 30px;
+}
+div.dataTables_info {
+  padding-top: 38px;
+}
+/* ==============
+  Form-elements
+===================*/
+.error {
+  color: #ff0000;
+}
+.datepicker {
+  border: 1px solid #dddddd;
+  padding: 8px;
+}
+.datepicker th {
+  font-size: 14px !important;
+}
+.search-input {
+  margin-bottom: 10px;
+}
+.ms-selectable {
+  box-shadow: none;
+  outline: none !important;
+}
+.ms-container .ms-list.ms-focus {
+  box-shadow: none;
+}
+.ms-container .ms-selectable li.ms-hover {
+  background-color: #6e8cd7;
+}
+.ms-container .ms-selection li.ms-hover {
+  background-color: #6e8cd7;
+}
+.spinner-buttons.btn-group-vertical .btn {
+  background-color: #eeeeee;
+  border: none !important;
+  box-shadow: none !important;
+  height: 17px;
+  line-height: 16px;
+  margin: 0;
+  padding-left: 6px;
+  padding-right: 6px;
+  text-align: center;
+  width: 22px;
+}
+.spinner-buttons.btn-group-vertical .btn i {
+  color: #333333 !important;
+  line-height: 10px;
+  margin-top: -3px;
+}
+.spinner-buttons.btn-group-vertical .btn:first-child {
+  -webkit-border-radius: 0 0px 0 0 !important;
+  border-radius: 0 0px 0 0 !important;
+}
+.spinner-buttons.btn-group-vertical .btn:last-child {
+  -webkit-border-radius: 0 0 0px !important;
+  border-radius: 0 0 0px !important;
+}
+.note-editor {
+  border: 1px solid #dddddd;
+  position: relative;
+}
+.note-editor .note-toolbar {
+  background-color: #f3f3f3;
+  border-bottom: 1px solid #dddddd;
+  margin: 0;
+}
+.note-editor .note-statusbar {
+  background-color: #ffffff;
+}
+.note-editor .note-statusbar .note-resizebar {
+  border-top: 1px solid #dddddd;
+  height: 15px;
+  padding-top: 3px;
+}
+.note-popover .popover .popover-content {
+  padding: 5px 0 10px 5px;
+}
+.note-toolbar {
+  padding: 5px 0 10px 5px;
+}
+.code-edit-wrap {
+  padding: 0px !important;
+}
+.cm-s-ambiance .CodeMirror-linenumber {
+  color: #bcbcbc;
+}
+.cm-s-ambiance .CodeMirror-gutters {
+  background-color: #212121 !important;
+  box-shadow: none;
+}
+.cm-s-ambiance.CodeMirror {
+  background-color: #212121 !important;
+  box-shadow: none;
+}
+.bootstrap-timepicker-widget table td a:hover {
+  background-color: transparent;
+  border-color: transparent;
+  border-radius: 4px;
+  color: #6e8cd7;
+  text-decoration: none;
+}
+.editor-horizontal .popover-content {
+  padding: 9px 30px;
+}
+.wizard > .content {
+  background: #ffffff;
+  min-height: 240px;
+  padding: 20px;
+}
+.wizard > .content > .body {
+  padding: 0px;
+}
+.wizard > .content > .body input {
+  border: 1px solid #eeeeee;
+}
+.wizard > .content > .body ul > li {
+  display: block;
+  line-height: 30px;
+}
+.wizard > .content > .body label.error {
+  color: #e55957;
+  margin-left: 0;
+}
+.wizard > .content > .body label {
+  display: inline-block;
+  margin-top: 10px;
+}
+.wizard > .steps .number {
+  border-radius: 50%;
+  display: inline-block;
+  line-height: 30px;
+  margin-right: 10px;
+}
+.wizard > .steps .disabled a {
+  background: #f2f2f2;
+  color: #333333;
+  cursor: default;
+}
+.wizard > .steps .disabled a:hover {
+  background: #f2f2f2;
+  color: #333333;
+  cursor: default;
+}
+.wizard > .steps .disabled a:active {
+  background: #f2f2f2;
+  color: #333333;
+  cursor: default;
+}
+.wizard > .steps .current a {
+  background: #6e8cd7;
+}
+.wizard > .steps .current a:hover {
+  background: #6e8cd7;
+}
+.wizard > .steps .current a:hover .number {
+  background: transparent;
+  color: #ffffff;
+}
+.wizard > .steps .current a:active {
+  background: #6e8cd7;
+}
+.wizard > .steps .current a:active .number {
+  background: transparent;
+  color: #ffffff;
+}
+.wizard > .steps .current a .number {
+  background: transparent;
+  color: #ffffff;
+}
+.wizard > .steps .done a {
+  background: #cccccc;
+}
+.wizard > .steps .done a:hover {
+  background: #cccccc;
+}
+.wizard > .steps .done a:active {
+  background: #cccccc;
+}
+.wizard > .steps a,
+.wizard > .steps a:hover,
+.wizard > .steps a:active,
+.wizard > .content {
+  border-radius: 2px;
+}
+.wizard > .actions {
+  margin-bottom: 30px;
+}
+.wizard > .actions a {
+  background: #6e8cd7;
+  border-radius: 2px;
+  color: #ffffff;
+}
+.wizard > .actions a:hover {
+  background: #6e8cd7;
+  border-radius: 2px;
+  color: #ffffff;
+}
+.wizard > .actions a:active {
+  background: #6e8cd7;
+  border-radius: 2px;
+  color: #ffffff;
+}
+.wizard > .actions .disabled a {
+  background: #e2e2e2;
+  color: #333333;
+}
+.wizard > .actions .disabled a:hover {
+  background: #e2e2e2;
+  color: #333333;
+}
+.wizard > .actions .disabled a:active {
+  background: #e2e2e2;
+  color: #333333;
+}
+.datepicker table tr td.active,
+.datepicker table tr td.active:hover,
+.datepicker table tr td.active.disabled,
+.datepicker table tr td.active.disabled:hover {
+  background-color: #6e8cd7 !important;
+  background-image: none;
+  box-shadow: none;
+}
+/* Select2 */
+.select2-container .select2-choice {
+  background-image: none !important;
+  border: none !important;
+  height: auto  !important;
+  padding: 0px !important;
+  line-height: 22px !important;
+  background-color: transparent !important;
+  box-shadow: none !important;
+}
+.select2-container .select2-choice .select2-arrow {
+  background-image: none !important;
+  background: transparent;
+  border: none;
+  width: 14px;
+  top: 2px;
+  right: 5px;
+}
+.select2-container .select2-container-multi.form-control {
+  height: auto;
+}
+.select2-results .select2-highlighted {
+  background-color: #6e8cd7;
+}
+.select2-drop-active {
+  border: 1px solid #e3e3e3 !important;
+  padding-top: 5px;
+  -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
+  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
+  -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
+}
+.select2-search input {
+  border: 1px solid #e3e3e3;
+}
+.select2-container-multi {
+  width: 100%;
+}
+.select2-container-multi .select2-choices {
+  border: 2px solid rgba(255, 255, 255, 0.2) !important;
+  box-shadow: none !important;
+  background: transparent !important;
+  background-image: none  !important;
+  -webkit-border-radius: 4px !important;
+  border-radius: 4px !important;
+  -moz-border-radius: 4px !important;
+  background-clip: padding-box !important;
+  min-height: 34px;
+}
+.select2-container-multi .select2-choices .select2-search-choice {
+  padding: 6px 8px 7px 19px;
+  margin: 5px 0 3px 5px;
+  background: #eeeeee;
+  border: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.select2-container-multi .select2-choices .select2-search-field input {
+  padding: 7px 7px 7px 10px;
+  font-family: inherit;
+}
+.select2-container-multi .select2-choices .select2-search-choice-close {
+  top: 6px;
+}
+.select2-chosen {
+  line-height: 34px;
+  padding-left: 15px;
+  color: #444444;
+}
+/* Timepiker */
+.bootstrap-timepicker-widget table td input {
+  border: none;
+}
+/* Dropzone */
+.dropzone {
+  min-height: 230px;
+  border: 2px dashed rgba(0, 0, 0, 0.3);
+  background: white;
+  border-radius: 6px;
+}
+.dropzone .dz-message {
+  font-size: 30px;
+}
+/* ==============
+  Calendar
+===================*/
+.calendar {
+  float: left;
+  margin-bottom: 0px;
+}
+.none-border .modal-footer {
+  border-top: none;
+}
+.fc-toolbar {
+  margin-bottom: 5px;
+}
+.fc-toolbar h2 {
+  font-size: 18px;
+  font-weight: 600;
+  line-height: 30px;
+  text-transform: uppercase;
+}
+.fc-day {
+  background: #ffffff;
+}
+.fc-toolbar .fc-state-active,
+.fc-toolbar .ui-state-active,
+.fc-toolbar button:focus,
+.fc-toolbar button:hover,
+.fc-toolbar .ui-state-hover {
+  z-index: 0;
+}
+.fc-widget-header {
+  border: 1px solid #d5d5d5;
+}
+.fc-widget-content {
+  border: 1px solid #d5d5d5;
+}
+.fc th.fc-widget-header {
+  background: #dddddd;
+  font-size: 14px;
+  line-height: 20px;
+  padding: 10px 0px;
+  text-transform: uppercase;
+}
+.fc-button {
+  background: #ffffff;
+  border: 1px solid #d5d5d5;
+  color: #555555;
+  text-transform: capitalize;
+}
+.fc-text-arrow {
+  font-family: arial;
+  font-size: 16px;
+}
+.fc-state-hover {
+  background: #F5F5F5;
+}
+.fc-state-highlight {
+  background: #f0f0f0;
+}
+.fc-cell-overlay {
+  background: #f0f0f0;
+}
+.fc-unthemed .fc-today {
+  background: #ffffff;
+}
+.fc-event {
+  border-radius: 2px;
+  border: none;
+  cursor: move;
+  font-size: 13px;
+  margin: 5px 7px;
+  padding: 5px 5px;
+  text-align: center;
+}
+.external-event {
+  color: #ffffff;
+  cursor: move;
+  margin: 10px 0;
+  padding: 6px 10px;
+}
+.fc-basic-view td.fc-week-number span {
+  padding-right: 5px;
+}
+.fc-basic-view td.fc-day-number {
+  padding-right: 5px;
+}
+/* ==============
+  Widgets
+===================*/
+.widget-s-1 {
+  border-radius: 6px;
+}
+.mini-stat {
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
+  border-radius: 3px;
+  margin-bottom: 20px;
+  padding: 20px;
+  color: #ffffff;
+}
+.mini-stat-icon {
+  -moz-border-radius: 100%;
+  -webkit-border-radius: 100%;
+  border-radius: 100%;
+  background-color: rgba(255, 255, 255, 0.2);
+  display: inline-block;
+  float: left;
+  font-size: 30px;
+  height: 60px;
+  line-height: 60px;
+  margin-right: 10px;
+  text-align: center;
+  width: 60px;
+}
+.mini-stat-info {
+  padding-top: 2px;
+  color: #eeeeee;
+}
+.mini-stat-info span {
+  color: #ffffff;
+  display: block;
+  font-size: 24px;
+  font-weight: 600;
+}
+.mini-stat-info span.name {
+  color: #ffffff;
+  display: block;
+  font-size: 18px;
+  font-weight: 600;
+  margin-top: 5px;
+}
+.inbox-widget .inbox-item {
+  border-bottom: 1px solid #f1f1f1;
+  overflow: hidden;
+  padding: 10px 0;
+  position: relative;
+}
+.inbox-widget .inbox-item .inbox-item-img {
+  display: block;
+  float: left;
+  margin-right: 15px;
+  width: 40px;
+}
+.inbox-widget .inbox-item img {
+  width: 40px;
+}
+.inbox-widget .inbox-item .inbox-item-author {
+  color: #333333;
+  display: block;
+  margin: 0;
+}
+.inbox-widget .inbox-item .inbox-item-text {
+  color: #a0a0a0;
+  display: block;
+  font-size: 12px;
+  margin: 0;
+}
+.inbox-widget .inbox-item .inbox-item-date {
+  color: #a9a9a9;
+  font-size: 11px;
+  position: absolute;
+  right: 7px;
+  top: 2px;
+}
+.conversation-list {
+  list-style: none;
+  max-height: 330px;
+  padding: 0px 20px;
+}
+.conversation-list li {
+  margin-bottom: 24px;
+}
+.conversation-list .chat-avatar {
+  display: inline-block;
+  float: left;
+  text-align: center;
+  width: 40px;
+}
+.conversation-list .chat-avatar img {
+  border-radius: 100%;
+  width: 100%;
+}
+.conversation-list .chat-avatar i {
+  font-size: 12px;
+  font-style: normal;
+}
+.conversation-list .ctext-wrap {
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
+  background: #f5f5f5;
+  border-radius: 3px;
+  display: inline-block;
+  padding: 10px;
+  position: relative;
+}
+.conversation-list .ctext-wrap i {
+  color: #1a2942;
+  display: block;
+  font-size: 12px;
+  font-style: normal;
+  font-weight: bold;
+  position: relative;
+}
+.conversation-list .ctext-wrap p {
+  margin: 0px;
+  padding-top: 3px;
+}
+.conversation-list .ctext-wrap:after {
+  right: 100%;
+  top: 20%;
+  border: solid transparent;
+  content: " ";
+  height: 0;
+  width: 0;
+  position: absolute;
+  pointer-events: none;
+  border-color: rgba(213, 242, 239, 0);
+  border-right-color: #f5f5f5;
+  border-width: 5px;
+  margin-top: -5px;
+}
+.conversation-list .conversation-text {
+  display: inline-block;
+  float: left;
+  font-size: 12px;
+  margin-left: 12px;
+  width: 70%;
+}
+.conversation-list .odd .chat-avatar {
+  float: right !important;
+}
+.conversation-list .odd .conversation-text {
+  float: right !important;
+  margin-right: 12px;
+  text-align: right;
+  width: 70% !important;
+}
+.conversation-list .odd .ctext-wrap {
+  background: #e8e9ec !important;
+}
+.conversation-list .odd .ctext-wrap i {
+  color: #acacac;
+}
+.conversation-list .odd .ctext-wrap:after {
+  border-color: rgba(238, 238, 242, 0) !important;
+  border-left-color: #e8e9ec !important;
+  left: 100% !important;
+  top: 20% !important;
+}
+.chat-send {
+  padding-left: 0px;
+  padding-right: 30px;
+}
+.chat-send button {
+  width: 100%;
+}
+.chat-inputbar {
+  padding-left: 30px;
+}
+#todo-message {
+  font-size: 16px;
+}
+.todoapp {
+  padding: 10px 30px 20px 30px !important;
+}
+.todo-list li {
+  border-bottom: 1px solid #eeeeee;
+  border-radius: 0px;
+  border: 0px;
+  margin: 0px;
+  padding-left: 0px !important;
+  padding-right: 0px !important;
+}
+.todo-list li:last-of-type {
+  border-bottom: none;
+}
+.todo-send {
+  padding-left: 0px;
+}

+ 1397 - 0
assets/moltran/css/core.css

@@ -0,0 +1,1397 @@
+/*
+Template Name: Moltran Dashboard
+Author: CoderThemes
+Email: coderthemes@gmail.com
+File: Common
+*/
+/* ==============
+  General
+===================*/
+body {
+  background: #f5f5f5;
+  margin: 0;
+}
+html {
+  overflow-x: hidden;
+  position: relative;
+  min-height: 100%;
+  background: #f5f5f5;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  color: #505458;
+  margin: 10px 0;
+}
+h1 {
+  line-height: 43px;
+}
+h2 {
+  line-height: 35px;
+}
+h3 {
+  line-height: 30px;
+}
+h3 small {
+  color: #444444;
+}
+h4 {
+  line-height: 22px;
+}
+h4 small {
+  color: #444444;
+}
+h5 small {
+  color: #444444;
+}
+* {
+  outline: none !important;
+}
+a:hover {
+  outline: 0;
+  text-decoration: none;
+}
+a:active {
+  outline: 0;
+  text-decoration: none;
+}
+a:focus {
+  outline: 0;
+  text-decoration: none;
+}
+.container {
+  width: auto;
+}
+.container-alt {
+  margin-left: auto;
+  margin-right: auto;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.footer {
+  background-color: #f9f9f9;
+  border-top: 1px solid rgba(0, 0, 0, 0.05);
+  bottom: 0px;
+  color: #58666e;
+  text-align: left !important;
+  padding: 20px 30px;
+  position: absolute;
+  right: 0;
+  left: 240px;
+}
+#wrapper {
+  height: 100%;
+  overflow: hidden;
+  width: 100%;
+}
+.page {
+  bottom: 0;
+  left: 0;
+  right: 0;
+  top: 0;
+}
+.page-title {
+  margin-bottom: 24px;
+}
+.social-links li a {
+  -webkit-border-radius: 50%;
+  background: #EFF0F4;
+  border-radius: 50%;
+  color: #7A7676;
+  display: inline-block;
+  height: 30px;
+  line-height: 30px;
+  text-align: center;
+  width: 30px;
+}
+/* ==============
+  Bootstrap-custom
+===================*/
+.row {
+  margin-right: -10px;
+  margin-left: -10px;
+}
+.col-lg-1,
+.col-lg-10,
+.col-lg-11,
+.col-lg-12,
+.col-lg-2,
+.col-lg-3,
+.col-lg-4,
+.col-lg-5,
+.col-lg-6,
+.col-lg-7,
+.col-lg-8,
+.col-lg-9,
+.col-md-1,
+.col-md-10,
+.col-md-11,
+.col-md-12,
+.col-md-2,
+.col-md-3,
+.col-md-4,
+.col-md-5,
+.col-md-6,
+.col-md-7,
+.col-md-8,
+.col-md-9,
+.col-sm-1,
+.col-sm-10,
+.col-sm-11,
+.col-sm-12,
+.col-sm-2,
+.col-sm-3,
+.col-sm-4,
+.col-sm-5,
+.col-sm-6,
+.col-sm-7,
+.col-sm-8,
+.col-sm-9,
+.col-xs-1,
+.col-xs-10,
+.col-xs-11,
+.col-xs-12,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9 {
+  padding-left: 10px;
+  padding-right: 10px;
+}
+.breadcrumb {
+  background-color: transparent;
+  margin-bottom: 15px;
+  margin-top: 5px;
+}
+.dropdown-menu {
+  padding: 4px 0;
+  -webkit-animation: dropdownOpen 0.3s ease-out;
+  -o-animation: dropdownOpen 0.3s ease-out;
+  animation: dropdownOpen 0.3s ease-out;
+  border: 0;
+  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
+}
+.dropdown-menu > li > a {
+  padding: 6px 20px;
+}
+.bg-primary {
+  background-color: #6e8cd7 !important;
+}
+.bg-success {
+  background-color: #33b86c !important;
+}
+.bg-info {
+  background-color: #29b6f6 !important;
+}
+.bg-warning {
+  background-color: #ffd740 !important;
+}
+.bg-danger {
+  background-color: #ef5350 !important;
+}
+.bg-muted {
+  background-color: #d0d0d0 !important;
+}
+.bg-inverse {
+  background-color: #212121 !important;
+}
+.bg-purple {
+  background-color: #7e57c2 !important;
+}
+.bg-pink {
+  background-color: #ec407a !important;
+}
+.bg-white {
+  background-color: #ffffff !important;
+}
+.text-white {
+  color: #ffffff;
+}
+.text-danger {
+  color: #ef5350;
+}
+.text-muted {
+  color: #98a6ad;
+}
+.text-primary {
+  color: #6e8cd7;
+}
+.text-warning {
+  color: #ffd740;
+}
+.text-success {
+  color: #33b86c;
+}
+.text-info {
+  color: #29b6f6;
+}
+.text-inverse {
+  color: #212121;
+}
+.text-pink {
+  color: #ec407a;
+}
+.text-purple {
+  color: #7e57c2;
+}
+.text-dark {
+  color: #797979 !important;
+}
+.form-control {
+  -moz-border-radius: 2px;
+  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+  -webkit-border-radius: 2px;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+  background-color: #fafafa;
+  border-radius: 2px;
+  border: 1px solid #eeeeee;
+  box-shadow: none;
+  color: rgba(0, 0, 0, 0.6);
+  font-size: 14px;
+}
+.form-control:focus {
+  background: #ffffff;
+  border: 1px solid #e0e0e0;
+  box-shadow: none;
+}
+.label-primary {
+  background-color: #6e8cd7;
+}
+.label-success {
+  background-color: #33b86c;
+}
+.label-info {
+  background-color: #29b6f6;
+}
+.label-warning {
+  background-color: #ffd740;
+}
+.label-danger {
+  background-color: #ef5350;
+}
+.label-purple {
+  background-color: #7e57c2;
+}
+.label-pink {
+  background-color: #ec407a;
+}
+.label-inverse {
+  background-color: #212121;
+}
+.badge {
+  text-transform: uppercase;
+  font-weight: normal;
+  padding: 3px 5px;
+  font-size: 12px;
+  margin-top: 1px;
+}
+.badge-xs {
+  font-size: 9px;
+}
+.badge-xs,
+.badge-sm {
+  -webkit-transform: translate(0, -2px);
+  -ms-transform: translate(0, -2px);
+  -o-transform: translate(0, -2px);
+  transform: translate(0, -2px);
+}
+.badge-primary {
+  background-color: #6e8cd7;
+}
+.badge-success {
+  background-color: #33b86c;
+}
+.badge-info {
+  background-color: #29b6f6;
+}
+.badge-warning {
+  background-color: #ffd740;
+}
+.badge-danger {
+  background-color: #ef5350;
+}
+.badge-purple {
+  background-color: #7e57c2;
+}
+.badge-pink {
+  background-color: #ec407a;
+}
+.badge-inverse {
+  background-color: #212121;
+}
+.pagination > li > a {
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  color: #373e4a;
+}
+.pagination > li > span {
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  color: #373e4a;
+}
+.pagination > .active > a,
+.pagination > .active > span,
+.pagination > .active > a:hover,
+.pagination > .active > span:hover,
+.pagination > .active > a:focus,
+.pagination > .active > span:focus {
+  background-color: #6e8cd7;
+  border-color: #6e8cd7;
+}
+.tabs {
+  background-color: #ffffff;
+  margin: 0 auto;
+  padding: 0px;
+  position: relative;
+  white-space: nowrap;
+  width: 100%;
+}
+.tabs li.tab {
+  background-color: #ffffff;
+  display: block;
+  float: left;
+  margin: 0;
+  text-align: center;
+}
+.tabs li.tab a {
+  -moz-transition: color 0.28s ease;
+  -ms-transition: color 0.28s ease;
+  -o-transition: color 0.28s ease;
+  -webkit-transition: color 0.28s ease;
+  color: #ee6e73;
+  display: block;
+  height: 100%;
+  text-decoration: none;
+  transition: color 0.28s ease;
+  width: 100%;
+}
+.tabs li.tab a.active {
+  color: #6e8cd7 !important;
+}
+.tabs .indicator {
+  background-color: #6e8cd7;
+  bottom: 0;
+  height: 2px;
+  position: absolute;
+  will-change: left, right;
+}
+.tabs-top .indicator {
+  top: 0;
+}
+.nav.nav-tabs + .tab-content {
+  background: #ffffff;
+  margin-bottom: 30px;
+  padding: 30px;
+}
+.tabs-vertical-env {
+  background-color: #eeeeee;
+  margin-bottom: 30px;
+}
+.tabs-vertical-env .tab-content {
+  background: #ffffff;
+  display: table-cell;
+  margin-bottom: 30px;
+  padding: 30px;
+  vertical-align: top;
+}
+.tabs-vertical-env .nav.tabs-vertical {
+  display: table-cell;
+  min-width: 120px;
+  vertical-align: top;
+  width: 150px;
+}
+.tabs-vertical-env .nav.tabs-vertical li.active > a {
+  background-color: #ffffff;
+  border: 0;
+}
+.tabs-vertical-env .nav.tabs-vertical li > a {
+  color: #333333;
+  text-align: center;
+  white-space: nowrap;
+}
+.nav.nav-tabs > li.active > a {
+  background-color: #ffffff;
+  border: 0;
+}
+.nav.nav-tabs > li > a,
+.nav.tabs-vertical > li > a {
+  background-color: transparent;
+  border-radius: 0;
+  border: none;
+  color: #333333 !important;
+  cursor: pointer;
+  line-height: 50px;
+  font-weight: 500;
+  padding-left: 20px;
+  padding-right: 20px;
+}
+.nav.nav-tabs > li > a:hover,
+.nav.tabs-vertical > li > a:hover {
+  color: #6e8cd7 !important;
+}
+.tab-content {
+  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+  color: #777777;
+}
+.nav.nav-tabs > li:last-of-type a {
+  margin-right: 0px;
+}
+.nav.nav-tabs {
+  border-bottom: 0;
+  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.navtab-bg {
+  background-color: #eeeeee;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus,
+.tabs-vertical-env .nav.tabs-vertical li.active > a {
+  border: none;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:focus,
+.nav-tabs > li.active > a:hover,
+.tabs-vertical > li.active > a,
+.tabs-vertical > li.active > a:focus,
+.tabs-vertical > li.active > a:hover {
+  color: #6e8cd7 !important;
+}
+/* Dropcap */
+.dropcap {
+  font-size: 3.1em;
+}
+.dropcap,
+.dropcap-circle,
+.dropcap-square {
+  display: block;
+  float: left;
+  font-weight: 400;
+  line-height: 36px;
+  margin-right: 6px;
+  text-shadow: none;
+}
+.modal .modal-dialog .modal-content {
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  border-color: #DDDDDD;
+  border-radius: 2px;
+  box-shadow: none;
+  padding: 30px;
+}
+.modal .modal-dialog .modal-content .modal-header {
+  border-bottom-width: 2px;
+  margin: 0;
+  padding-bottom: 15px;
+  padding: 0;
+}
+.modal .modal-dialog .modal-content .modal-body {
+  padding: 20px 0;
+}
+.modal .modal-dialog .modal-content .modal-footer {
+  padding-top: 15px;
+  /*padding: 0;*/
+}
+.modal-full {
+  width: 98%;
+}
+.modal-content .nav.nav-tabs + .tab-content {
+  margin-bottom: 0px;
+}
+.modal-content .panel-group {
+  margin-bottom: 0px;
+}
+.modal-content .panel {
+  border-top: none;
+}
+.tabs-vertical-env .tab-content {
+  margin-bottom: 0px;
+}
+.table > thead > tr > td.middle-align,
+.table > tbody > tr > td.middle-align,
+.table > tfood > tr > td.middle-align,
+.table > thead > tr > th.middle-align,
+.table > tbody > tr > th.middle-align,
+.table > tfood > tr > th.middle-align {
+  vertical-align: middle;
+}
+.legendLabel {
+  padding-left: 10px !important;
+}
+.alert-success {
+  background-color: #ccedda;
+  border-color: #7ad19f;
+  color: #33b86c;
+}
+.alert-success .alert-link {
+  color: #268a51;
+}
+.list-group-item.active {
+  background-color: #dddddd;
+  border-color: #dddddd;
+  color: #444444;
+  z-index: 2;
+}
+.list-group-item.active:hover {
+  background-color: #dddddd;
+  border-color: #dddddd;
+  color: #444444;
+  z-index: 2;
+}
+.list-group-item.active:hover .list-group-item-text {
+  color: #6e8cd7;
+}
+.list-group-item.active:focus {
+  background-color: #dddddd;
+  border-color: #dddddd;
+  color: #444444;
+  z-index: 2;
+}
+.list-group-item.active:focus .list-group-item-text {
+  color: #6e8cd7;
+}
+.list-group-item.active .list-group-item-text {
+  color: #6e8cd7;
+}
+.list-group-item {
+  border-radius: 0px;
+  padding: 12px 20px;
+}
+.list-group-item:first-child {
+  border-radius: 0px;
+  padding: 12px 20px;
+}
+.list-group-item:last-child {
+  border-radius: 0px;
+  padding: 12px 20px;
+}
+.list-group-item-heading {
+  font-weight: 300;
+}
+.list-group-item.active > .badge {
+  color: #6e8cd7;
+}
+.nav-pills > .active > a > .badge {
+  color: #6e8cd7;
+}
+.has-success .form-control {
+  border-color: #33b86c;
+  box-shadow: none !important;
+}
+.has-warning .form-control {
+  border-color: #ffd740;
+  box-shadow: none !important;
+}
+.has-error .form-control {
+  border-color: #ef5350;
+  box-shadow: none !important;
+}
+.input-group-addon {
+  border-radius: 2px;
+  border: 1px solid #eeeeee;
+}
+/* ==============
+  Helper Classes
+===================*/
+.p-0 {
+  padding: 0px !important;
+}
+.p-t-0 {
+  padding-top: 0px !important;
+}
+.p-t-10 {
+  padding-top: 10px !important;
+}
+.p-b-10 {
+  padding-bottom: 10px !important;
+}
+.m-0 {
+  margin: 0px !important;
+}
+.m-r-5 {
+  margin-right: 5px;
+}
+.m-r-10 {
+  margin-right: 10px;
+}
+.m-r-15 {
+  margin-right: 15px !important;
+}
+.m-l-10 {
+  margin-left: 10px;
+}
+.m-l-15 {
+  margin-left: 15px;
+}
+.m-t-5 {
+  margin-top: 5px !important;
+}
+.m-t-0 {
+  margin-top: 0px;
+}
+.m-t-10 {
+  margin-top: 10px !important;
+}
+.m-t-15 {
+  margin-top: 15px !important;
+}
+.m-t-20 {
+  margin-top: 20px;
+}
+.m-t-30 {
+  margin-top: 30px !important;
+}
+.m-t-40 {
+  margin-top: 40px !important;
+}
+.m-b-0 {
+  margin-bottom: 0px;
+}
+.m-b-5 {
+  margin-bottom: 5px;
+}
+.m-b-10 {
+  margin-bottom: 10px;
+}
+.m-b-15 {
+  margin-bottom: 15px;
+}
+.m-b-30 {
+  margin-bottom: 30px;
+}
+.w-xs {
+  min-width: 80px;
+}
+.w-sm {
+  min-width: 95px;
+}
+.w-md {
+  min-width: 110px;
+}
+.w-lg {
+  min-width: 140px;
+}
+.m-h-50 {
+  min-height: 50px;
+}
+.l-h-34 {
+  line-height: 34px;
+}
+.font-light {
+  font-weight: 300;
+}
+.wrapper-md {
+  padding: 20px;
+}
+.pull-in {
+  margin-left: -15px;
+  margin-right: -15px;
+}
+.b-0 {
+  border: none !important;
+}
+.no-border {
+  border: none;
+}
+.bx-shadow {
+  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+}
+.mx-box {
+  max-height: 380px;
+  min-height: 380px;
+}
+.thumb-sm {
+  height: 32px;
+  width: 32px;
+}
+.thumb-md {
+  height: 48px;
+  width: 48px;
+}
+.thumb-lg {
+  height: 88px;
+  width: 88px;
+}
+.grid-structure .grid-container {
+  background-color: #f5f5f5;
+  margin-bottom: 10px;
+  padding: 10px 20px;
+}
+.icon-list div {
+  cursor: pointer;
+  line-height: 40px;
+  white-space: nowrap;
+}
+.icon-list i {
+  -webkit-transition: all 0.2s;
+  -webkit-transition: font-size 0.2s;
+  display: inline-block;
+  font-size: 14px;
+  margin: 0;
+  text-align: center;
+  transition: all 0.2s;
+  transition: font-size 0.2s;
+  vertical-align: middle;
+  width: 40px;
+}
+.icon-list .col-md-3:hover i {
+  -o-transform: scale(2);
+  -webkit-transform: scale(2);
+  moz-transform: scale(2);
+  transform: scale(2);
+}
+.ionicon-list i {
+  font-size: 16px;
+}
+.ionicon-list .col-md-3:hover i {
+  -o-transform: scale(2);
+  -webkit-transform: scale(2);
+  moz-transform: scale(2);
+  transform: scale(2);
+}
+/* ==============
+  Waves Effect
+===================*/
+/*!
+ * Waves v0.6.0
+ * http://fian.my.id/Waves
+ *
+ * Copyright 2014 Alfiana E. Sibuea and other contributors
+ * Released under the MIT license
+ * https://github.com/fians/Waves/blob/master/LICENSE
+ */
+.waves-effect {
+  position: relative;
+  cursor: pointer;
+  display: inline-block;
+  overflow: hidden;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  -webkit-tap-highlight-color: transparent;
+  vertical-align: middle;
+  z-index: 1;
+  will-change: opacity, transform;
+  -webkit-transition: all 0.3s ease-out;
+  -moz-transition: all 0.3s ease-out;
+  -o-transition: all 0.3s ease-out;
+  -ms-transition: all 0.3s ease-out;
+  transition: all 0.3s ease-out;
+}
+.waves-effect .waves-ripple {
+  position: absolute;
+  border-radius: 50%;
+  width: 20px;
+  height: 20px;
+  margin-top: -10px;
+  margin-left: -10px;
+  opacity: 0;
+  background: rgba(0, 0, 0, 0.2);
+  -webkit-transition: all 0.7s ease-out;
+  -moz-transition: all 0.7s ease-out;
+  -o-transition: all 0.7s ease-out;
+  -ms-transition: all 0.7s ease-out;
+  transition: all 0.7s ease-out;
+  -webkit-transition-property: -webkit-transform, opacity;
+  -moz-transition-property: -moz-transform, opacity;
+  -o-transition-property: -o-transform, opacity;
+  transition-property: transform, opacity;
+  -webkit-transform: scale(0);
+  -moz-transform: scale(0);
+  -ms-transform: scale(0);
+  -o-transform: scale(0);
+  transform: scale(0);
+  pointer-events: none;
+}
+.waves-effect.waves-light .waves-ripple {
+  background-color: rgba(255, 255, 255, 0.45);
+}
+.waves-effect.waves-red .waves-ripple {
+  background-color: rgba(244, 67, 54, 0.7);
+}
+.waves-effect.waves-yellow .waves-ripple {
+  background-color: rgba(255, 235, 59, 0.7);
+}
+.waves-effect.waves-orange .waves-ripple {
+  background-color: rgba(255, 152, 0, 0.7);
+}
+.waves-effect.waves-purple .waves-ripple {
+  background-color: rgba(156, 39, 176, 0.7);
+}
+.waves-effect.waves-green .waves-ripple {
+  background-color: rgba(76, 175, 80, 0.7);
+}
+.waves-effect.waves-teal .waves-ripple {
+  background-color: rgba(0, 150, 136, 0.7);
+}
+.waves-notransition {
+  -webkit-transition: none !important;
+  -moz-transition: none !important;
+  -o-transition: none !important;
+  -ms-transition: none !important;
+  transition: none !important;
+}
+.waves-circle {
+  -webkit-transform: translateZ(0);
+  -moz-transform: translateZ(0);
+  -ms-transform: translateZ(0);
+  -o-transform: translateZ(0);
+  transform: translateZ(0);
+  -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
+  text-align: center;
+  width: 2.5em;
+  height: 2.5em;
+  line-height: 2.5em;
+  border-radius: 50%;
+  -webkit-mask-image: none;
+}
+.waves-input-wrapper {
+  border-radius: 0.2em;
+  vertical-align: bottom;
+}
+.waves-input-wrapper .waves-button-input {
+  position: relative;
+  top: 0;
+  left: 0;
+  z-index: 1;
+}
+.waves-block {
+  display: block;
+}
+/* ==============
+  Animation
+===================*/
+/* Bounce 1 */
+@-webkit-keyframes cd-bounce-1 {
+  0% {
+    opacity: 0;
+    -webkit-transform: scale(0.5);
+  }
+  60% {
+    opacity: 1;
+    -webkit-transform: scale(1.2);
+  }
+  100% {
+    -webkit-transform: scale(1);
+  }
+}
+@-moz-keyframes cd-bounce-1 {
+  0% {
+    opacity: 0;
+    -moz-transform: scale(0.5);
+  }
+  60% {
+    opacity: 1;
+    -moz-transform: scale(1.2);
+  }
+  100% {
+    -moz-transform: scale(1);
+  }
+}
+@-o-keyframes cd-bounce-1 {
+  0% {
+    opacity: 0;
+    -o-transform: scale(0.5);
+  }
+  60% {
+    opacity: 1;
+    -o-transform: scale(1.2);
+  }
+  100% {
+    -o-transform: scale(1);
+  }
+}
+@keyframes cd-bounce-1 {
+  0% {
+    opacity: 0;
+    -webkit-transform: scale(0.5);
+    -moz-transform: scale(0.5);
+    -ms-transform: scale(0.5);
+    -o-transform: scale(0.5);
+    transform: scale(0.5);
+  }
+  60% {
+    opacity: 1;
+    -webkit-transform: scale(1.2);
+    -moz-transform: scale(1.2);
+    -ms-transform: scale(1.2);
+    -o-transform: scale(1.2);
+    transform: scale(1.2);
+  }
+  100% {
+    opacity: 1;
+    -webkit-transform: scale(1);
+    -moz-transform: scale(1);
+    -ms-transform: scale(1);
+    -o-transform: scale(1);
+    transform: scale(1);
+  }
+}
+/* Bounce 2 */
+@-webkit-keyframes cd-bounce-2 {
+  0% {
+    opacity: 0;
+    -webkit-transform: translateX(-100px);
+  }
+  60% {
+    opacity: 1;
+    -webkit-transform: translateX(20px);
+  }
+  100% {
+    -webkit-transform: translateX(0);
+  }
+}
+@-moz-keyframes cd-bounce-2 {
+  0% {
+    opacity: 0;
+    -moz-transform: translateX(-100px);
+  }
+  60% {
+    opacity: 1;
+    -moz-transform: translateX(20px);
+  }
+  100% {
+    -moz-transform: translateX(0);
+  }
+}
+@-o-keyframes cd-bounce-2 {
+  0% {
+    opacity: 0;
+    -o-transform: translateX(-100px);
+  }
+  60% {
+    opacity: 1;
+    -o-transform: translateX(20px);
+  }
+  100% {
+    opacity: 1;
+    -o-transform: translateX(0);
+  }
+}
+@keyframes cd-bounce-2 {
+  0% {
+    opacity: 0;
+    -webkit-transform: translateX(-100px);
+    -moz-transform: translateX(-100px);
+    -ms-transform: translateX(-100px);
+    -o-transform: translateX(-100px);
+    transform: translateX(-100px);
+  }
+  60% {
+    opacity: 1;
+    -webkit-transform: translateX(20px);
+    -moz-transform: translateX(20px);
+    -ms-transform: translateX(20px);
+    -o-transform: translateX(20px);
+    transform: translateX(20px);
+  }
+  100% {
+    opacity: 1;
+    -webkit-transform: translateX(0);
+    -moz-transform: translateX(0);
+    -ms-transform: translateX(0);
+    -o-transform: translateX(0);
+    transform: translateX(0);
+  }
+}
+/* Dropdown */
+@-webkit-keyframes dropdownOpen {
+  0% {
+    opacity: 0;
+    -webkit-transform: scale(0);
+  }
+  100% {
+    -webkit-transform: scale(1);
+  }
+}
+@-moz-keyframes dropdownOpen {
+  0% {
+    opacity: 0;
+    -moz-transform: scale(0);
+  }
+  100% {
+    -moz-transform: scale(1);
+  }
+}
+@-o-keyframes dropdownOpen {
+  0% {
+    opacity: 0;
+    -o-transform: scale(0);
+  }
+  100% {
+    -o-transform: scale(1);
+  }
+}
+@keyframes dropdownOpen {
+  0% {
+    opacity: 0;
+    -webkit-transform: scale(0);
+    -moz-transform: scale(0);
+    -ms-transform: scale(0);
+    -o-transform: scale(0);
+    transform: scale(0);
+  }
+  100% {
+    opacity: 1;
+    -webkit-transform: scale(1);
+    -moz-transform: scale(1);
+    -ms-transform: scale(1);
+    -o-transform: scale(1);
+    transform: scale(1);
+  }
+}
+/* Progressbar Animated */
+@-webkit-keyframes animationProgress {
+  from {
+    width: 0;
+  }
+}
+@keyframes animationProgress {
+  from {
+    width: 0;
+  }
+}
+/* Portlets loader */
+@-webkit-keyframes loaderAnimate {
+  0% {
+    -webkit-transform: rotate(0deg);
+  }
+  100% {
+    -webkit-transform: rotate(220deg);
+  }
+}
+@-moz-keyframes loaderAnimate {
+  0% {
+    -moz-transform: rotate(0deg);
+  }
+  100% {
+    -moz-transform: rotate(220deg);
+  }
+}
+@-o-keyframes loaderAnimate {
+  0% {
+    -o-transform: rotate(0deg);
+  }
+  100% {
+    -o-transform: rotate(220deg);
+  }
+}
+@keyframes loaderAnimate {
+  0% {
+    transform: rotate(0deg);
+  }
+  100% {
+    transform: rotate(220deg);
+  }
+}
+@-webkit-keyframes loaderAnimate2 {
+  0% {
+    box-shadow: inset #555 0 0 0 8px;
+    -webkit-transform: rotate(-140deg);
+  }
+  50% {
+    box-shadow: inset #555 0 0 0 2px;
+  }
+  100% {
+    box-shadow: inset #555 0 0 0 8px;
+    -webkit-transform: rotate(140deg);
+  }
+}
+@-moz-keyframes loaderAnimate2 {
+  0% {
+    box-shadow: inset #555 0 0 0 8px;
+    -moz-transform: rotate(-140deg);
+  }
+  50% {
+    box-shadow: inset #555 0 0 0 2px;
+  }
+  100% {
+    box-shadow: inset #555 0 0 0 8px;
+    -moz-transform: rotate(140deg);
+  }
+}
+@-o-keyframes loaderAnimate2 {
+  0% {
+    box-shadow: inset #555 0 0 0 8px;
+    -o-transform: rotate(-140deg);
+  }
+  50% {
+    box-shadow: inset #555 0 0 0 2px;
+  }
+  100% {
+    box-shadow: inset #555 0 0 0 8px;
+    -o-transform: rotate(140deg);
+  }
+}
+@keyframes loaderAnimate2 {
+  0% {
+    box-shadow: inset #555 0 0 0 8px;
+    -webkit-transform: rotate(-140deg);
+    -moz-transform: rotate(-140deg);
+    -ms-transform: rotate(-140deg);
+    transform: rotate(-140deg);
+  }
+  50% {
+    box-shadow: inset #555 0 0 0 2px;
+  }
+  100% {
+    box-shadow: inset #555 0 0 0 8px;
+    -webkit-transform: rotate(140deg);
+    -moz-transform: rotate(140deg);
+    -ms-transform: rotate(140deg);
+    transform: rotate(140deg);
+  }
+}
+@keyframes loaderAnimate2 {
+  0% {
+    box-shadow: inset #999 0 0 0 17px;
+    transform: rotate(-140deg);
+  }
+  50% {
+    box-shadow: inset #999 0 0 0 2px;
+  }
+  100% {
+    box-shadow: inset #999 0 0 0 17px;
+    transform: rotate(140deg);
+  }
+}
+@media print {
+  .logo,.page-title,.breadcrumb,.footer {
+    display: none !important;
+    margin: 0px !important;
+    padding: 0px !important;
+  }
+   
+  .left {
+    display: none;
+  }
+  .right-bar {
+    display: none !important;
+  }
+  .content {
+    margin-top: 0px;
+    padding-top: 0px;
+  }
+  .content-page {
+    margin-left: 0px !important;
+    margin-top: 0px;
+  }
+  
+}
+
+.dever_desc
+{
+  width:100%;
+  height:auto;
+  text-align:left;
+  border:1px dotted #bababa;
+  margin-bottom:20px;
+  cursor:pointer;
+  line-height:30px;
+  padding-left:10px;
+  margin-top:20px;
+}
+
+/*
+.dever_form_add
+{
+  width:50%;
+  height:auto;
+  text-align:center;
+  border:2px dotted #b8b8b8;
+  margin-bottom:20px;
+  cursor:pointer;
+}
+*/
+
+.dever_form_add
+{
+  height:auto;
+  text-align:center;
+  border:2px dotted #b8b8b8;
+  margin-bottom:20px;
+  cursor:pointer;
+}
+
+.dever_form_hr
+{
+  width:50%;
+  height:auto;
+  text-align:left;
+  border:2px dotted #b8b8b8;
+  background:#bababa;
+  font-weight:bold;
+  margin-bottom:20px;
+  padding-left:2px;
+  cursor:pointer;
+}
+
+.dever_form_add_child
+{
+  width:100%;
+  height:auto;
+  border:1px solid #b8b8b8;
+  background-color: #f8f8f8;
+  box-shadow: 0 2px 2px rgba(0,0,0,0.1);
+  padding: 15px 20px 20px 20px;
+  margin-top: 10px;
+}
+
+.dever_form_delete
+{
+  float:right;
+  color:red;
+  cursor:pointer;
+}
+
+.pagination .dever_page_disabled a
+{
+  background-color:#eee;
+}
+
+.tables
+{
+  width:100px;
+  max-width: 100px;
+  overflow: scroll;
+}
+
+
+.form_margin
+{
+  display:inline;
+}
+
+tds
+{
+    max-width: 300px;
+    overflow: auto;
+}
+
+
+
+
+
+.content,.sidebar-nav
+{
+  border-top:1px solid #bababa;
+}
+.banner
+{
+  margin:10px;
+  margin-top:-10px;
+}
+
+.banner img
+{
+  margin:10px;
+  max-width:300px;
+}
+
+.banner span
+{
+  margin-left:2px;
+  font-weight:bold;
+}
+
+.faq-content .panel-heading
+{
+    font-size: 1em;
+}
+
+.faq-content .panel-heading a
+{
+  font-size: 0.6em;
+}
+
+.faq-content .col-sm-3  ul, .faq-content .col-sm-9 ul
+{
+    list-style-type:none;
+    margin-left:0em;
+    padding-left: 0em;
+    padding-bottom:10px;
+}
+
+.faq-content .col-sm-3 ul li
+{
+    float: left;
+    width: 33%;
+}
+
+.faq-content .col-sm-3 ul li div
+{
+    font-size:6rem;
+}
+
+.faq-content .col-sm-3 ul li a
+{
+    text-align: center;
+}
+
+.panel-body .red
+{
+  color:#fff;background-color:red;padding:3px;margin-right:5px;
+}
+
+.panel-body .back
+{
+  color:#fff;background-color:#bababa;padding:3px;margin-right:5px;
+}
+
+.Whoops
+{
+  z-index: 999999;
+}
+
+.glyphicon
+{
+  top:0px;
+}
+
+.dropdown-menu
+{
+  min-width: auto;
+}
+
+.footer
+{
+  position: static;
+}
+
+.dropdown a span
+{
+  font-size:20px;
+}
+
+.dropdown .glyphicon
+{
+  top:2px;
+}
+
+.data-auth-top li a
+{
+  margin-top: -5px;
+}
+
+.dever-color
+{
+
+  margin:0;
+
+  padding:0;
+
+  border:0;
+
+  line-height:20px;
+
+}

+ 3 - 0
assets/moltran/css/demo.css

@@ -0,0 +1,3 @@
+/*
+自定义样式,只是一个demo,可以在自己的项目建立
+*/

+ 473 - 0
assets/moltran/css/menu.css

@@ -0,0 +1,473 @@
+/*
+Template Name: Moltran Dashboard
+Author: CoderThemes
+Email: coderthemes@gmail.com
+File: Topbar,Left-sidebar,Right-sidebar
+*/
+.topbar {
+  -webkit-box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.2);
+  background: #ffffff;
+  box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.2);
+  left: 0px;
+  /*position: fixed;
+  right: 0;
+  top: 0px;*/
+  z-index: 999;
+}
+.topbar .topbar-left {
+  background-color: #eeeeee;
+  float: left;
+  height: 50px;
+  position: relative;
+  width: 240px;
+  z-index: 1;
+}
+.topbar .container {
+  background-color: #fff;
+}
+.logo {
+  color: #212121 !important;
+  font-size: 18px;
+  font-weight: 700;
+  letter-spacing: .05em;
+  line-height: 50px;
+  text-transform: uppercase;
+}
+.logo h1 {
+  height: 50px;
+  margin: 0px auto;
+  text-align: center;
+}
+.logo i {
+  color: #ee6e73;
+  font-size: 30px;
+  margin-right: 5px;
+}
+.navbar-default {
+  background-color: #ffffff;
+  border-radius: 0px;
+  border: none;
+  margin-bottom: 0px;
+}
+.navbar-default .navbar-nav > .open > a {
+  background-color: transparent;
+}
+.navbar-default .navbar-nav > .open > a:focus {
+  background-color: transparent;
+}
+.navbar-default .navbar-nav > .open > a:hover {
+  background-color: transparent;
+}
+.nav > li > a {
+  color: #333333 !important;
+  line-height: 50px;
+  padding: 0px 15px;
+  position: relative;
+}
+.nav > li > a i {
+  font-size: 20px;
+}
+.nav > li > a .badge {
+  position: absolute;
+  right: 10px;
+  top: 18px;
+}
+.profile img {
+  border: 2px solid #edf0f0;
+  height: 36px;
+  width: 36px;
+}
+.dropdown-menu-lg {
+  width: 300px;
+}
+.dropdown-menu-lg .list-group {
+  margin-bottom: 0px;
+}
+.dropdown-menu-lg .list-group-item {
+  border: none;
+  padding: 10px 20px;
+}
+.dropdown-menu-lg .media-heading {
+  margin-bottom: 0px;
+}
+.dropdown-menu-lg .media-body p {
+  color: #828282;
+}
+.notifi-title {
+  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+  color: #000000;
+  font-size: 16px;
+  font-weight: 400;
+  padding: 5px 0px 10px;
+}
+.navbar-form {
+  border: none;
+  box-shadow: none;
+  padding: 0px;
+}
+.search-bar {
+  background-color: transparent !important;
+  border: none !important;
+  box-shadow: none !important;
+  color: #212121;
+  font-size: 14px;
+  height: 50px;
+  margin-top: 3px;
+}
+.btn-search {
+  display: none;
+}
+input.search-bar::-webkit-input-placeholder {
+  color: rgba(0, 0, 0, 0.9);
+}
+input.search-bar:-moz-placeholder {
+  color: rgba(0, 0, 0, 0.9);
+}
+input.search-bar::-moz-placeholder {
+  color: rgba(0, 0, 0, 0.9);
+}
+input.search-bar:-ms-input-placeholder {
+  color: rgba(0, 0, 0, 0.9);
+}
+.navbar-nav {
+  margin: 0px;
+  height:50px;
+}
+.side-menu {
+  bottom: 0;
+  top: 0;
+  width: 240px;
+  z-index: 2;
+}
+.side-menu.left {
+  background: #2f353f;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
+  position: absolute;
+  top: 50px;
+}
+body.fixed-left .side-menu.left {
+  bottom: 50px;
+  height: 100%;
+  margin-bottom: -50px;
+  margin-top: 0px;
+  padding-bottom: 50px;
+  position: fixed;
+}
+.content-page {
+  margin-left: 240px;
+  overflow: hidden;
+}
+.content-page > .content {
+  margin-bottom: 60px;
+  /*margin-top: 50px;*/
+  /*padding: 20px 5px 15px 5px;*/
+  padding: 20px 0px 0px 0px;
+}
+.button-menu-mobile {
+  background: transparent;
+  border: none;
+  color: #888888;
+  font-size: 21px;
+  line-height: 50px;
+  padding: 0px 15px;
+}
+.button-menu-mobile:hover {
+  color: #212121;
+}
+.sidebar-inner {
+  height: 100%;
+}
+#sidebar-menu,
+#sidebar-menu ul,
+#sidebar-menu li,
+#sidebar-menu a {
+  border: 0;
+  font-weight: normal;
+  line-height: 1;
+  list-style: none;
+  margin: 0;
+  padding: 0;
+  position: relative;
+  text-decoration: none;
+}
+#sidebar-menu {
+  background-color: #2f353f;
+  padding-bottom: 50px;
+  /*width: 100%;*/
+  margin-left: -10px;
+}
+#sidebar-menu a {
+  line-height: 1.3;
+}
+#sidebar-menu ul ul {
+  display: none;
+}
+#sidebar-menu ul .in {
+  display: block;
+}
+#sidebar-menu ul ul li {
+  border-top: 0;
+}
+#sidebar-menu ul ul li.active a {
+  color: #ffffff;
+}
+#sidebar-menu ul ul a {
+  color: #75798B;
+  display: block;
+  padding: 10px 25px 10px 65px;
+}
+#sidebar-menu ul ul a:hover {
+  color: #ffffff;
+}
+#sidebar-menu ul ul a i {
+  margin-right: 5px;
+}
+#sidebar-menu ul ul ul a {
+  padding-left: 80px;
+}
+#sidebar-menu > ul > li > a {
+  color: #a7b1c2;
+  display: block;
+  padding: 15px 25px;
+  background: #2f353f;
+}
+#sidebar-menu > ul > li > a:hover {
+  background: #272c35;
+  text-decoration: none;
+}
+#sidebar-menu > ul > li > a > span {
+  vertical-align: middle;
+}
+#sidebar-menu > ul > li > a > i {
+  display: inline-block;
+  font-size: 18px;
+  line-height: 17px;
+  margin-left: 3px;
+  margin-right: 15px;
+  text-align: center;
+  vertical-align: middle;
+  width: 20px;
+}
+#sidebar-menu > ul > li > a > i.i-right {
+  float: right;
+  margin: 3px 0 0 0;
+}
+#sidebar-menu > ul > li > a.active {
+  background: #272c35 !important;
+  color: #ffffff;
+}
+#sidebar-menu > ul > li > a.active.subdrop {
+  background: #272c35 !important;
+}
+.subdrop {
+  background: #272c35 !important;
+}
+#wrapper.enlarged #sidebar-menu ul ul {
+  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+}
+#wrapper.enlarged .left.side-menu {
+  /*padding-top: 80px;*/
+  width: 50px;
+  z-index: 5;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu > ul > li > a:hover {
+  background-color: #272c35 !important;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu > ul > li > a:active {
+  background-color: #272c35 !important;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu > ul > li > a:focus {
+  background-color: #272c35 !important;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu > ul > li > a i {
+  margin-right: 20px !important;
+  margin-left: 0px !important;
+  font-size: 20px;
+}
+#wrapper.enlarged .left.side-menu span.pull-right {
+  display: none !important;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li {
+  position: relative;
+  white-space: nowrap;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > a {
+  position: relative;
+  width: 260px;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > ul {
+  display: block;
+  left: 50px;
+  position: absolute;
+  width: 190px;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > ul a {
+  background: #ffffff;
+  border-left: 3px solid #edf0f0;
+  border: none;
+  box-shadow: none;
+  padding-left: 15px;
+  position: relative;
+  width: 190px;
+  z-index: 6;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > ul a:hover {
+  color: #212121;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover a span {
+  display: inline;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu a.subdrop {
+  color: #ffffff !important;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li > ul {
+  display: none;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul ul li:hover > ul {
+  display: block;
+  left: 190px;
+  margin-top: -36px;
+  position: absolute;
+  width: 190px;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul ul li > a span.pull-right {
+  -ms-transform: rotate(270deg);
+  -webkit-transform: rotate(270deg);
+  position: absolute;
+  right: 20px;
+  top: 12px;
+  transform: rotate(270deg);
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul ul li.active a {
+  color: #212121;
+}
+#wrapper.enlarged .left.side-menu #sidebar-menu ul > li > a span {
+  display: none;
+  padding-left: 10px;
+}
+#wrapper.enlarged .left.side-menu .user-details {
+  display: none;
+}
+#wrapper.enlarged .content-page {
+  margin-left: 50px;
+}
+#wrapper.enlarged .topbar .topbar-left {
+  /*width: 50px !important;*/
+  width:0px !important;
+}
+#wrapper.enlarged .topbar .topbar-left .logo span {
+  display: none;
+  opacity: 0;
+}
+#wrapper.enlarged .topbar .topbar-left .logo i {
+  margin-right: 0px;
+}
+#wrapper.enlarged #sidebar-menu > ul > li:hover > a.open after {
+  display: none;
+}
+#wrapper.enlarged #sidebar-menu > ul > li:hover > a.active after {
+  display: none;
+}
+#wrapper.enlarged .footer {
+  left: 50px;
+}
+.user-details {
+  min-height: 80px;
+  padding: 20px;
+  position: relative;
+}
+.user-details img {
+  position: relative;
+  z-index: 9999;
+}
+.user-details .user-info {
+  color: #444444;
+  margin-left: 60px;
+  position: relative;
+  z-index: 99999;
+}
+.user-details .user-info a.dropdown-toggle {
+  color: #ffffff;
+  display: block;
+  font-family: 'Roboto', sans-serif;
+  font-size: 16px;
+  font-weight: 600;
+  padding-top: 5px;
+}
+#wrapper.right-bar-enabled .right-bar {
+  right: 0;
+}
+#wrapper.right-bar-enabled .left-layout {
+  left: 0;
+}
+.side-bar.right-bar {
+  float: right !important;
+  right: -266px;
+  top: 50px;
+}
+.side-bar {
+  -moz-transition: all 200ms ease-out;
+  -webkit-transition: all 200ms ease-out;
+  background-color: #ffffff;
+  box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.1);
+  display: block;
+  float: left;
+  height: 100%;
+  overflow-y: auto;
+  position: fixed;
+  transition: all 200ms ease-out;
+  width: 240px;
+}
+.right-bar {
+  background: #ffffff !important;
+  z-index: 99 !important;
+}
+.right-bar h4 {
+  border-bottom: 1px solid #eeeeee;
+  padding-bottom: 10px;
+}
+.contact-list {
+  max-height: 600px;
+}
+.contact-list .list-group-item {
+  border: none;
+}
+.contact-list .list-group-item:hover {
+  background: #f5f5f5;
+}
+.contact-list i.offline {
+  color: #ef5350;
+}
+.contact-list i.away {
+  color: #ffd740;
+}
+.contacts-list .avatar {
+  display: inline-block;
+  float: left;
+  margin-right: 5px;
+  width: 30px;
+}
+.contacts-list .avatar img {
+  border-radius: 50%;
+  width: 100%;
+}
+.contacts-list .list-group-item span.name {
+  color: #707780;
+  display: inline-block;
+  float: left;
+  overflow: hidden;
+  padding-left: 5px;
+  padding-top: 6px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  width: 130px;
+}
+.contacts-list i.online {
+  color: #a0d269;
+}
+.contacts-list i {
+  color: #dddddd;
+  float: right;
+  font-size: 9px;
+  line-height: 30px;
+}

+ 763 - 0
assets/moltran/css/pages.css

@@ -0,0 +1,763 @@
+/*
+Template Name: Moltran Dashboard
+Author: CoderThemes
+Email: coderthemes@gmail.com
+File: Pages
+*/
+/*
+  - Profile
+  - Timeline-2
+  - Pricing
+  - Sweet Alerts
+  - Maps
+  - Email
+  - Timeline
+  - Charts
+  - Count Down
+  - Gallery
+  - Maintenance
+  - Account Pages
+*/
+/* ==============
+  Profile
+===================*/
+.bg-img {
+  background: url(../img/bg/bg.jpg) center;
+}
+.bg-overlay {
+  -moz-border-radius: 6px 6px 0px 0px;
+  -webkit-border-radius: 6px 6px 0px 0px;
+  background-color: rgba(49, 126, 235, 0.4);
+  border-radius: 6px 6px 0px 0px;
+  height: 100%;
+  left: 0px;
+  position: absolute;
+  top: 0px;
+  width: 100%;
+}
+.bg-picture {
+  -webkit-background-size: cover;
+  background-position: center;
+  background-repeat: no-repeat;
+  background-size: cover;
+  margin: -20px -25px 0px -25px;
+  padding: 100px 0px;
+  position: relative;
+}
+.bg-picture > .bg-picture-overlay {
+  background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0, rgba(0, 0, 0, 0.4) 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(rgba(0, 0, 0, 0.4)));
+  background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0, rgba(0, 0, 0, 0.4) 100%);
+  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0, rgba(0, 0, 0, 0.4) 100%);
+  bottom: 0;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+}
+.profile-info-name {
+  position: relative;
+}
+.profile-tab-content {
+  background-color: transparent !important;
+  box-shadow: none !important;
+  margin-top: 35px;
+}
+.user-tabs {
+  background-color: #ffffff;
+  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+  margin-left: -35px;
+  padding-left: 25px;
+}
+.user-tabs .nav.nav-tabs {
+  box-shadow: none !important;
+}
+.user-tabs .nav.nav-tabs a {
+  text-transform: uppercase;
+}
+.user-tabs .pull-right .btn {
+  margin-top: 8px;
+}
+.about-info-p {
+  margin-bottom: 20px;
+}
+.about-info-p p {
+  font-size: 16px;
+}
+/* ==============
+  Timeline-2
+===================*/
+.timeline-2 {
+  border-left: 2px solid #14082d;
+  position: relative;
+}
+.timeline-2 .time-item:after {
+  background-color: #ffffff;
+  border-color: #14082d;
+  border-radius: 10px;
+  border-style: solid;
+  border-width: 2px;
+  bottom: 0;
+  content: '';
+  height: 14px;
+  left: 0;
+  margin-left: -8px;
+  position: absolute;
+  top: 5px;
+  width: 14px;
+}
+.time-item {
+  border-color: #dee5e7;
+  padding-bottom: 1px;
+  position: relative;
+}
+.time-item:before {
+  content: " ";
+  display: table;
+}
+.time-item:after {
+  background-color: #ffffff;
+  border-color: #14082d;
+  border-radius: 10px;
+  border-style: solid;
+  border-width: 2px;
+  bottom: 0;
+  content: '';
+  height: 14px;
+  left: 0;
+  margin-left: -8px;
+  position: absolute;
+  top: 5px;
+  width: 14px;
+}
+.time-item-item:after {
+  content: " ";
+  display: table;
+}
+.item-info {
+  margin-bottom: 15px;
+  margin-left: 15px;
+}
+.item-info p {
+  margin-bottom: 10px !important;
+}
+/* ==============
+  Sweet Alert
+===================*/
+.sweet-alert p {
+  font-size: 14px;
+  font-weight: 500;
+  line-height: 22px;
+}
+button.confirm {
+  background-color: #6e8cd7 !important;
+  border-color: #6e8cd7 !important;
+  box-shadow: none !important;
+}
+/* ==============
+  Pricing
+===================*/
+.pricing-plan {
+  padding-bottom: 50px;
+}
+.price_card {
+  -moz-border-radius: 5px;
+  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -webkit-border-radius: 5px;
+  background: #fafafa;
+  border-radius: 5px;
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  margin-bottom: 30px;
+  padding-bottom: 20px;
+  position: relative;
+  webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+}
+.price_card .name {
+  display: block;
+  font-size: 16px;
+  font-weight: 700;
+  padding: 0 0 30px;
+  text-align: center;
+  width: 100%;
+}
+.price_card button {
+  margin-top: 20px;
+}
+.pricing-header {
+  -moz-border-radius-topleft: 5px;
+  -moz-border-radius-topright: 5px;
+  -webkit-border-top-left-radius: 5px;
+  -webkit-border-top-right-radius: 5px;
+  border-top-left-radius: 5px;
+  border-top-right-radius: 5px;
+  color: #ffffff;
+}
+.price {
+  display: block;
+  font-size: 48px;
+  font-weight: 300;
+  padding: 30px 0 10px;
+  text-align: center;
+  width: 100%;
+}
+.price-features {
+  color: #8a8a8a;
+  list-style: none;
+  margin: 0;
+  padding: 0;
+  text-align: center;
+}
+.price-features li {
+  margin: 0 35px;
+  padding: 20px 15px;
+}
+.pricing-item {
+  margin: 0 0 30px;
+  position: relative;
+  text-align: center;
+}
+.pricing-item-inner {
+  -moz-transition: all 0.27s cubic-bezier(0, 0, 0.58, 1);
+  -ms-transition: all 0.27s cubic-bezier(0, 0, 0.58, 1);
+  -o-transition: all 0.27s cubic-bezier(0, 0, 0.58, 1);
+  -webkit-transition: all 0.27s cubic-bezier(0, 0, 0.58, 1);
+  border-radius: 7px;
+  border: 2px solid rgba(151, 160, 175, 0.2);
+  transition: all 0.27s cubic-bezier(0, 0, 0.58, 1);
+  vertical-align: middle;
+}
+.pricing-wrap {
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  overflow: hidden;
+  padding: 30px 20px;
+  position: relative;
+  text-align: center;
+}
+.pricing-icon {
+  font-size: 32px;
+  padding-bottom: 5px;
+  padding-top: 10px;
+  position: relative;
+  z-index: 1;
+}
+.pricing-title {
+  font-size: 16px;
+  font-weight: 700;
+  margin-bottom: 40px;
+  position: relative;
+  text-transform: uppercase;
+  z-index: 1;
+}
+.pr-list {
+  color: #97a0af;
+  font-size: 12px;
+  font-weight: 400;
+  margin: 0 -20px 30px;
+  padding: 0;
+  text-transform: uppercase;
+}
+.pr-list li {
+  list-style: none;
+  padding: 12px 20px;
+}
+.pricing-num {
+  font-size: 40px;
+  font-weight: 700;
+  line-height: 1;
+}
+.pricing-num sup {
+  font-size: 18px;
+  font-weight: 400;
+  left: -3px;
+  margin-left: -7px;
+  position: relative;
+  top: -20px;
+}
+.pr-per {
+  color: #97a0af;
+  font-size: 12px;
+}
+.pr-button {
+  margin-top: 30px;
+}
+/* ==============
+  Timeline
+===================*/
+.cd-container {
+  width: 90%;
+  max-width: 1170px;
+  margin: 0 auto;
+}
+.cd-container::after {
+  content: '';
+  display: table;
+  clear: both;
+}
+#cd-timeline {
+  margin-bottom: 2em;
+  margin-top: 2em;
+  padding: 2em 0;
+  position: relative;
+}
+#cd-timeline::before {
+  background: #ffffff;
+  content: '';
+  height: 100%;
+  left: 18px;
+  position: absolute;
+  top: 0;
+  width: 4px;
+}
+@media only screen and (min-width: 1170px) {
+  #cd-timeline {
+    margin-bottom: 3em;
+    margin-top: 3em;
+  }
+  #cd-timeline::before {
+    left: 50%;
+    margin-left: -2px;
+  }
+}
+.cd-timeline-block {
+  margin: 2em 0;
+  position: relative;
+}
+.cd-timeline-block:after {
+  clear: both;
+  content: "";
+  display: table;
+}
+.cd-timeline-block:first-child {
+  margin-top: 0;
+}
+.cd-timeline-block:last-child {
+  margin-bottom: 0;
+}
+@media only screen and (min-width: 1170px) {
+  .cd-timeline-block {
+    margin: 4em 0;
+  }
+  .cd-timeline-block:first-child {
+    margin-top: 0;
+  }
+  .cd-timeline-block:last-child {
+    margin-bottom: 0;
+  }
+}
+.cd-timeline-img {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 40px;
+  height: 40px;
+  border-radius: 50%;
+  box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
+  text-align: center;
+  line-height: 40px;
+  font-size: 20px;
+  color: #fff;
+}
+.cd-timeline-img.cd-success {
+  background: #33b86c;
+}
+.cd-timeline-img.cd-info {
+  background: #29b6f6;
+}
+.cd-timeline-img.cd-pink {
+  background: #ec407a;
+}
+.cd-timeline-img.cd-danger {
+  background: #ef5350;
+}
+.cd-timeline-img.cd-primary {
+  background: #6e8cd7;
+}
+.cd-timeline-img.cd-warning {
+  background: #ffd740;
+}
+@media only screen and (min-width: 1170px) {
+  .cd-timeline-img {
+    width: 60px;
+    height: 60px;
+    line-height: 60px;
+    left: 50%;
+    margin-left: -30px;
+    -webkit-transform: translateZ(0);
+    -webkit-backface-visibility: hidden;
+  }
+  .cssanimations .cd-timeline-img.is-hidden {
+    visibility: hidden;
+  }
+  .cssanimations .cd-timeline-img.bounce-in {
+    visibility: visible;
+    -webkit-animation: cd-bounce-1 0.6s;
+    -moz-animation: cd-bounce-1 0.6s;
+    animation: cd-bounce-1 0.6s;
+  }
+}
+.cd-timeline-content {
+  -moz-box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.1);
+  background: white;
+  border-radius: 0;
+  box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.1);
+  margin-left: 60px;
+  padding: 1em;
+  position: relative;
+}
+.cd-timeline-content img {
+  display: block;
+  width: 100%;
+}
+.cd-timeline-content:after {
+  clear: both;
+  content: "";
+  display: table;
+}
+.cd-timeline-content h2 {
+  margin-top: 0;
+}
+.cd-timeline-content p {
+  color: #666666;
+  font-size: 14px;
+  margin: 10px 0px 10px 0px;
+}
+.cd-timeline-content .cd-read-more {
+  background: #acb7c0;
+  border-radius: 0.25em;
+  color: white;
+  display: inline-block;
+  float: right;
+  font-size: 14px;
+  padding: .8em 1em;
+}
+.cd-timeline-content .cd-date {
+  display: inline-block;
+  font-size: 14px;
+}
+.cd-timeline-content h3 {
+  font-size: 21px;
+  margin: 0px;
+}
+.no-touch .cd-timeline-content .cd-read-more:hover {
+  background-color: #bac4cb;
+}
+.cd-timeline-content .cd-date {
+  float: left;
+  padding: .8em 0;
+  opacity: .7;
+}
+.cd-timeline-content::before {
+  content: '';
+  position: absolute;
+  top: 16px;
+  right: 100%;
+  height: 0;
+  width: 0;
+  border: 7px solid transparent;
+  border-right: 7px solid white;
+}
+@media only screen and (min-width: 1170px) {
+  .cd-timeline-content {
+    margin-left: 0;
+    padding: 1.6em;
+    width: 45%;
+  }
+  .cd-timeline-content::before {
+    top: 24px;
+    left: 100%;
+    border-color: transparent;
+    border-left-color: white;
+  }
+  .cd-timeline-content .cd-read-more {
+    float: left;
+  }
+  .cd-timeline-content .cd-date {
+    position: absolute;
+    width: 100%;
+    left: 122%;
+    top: 6px;
+  }
+  .cd-timeline-block:nth-child(even) .cd-timeline-content {
+    float: right;
+  }
+  .cd-timeline-block:nth-child(even) .cd-timeline-content::before {
+    top: 24px;
+    left: auto;
+    right: 100%;
+    border-color: transparent;
+    border-right-color: white;
+  }
+  .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-read-more {
+    float: right;
+  }
+  .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-date {
+    left: auto;
+    right: 122%;
+    text-align: right;
+  }
+  .cssanimations .cd-timeline-content.is-hidden {
+    visibility: hidden;
+  }
+  .cssanimations .cd-timeline-content.bounce-in {
+    visibility: visible;
+    -webkit-animation: cd-bounce-2 0.6s;
+    -moz-animation: cd-bounce-2 0.6s;
+    animation: cd-bounce-2 0.6s;
+  }
+}
+@media only screen and (min-width: 1170px) {
+  .cssanimations .cd-timeline-block:nth-child(even) .cd-timeline-content.bounce-in {
+    -webkit-animation: cd-bounce-2-inverse 0.6s;
+    -moz-animation: cd-bounce-2-inverse 0.6s;
+    animation: cd-bounce-2-inverse 0.6s;
+  }
+}
+/* ==============
+  Charts
+===================*/
+.jqstooltip {
+  -webkit-box-sizing: content-box;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+}
+.chart {
+  position: relative;
+  display: inline-block;
+  width: 110px;
+  height: 110px;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  text-align: center;
+}
+.chart canvas {
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+.chart.chart-widget-pie {
+  margin-top: 5px;
+  margin-bottom: 5px;
+}
+.percent {
+  display: inline-block;
+  line-height: 110px;
+  z-index: 2;
+}
+.percent:after {
+  content: '%';
+  margin-left: 0.1em;
+  font-size: .8em;
+}
+#flotTip {
+  padding: 4px 8px;
+  background-color: #000000;
+  z-index: 100;
+  color: #ffffff;
+  opacity: .7;
+  font-size: 12px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+/* ==============
+  Email
+===================*/
+.mails a {
+  color: #444444;
+}
+.mails .checkbox {
+  margin-bottom: 0px;
+  margin-top: 0px;
+  vertical-align: middle;
+}
+.mails .checkbox label {
+  min-height: 16px;
+}
+/* ==============
+  Count Down
+===================*/
+.home-wrapper {
+  margin: 10% 0px;
+}
+.home-text {
+  font-family: 'Nunito', sans-serif;
+}
+.lj-countdown {
+  color: #6e8cd7;
+  margin-top: 40px;
+  text-align: center;
+}
+.lj-countdown div {
+  display: inline-block;
+}
+.lj-countdown div span {
+  display: block;
+  width: 150px;
+}
+.lj-countdown div span:first-child {
+  font-size: 3em;
+  font-weight: 700;
+  height: 48px;
+  line-height: 48px;
+}
+.lj-countdown div span:last-child {
+  color: #333333;
+  font-size: 0.9em;
+  height: 25px;
+  line-height: 25px;
+}
+.lj-countdown > * {
+  text-align: center;
+}
+/* ==============
+  Gallery
+===================*/
+.portfolioFilter a {
+  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -moz-transition: all 0.3s ease-out;
+  -ms-transition: all 0.3s ease-out;
+  -o-transition: all 0.3s ease-out;
+  -webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  -webkit-transition: all 0.3s ease-out;
+  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
+  color: #333333;
+  padding: 5px 10px;
+  transition: all 0.3s ease-out;
+}
+.portfolioFilter a:hover {
+  background-color: #6e8cd7;
+  color: #ffffff;
+}
+.portfolioFilter a.current {
+  background-color: #6e8cd7;
+  color: #ffffff;
+}
+.thumb {
+  background-color: #ffffff;
+  border-radius: 3px;
+  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
+  margin-top: 30px;
+  padding-bottom: 10px;
+  padding-left: 10px;
+  padding-right: 10px;
+  padding-top: 10px;
+  width: 100%;
+}
+.thumb-img {
+  border-radius: 2px;
+  overflow: hidden;
+  width: 100%;
+}
+.gal-detail h4 {
+  margin-top: 16px;
+}
+/* ==============
+  Maintenance
+===================*/
+.icon-main {
+  font-size: 88px;
+  margin-bottom: 50px;
+}
+.maintenance-page {
+  margin: 10% 0%;
+}
+.mainten-box {
+  margin-bottom: 30px;
+}
+.mainten-box .text-m-mode {
+  margin: 0px auto;
+  width: 80%;
+}
+.media-main a.pull-left {
+  width: 100px;
+}
+.media-main .info {
+  color: #000000;
+  overflow: hidden;
+}
+.media-main .info h4 {
+  margin-bottom: 5px;
+  padding-top: 10px;
+}
+/* ==============
+  Maps
+===================*/
+.gmaps,
+.gmaps-panaroma {
+  height: 300px;
+  background: #eeeeee;
+  border-radius: 3px;
+}
+.gmaps-overlay {
+  display: block;
+  text-align: center;
+  color: #ffffff;
+  font-size: 16px;
+  line-height: 40px;
+  background: #6e8cd7;
+  border-radius: 4px;
+  padding: 10px 20px;
+}
+.gmaps-overlay_arrow {
+  left: 50%;
+  margin-left: -16px;
+  width: 0;
+  height: 0;
+  position: absolute;
+}
+.gmaps-overlay_arrow.above {
+  bottom: -15px;
+  border-left: 16px solid transparent;
+  border-right: 16px solid transparent;
+  border-top: 16px solid #6e8cd7;
+}
+.gmaps-overlay_arrow.below {
+  top: -15px;
+  border-left: 16px solid transparent;
+  border-right: 16px solid transparent;
+  border-bottom: 16px solid #6e8cd7;
+}
+/* ==============
+  Account Pages
+===================*/
+.wrapper-page {
+  margin: 7.5% auto;
+  width: 420px;
+}
+.panel-pages {
+  border-radius: 6px;
+}
+.panel-pages .panel-body {
+  padding: 30px;
+}
+.panel-pages .panel-heading {
+  -moz-border-radius: 6px 6px 0px 0px;
+  -webkit-border-radius: 6px 6px 0px 0px;
+  border-radius: 6px 6px 0px 0px;
+  padding: 40px 20px;
+  position: relative;
+}
+.panel-pages .panel-heading h3 {
+  position: relative;
+  z-index: 999;
+}
+.user-thumb {
+  margin-top: -44px;
+  position: relative;
+  z-index: 999;
+}
+.user-thumb img {
+  height: 88px;
+  margin: 0px auto;
+  width: 88px;
+}
+.ex-page-content h1 {
+  color: #252932;
+  font-size: 98px;
+  font-weight: 700;
+  line-height: 150px;
+  text-shadow: rgba(61, 61, 61, 0.3) 1px 1px, rgba(61, 61, 61, 0.2) 2px 2px, rgba(61, 61, 61, 0.3) 3px 3px;
+}

+ 125 - 0
assets/moltran/css/responsive.css

@@ -0,0 +1,125 @@
+/*
+Template Name: Moltran Dashboard
+Author: CoderThemes
+Email: coderthemes@gmail.com
+File: Responsive
+*/
+@media only screen and (max-width: 6000px) and (min-width: 700px) {
+  .wrapper.right-bar-enabled .right-bar {
+    right: 0;
+    z-index: 99;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  body {
+    overflow-x: hidden;
+  }
+}
+@media (max-width: 767px) {
+  body {
+    overflow-x: hidden;
+  }
+  .content-page {
+    margin-left: 0px !important;
+  }
+  .enlarged .left.side-menu {
+    margin-left: -75px;
+  }
+  .mobile-sidebar {
+    left: 0px;
+  }
+  .mobile-content {
+    left: 250px;
+    right: -250px;
+  }
+  .wrapper-page {
+    width: 90%;
+  }
+  .navbar-nav .open .dropdown-menu {
+    background-color: #ffffff;
+    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
+    left: auto;
+    position: absolute;
+    right: 0;
+  }
+  .todo-send {
+    margin-top: 10px;
+    padding-left: 15px;
+  }
+  .chat-inputbar {
+    padding-left: 15px;
+  }
+  .chat-send {
+    margin-top: 10px;
+    padding-left: 15px;
+    padding-right: 15px;
+  }
+  .wizard > .steps > ul > li {
+    width: 100%;
+  }
+  .wizard > .content {
+    padding: 0px !important;
+  }
+  .wizard > .content > .body {
+    float: none;
+    position: relative;
+    width: 100%;
+    height: 100%;
+    padding: 0%;
+  }
+  .wizard.vertical > .steps {
+    display: inline;
+    float: none;
+    width: 100%;
+  }
+  .wizard.vertical > .content {
+    display: inline;
+    float: none;
+    margin: 0%;
+    width: 100%;
+  }
+  .footer {
+    left: 0px !important;
+  }
+}
+@media (max-width: 480px) {
+  .side-menu {
+    z-index: 10 !important;
+  }
+  .button-menu-mobile {
+    display: block;
+  }
+  .search-bar {
+    display: none !important;
+  }
+}
+@media (max-width: 420px) {
+  .hide-phone {
+    display: none !important;
+  }
+  .topbar-left {
+    width: 70px !important;
+  }
+  .logo span {
+    display: none !important;
+  }
+  .logo i {
+    margin-right: 0px;
+  }
+}
+/* Container-alt */
+@media (min-width: 768px) {
+  .container-alt {
+    width: 750px;
+  }
+}
+@media (min-width: 992px) {
+  .container-alt {
+    width: 970px;
+  }
+}
+@media (min-width: 1200px) {
+  .container-alt {
+    width: 1170px;
+  }
+}

+ 142 - 0
assets/moltran/html/doc/view.html

@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+<filter><script src="../../lib/common.js"></script><script src="../../lib/jquery/jquery.min.js"></script></filter>
+<meta charset="utf-8">
+<title>Doc by Dever</title>
+<meta name="keywords" content="" />
+<meta name="description" content="" /> 
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" type="text/css" href="../public/bootstrap/css/bootstrap.min.css" />
+<link rel="stylesheet" type="text/css" href="../public/doc/doc.min.css">
+<style>
+body,html
+{
+	background-color:white;
+}
+.bs-docs-container
+{
+	margin-bottom:40px;
+}
+.bs-docs-header
+{
+	margin-top: -20px;
+}
+</style>
+</head>
+
+<body>
+    <!-- Static navbar -->
+	<nav class="navbar navbar-default navbar-fixed-tops navbar-static-top dever-nav">
+	  <div class="container">
+		<div class="navbar-header">
+		  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
+			<span class="sr-only">Toggle navigation</span>
+			<span class="icon-bar"></span>
+			<span class="icon-bar"></span>
+			<span class="icon-bar"></span>
+		  </button>
+		  <a class="navbar-brand" id="dever-logo" href="#">DeverDoc</a>
+		</div>
+		<div class="navbar-collapse collapse" id="navbar">
+		  <ul class="nav navbar-nav" id="dever_navbar">
+	  		<li class="active"><a href="#">社区</a></li>
+	  		<li><a href="#about">博客</a></li>
+	  		<li><a href="#contact">关于</a></li>
+	  		<li><a href="#about">文档</a></li>
+		  </ul>
+		  <div class="navbar-right">
+	        <form method="GET" action="" accept-charset="UTF-8" class="navbar-form navbar-left" target="_blank">
+	          <div class="form-group">
+				<input class="form-control search-input mac-style" placeholder="搜索" name="q" type="text">
+	          </div>
+	        </form>
+	      </div>
+		</div><!--/.nav-collapse -->
+	  </div>
+	</nav>
+
+    <div class="bs-docs-header" id="top" tabindex="-1">
+      <div class="container">
+        <h1>起步</h1>
+        <p>简要介绍 Bootstrap,以及如何下载、使用,还有基本模版和案例,等等。</p>
+      </div>
+    </div>
+
+    <div class="container bs-docs-container">
+    	<div class="row">
+        	<div class="col-md-9" role="main">
+        		<div class="bs-docs-section">
+					  <h1 id="disable-responsive" class="page-header"><a class="anchorjs-link " href="#disable-responsive" aria-label="Anchor link for: disable responsive" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; position: absolute; margin-left: -1em; padding-right: 0.5em;"></a><span>禁止响应式布局</span></h1>
+
+					  <div>
+						  <p class="lead">Bootstrap 会自动帮你针对不同的屏幕尺寸调整你的页面,使其在各个尺寸的屏幕上表现良好。下面我们列出了如何禁用这一特性,就像这个<a href="../examples/non-responsive/">非响应式布局实例</a>页面一样。</p>
+
+						  <h2 id=""><a class="anchorjs-link " href="#" aria-label="Anchor link for: " data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; position: absolute; margin-left: -1em; padding-right: 0.5em;"></a>禁止响应式布局有如下几步:</h2>
+						  <ol>
+						    <li>移除 <a href="../css/#overview-mobile">此 CSS 文档</a>中提到的设置浏览器视口(viewport)的标签:<code>&lt;meta&gt;</code></li>
+						    <li>通过为 <code>.container</code> 类设置一个 <code>width</code> 值从而覆盖框架的默认 width 设置,例如 <code>width: 970px !important;</code> 。请确保这些设置全部放在默认的 Bootstrap CSS 文件的后面。注意,如果你把它放到媒体查询中,也可以略去 <code>!important</code></li>
+						    <li>如果使用了导航条,需要移除所有导航条的折叠和展开行为。</li>
+						    <li>对于栅格布局,额外增加 <code>.col-xs-*</code> 类或替换掉 <code>.col-md-*</code><code>.col-lg-*</code>。 不要担心,针对超小屏幕设备的栅格系统能够在所有分辨率的环境下展开。</li>
+						  </ol>
+						  <p>针对 IE8 仍然需要额外引入 Respond.js 文件(由于仍然利用了浏览器对媒体查询(media query)的支持,因此还需要做处理)。这样就禁用了 Bootstrap 对移动设备的响应式支持。</p>
+
+						  <h2 id="bootstrap"><a class="anchorjs-link " href="#bootstrap" aria-label="Anchor link for: bootstrap" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; position: absolute; margin-left: -1em; padding-right: 0.5em;"></a>禁止响应式特性的 Bootstrap 模版</h2>
+						  <p>我们已经按照上面的步骤制作了一份案例。仔细阅读其源码并对照上面的步骤实践一下吧。</p>
+						  <p>
+						    <a href="../examples/non-responsive/" class="btn btn-primary">非响应式布局实例</a>
+						  </p>
+					</div>
+				</div>
+        	</div>
+
+        	<div class="col-md-3" role="complementary">
+				<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix-top">
+					<ul class="nav bs-docs-sidenav">
+
+						<li class="">
+							<a href="#download">下载</a>
+						</li>
+						<li class="">
+							<a href="#whats-included">包含的内容</a>
+							<ul class="nav">
+								<li class=""><a href="#whats-included-precompiled">预编译版</a></li>
+								<li class=""><a href="#whats-included-source">Bootstrap 源码</a></li>
+							</ul>
+						</li>
+
+						<li class="">
+						<a href="#template">基本模板</a>
+						</li>
+					</ul>
+
+					<a class="back-to-top" href="#top">
+						返回顶部
+					</a>
+
+				</nav>
+			</div>
+        </div>
+
+    </div> <!-- /container -->
+    
+    <div class="footer" style="display:none;">
+		<div class="container small text-center">
+		  <p id="dever_copyright">
+			<span>Made With Love By The EST Group.</span>
+		  </p>
+
+		  <p id="dever_icp">
+			<span>Made With Love By The EST Group.</span>
+		  </p>
+		</div>
+	</div>
+	<div id="dever_code"></div>
+
+    <script type="text/javascript" src="../public/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="../public/bootstrap/js/bootstrap.min.js"></script>
+    <script type="text/javascript" src="../public/doc/doc.min.js"></script>
+    <script type="text/javascript" src="../public/doc/main.js"></script>
+  </body>
+</html>

+ 23 - 0
assets/moltran/html/example/foreach.html

@@ -0,0 +1,23 @@
+<div id="foreach">
+
+<div class="test">
+<span>11</span>
+<ul>
+<li>
+<span>222</span>
+<a>333</a>
+</li>
+<li>11111</li> 
+</ul>
+</div>
+
+<div class="test">
+<span>11</span>
+<ul>
+<li>11111</li>
+<li>11111</li>
+</ul>
+</div>
+
+  
+</div>

+ 27 - 0
assets/moltran/html/example/render.html

@@ -0,0 +1,27 @@
+
+<div>
+<{if($test):}> 
+<{$test}>
+<{endif}>    
+  
+<ul>   
+
+<{loop($data):}>  
+<li>
+<{loop($v['child']):}>
+<{$v1['name']}>
+<{endloop}> 
+</li>
+<{endloop}>
+
+<{foreach($data as $k => $v):}>  
+<li>
+<{foreach($v['child'] as $k1 => $v1):}>
+<{$v1['name']}>
+<{endforeach}> 
+</li>
+<{endforeach}>
+
+</ul>
+
+</div>   

+ 136 - 0
assets/moltran/html/home.html

@@ -0,0 +1,136 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+  <filter><script src="../../lib/common.js"></script><script src="../../lib/jquery/jquery.min.js"></script></filter>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+</head>
+  
+<body class="fixed-left">
+<!-- Begin page -->
+<div id="wrapper">
+
+    <script class="include" system="" path="inc/" file="nav">include()</script>
+    
+    <script class="include" system="" path="inc/" file="menu">include()</script>
+
+            <!-- ============================================================== -->
+            <!-- Start right Content here -->
+            <!-- ============================================================== -->                      
+            <div class="content-page">
+                <!-- Start content -->
+                <div class="content">
+                    <div class="container">
+
+                        <!-- Page-Title -->
+                        <div class="row">
+                            <div class="col-sm-12">
+                                <h4 class="pull-left page-title">控制台</h4>
+                                <ol class="breadcrumb pull-right">
+                                    <li><a href="#">快捷管理</a></li>
+                                    <li class="active">控制台</li>
+                                </ol>
+                            </div>
+                        </div>
+
+                        <div class="row">
+                            <!-- INBOX -->
+                            <div class="col-lg-12" id="panel-contact">
+                                <div class="panel panel-default">
+                                    <div class="panel-heading">
+                                        <h3 class="panel-title">公告</h3>
+                                    </div>
+                                    <div class="panel-body">
+                                        <address>
+                                        2817 S 49th<br>
+                                        Apt 314<br>
+                                        San Jose, CA 95101
+                                        </address>
+                                    </div>
+                                </div>
+                            </div> <!-- end col -->
+
+                            <!-- INBOX -->
+                            <div class="col-lg-12" id="panel-notice">
+                                <div class="panel panel-default">
+                                    <div class="panel-heading">
+                                        <h4 class="panel-title">公告</h4>
+                                    </div>
+                                    <div class="panel-body">
+                                        <ol style="list-style-type:circle">
+                                            <li><a href="#">What if I have a question?</a></li>
+                                            <li><a href="#">Where can I get support?</a></li>
+                                        </ol>
+                                    </div>
+                                </div>
+                            </div> <!-- end col -->
+
+                            <!-- CHAT -->
+                            <div class="col-lg-12" id="panel-project">
+                                <div class="panel panel-default">
+                                    <div class="panel-heading"> 
+                                        <h3 class="panel-title">快捷功能</h3> 
+                                    </div> 
+                                    <div class="panel-body"> 
+                                        <div class="pull-left">
+                                            <p><a href="#" class="btn btn-default" style="width: 115px;">Your Account</a></p>
+                                        </div>
+                                    </div> 
+                                </div>
+                            </div> <!-- end col-->
+
+
+                            <!-- TODOs -->
+                            <div class="col-lg-4" style="display:none;">
+                                <div class="panel panel-default">
+                                    <div class="panel-heading"> 
+                                        <h3 class="panel-title">待办事项</h3> 
+                                    </div> 
+                                    <div class="panel-body todoapp"> 
+                                        <div class="row">
+                                            <div class="col-sm-6">
+                                                <h4 id="todo-message"><span id="todo-remaining"></span> of <span id="todo-total"></span> remaining</h4> 
+                                            </div>
+                                            <div class="col-sm-6">
+                                                <a href="" class="pull-right btn btn-primary btn-sm waves-effect waves-light" id="btn-archive">Archive</a>
+                                            </div>
+                                        </div>
+
+                                        <ul class="list-group no-margn nicescroll todo-list" style="max-height: 288px" id="todo-list"></ul>
+
+                                         <form name="todo-form" id="todo-form" role="form" class="m-t-20">
+                                            <div class="row">
+                                                <div class="col-sm-9 todo-inputbar">
+                                                    <input type="text" id="todo-input-text" name="todo-input-text" class="form-control" placeholder="Add new todo">
+                                                </div>
+                                                <div class="col-sm-3 todo-send">
+                                                    <button class="btn-primary btn-block btn waves-effect waves-light" type="button" id="todo-btn-submit">Add</button>
+                                                </div>
+                                            </div>
+                                        </form> 
+                                    </div> 
+                                </div>
+                            </div> <!-- end col -->
+
+                        </div> <!-- End row -->
+
+
+                    </div> <!-- container -->
+                               
+                </div> <!-- content -->
+
+                <script class="include" system="" path="inc/" file="foot">include()</script>
+
+            </div>
+            <!-- ============================================================== -->
+            <!-- End Right content here -->
+            <!-- ============================================================== -->
+
+            <script class="include" system="" path="inc/" file="chat">include()</script>
+
+    </div>
+    <!-- END wrapper -->
+
+    <script class="include" system="" path="inc/" file="script">include()</script>
+
+</body>
+</html>

+ 19 - 0
assets/moltran/html/inc/chat.html

@@ -0,0 +1,19 @@
+<!-- Right Sidebar -->
+            <div class="side-bar right-bar nicescroll">
+                <h4 class="text-center">Chat</h4>
+                <div class="contact-list nicescroll">
+                    <ul class="list-group contacts-list">
+                        <li class="list-group-item">
+                            <a href="#">
+                                <div class="avatar">
+                                    <img src="../img/users/avatar-1.jpg" alt="">
+                                </div>
+                                <span class="name">Dever Admin</span>
+                                <i class="fa fa-circle online"></i>
+                            </a>
+                            <span class="clearfix"></span>
+                        </li>
+                    </ul>  
+                </div>
+            </div>
+            <!-- /Right-bar -->

+ 5 - 0
assets/moltran/html/inc/foot.html

@@ -0,0 +1,5 @@
+<footer class="footer text-right">
+    2015 © Moltran.
+</footer>
+<div id="load_script" style="display:none;">
+</div>

+ 47 - 0
assets/moltran/html/inc/head.html

@@ -0,0 +1,47 @@
+<meta charset="utf-8">
+<title>后台管理</title>
+<meta name="keywords" content="后台管理">
+<meta name="description" content="后台管理">
+<meta name="apple-mobile-web-app-title" content="后台管理" />
+<meta name="author" content="rubin">
+<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="stylesheet" type="text/css" href="../script/lib/layui/css/layui.css" />
+<link rel="stylesheet" type="text/css" href="../script/lib/bootstrap/css/bootstrap.min.css" />
+<link rel="stylesheet" type="text/css" href="../script/lib/valid/validationEngine.jquery.css">
+<!--link rel="stylesheet" type="text/css" href="../script/lib/pnotify/pnotify.css"-->
+<link rel="stylesheet" type="text/css" href="../script/lib/fancybox/jquery.fancybox.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/highlight/highlight.min.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/datetime/jquery.datetimepicker.css">
+
+<!--edit css-->
+<link rel="stylesheet" type="text/css" href="../css/core.css" />
+<link rel="stylesheet" type="text/css" href="../css/components.css" />
+<link rel="stylesheet" type="text/css" href="../css/pages.css" />
+<link rel="stylesheet" type="text/css" href="../css/menu.css" />
+<link rel="stylesheet" type="text/css" href="../css/responsive.css" />
+<link rel="stylesheet" type="text/css" href="../script/lib/pjax/nprogress.css" />
+<!-- Responsive-table -->
+<link rel="stylesheet" type="text/css" href="../script/lib/table/rwd-table.min.css?v4">
+
+<!-- color -->
+<link rel="stylesheet" type="text/css" href="../script/lib/color/colpick.css">
+<link rel="stylesheet" type="text/css" href="../script/lib/kindeditor/themes/default/default.css" />
+
+<link rel="stylesheet" type="text/css" href="../script/lib/ui/ui.min.css">
+<!--
+<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/jqueryui/1.10.0/themes/base/minified/jquery-ui.min.css">
+-->
+
+<script type="text/javascript" src="../script/lib/jquery/jquery.min.js"></script>
+<script type="text/javascript" src="../js/modernizr.min.js"></script>
+<script id="script">var config={};</script>
+<style type="text/css" id="style">
+</style>
+
+<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
+<![endif]-->

+ 46 - 0
assets/moltran/html/inc/menu.html

@@ -0,0 +1,46 @@
+
+<!-- ========== Left Sidebar Start ========== -->
+
+            <div class="left side-menu" id="menu">
+                <div class="sidebar-inner slimscrollleft">
+                    <div class="user-details">
+                        <div class="pull-left">
+                            <img src="../img/users/avatar-1.jpg" alt="" class="thumb-md img-circle">
+                        </div>
+                        <div class="user-info">
+                            <div class="dropdown">
+                                <a href="#" id="manage-name" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Dever Admin <span class="caret" style="display:none;"></span></a>
+                                <ul class="dropdown-menu" style="display:none;">
+                                    <li><a href="javascript:void(0)"><i class="md md-face-unlock"></i> 个人资料<div class="ripple-wrapper"></div></a></li>
+                                    <li><a href="javascript:void(0)"><i class="md md-settings"></i> 设置</a></li>
+                                    <li><a href="javascript:void(0)"><i class="md md-lock"></i> 锁屏</a></li>
+                                    <li><a href="javascript:void(0)"><i class="md md-settings-power"></i> 退出</a></li>
+                                </ul>
+                            </div>
+                            
+                            <p class="text-muted m-0" id="manage-group">超级管理员</p>
+                        </div>
+                    </div>
+                    <!--- Divider -->
+                    <div id="sidebar-menu">
+                        <ul>
+                            <li>
+                                <a id="index-url" href="javascript:;" class="waves-effect waves-light active"><i class="glyphicon glyphicon-home"></i><span>控制台 </span></a>
+                            </li>
+
+                            <li class="has_sub project-list">
+                                <a href="javascript:;" class="waves-effect waves-light"><i class="md md-view-list"></i><span class="project-name"> Data Tables </span><span class="pull-right"><i class="md md-add"></i></span></a>
+                                <ul class="list-unstyled">
+                                    <li><a href="tables.html">Basic Tables</a></li>
+                                    <li><a href="table-datatable.html">Data Table</a></li>
+                                    <li><a href="tables-editable.html">Editable Table</a></li>
+                                    <li><a href="responsive-table.html">Responsive Table</a></li>
+                                </ul>
+                            </li>
+                        </ul>
+                        <div class="clearfix"></div>
+                    </div>
+                    <div class="clearfix"></div>
+                </div>
+            </div>
+            <!-- Left Sidebar End --> 

+ 118 - 0
assets/moltran/html/inc/nav.html

@@ -0,0 +1,118 @@
+<div id="load_style" style="display:none;">
+</div>
+<!-- Top Bar Start -->
+            <div class="topbar" id="nav">
+                <!-- LOGO -->
+                <div class="topbar-left">
+                    <div class="text-center">
+                        <a href="javascript:;" class="logo"><span id="dever-name">Moltran </span></a>
+                    </div>
+                </div>
+                <!-- Button mobile view to collapse sidebar menu -->
+                <div class="navbar navbar-default" role="navigation">
+                    <div class="container">
+                        <div class="">
+                            <div class="pull-left">
+                                <button class="button-menu-mobile open-left">
+                                    <i class="glyphicon glyphicon-align-justify"></i>
+                                </button>
+                                <span class="clearfix"></span>
+                            </div>
+
+                            <ul class="nav navbar-nav navbar-right pull-right">
+                                <li class="dropdown hidden-xs" style="display:none;">
+                                    <a href="#" data-target="#" class="dropdown-toggle waves-effect" data-toggle="dropdown" aria-expanded="true">
+                                        <i class="md md-notifications"></i> <span class="badge badge-xs badge-danger">3</span>
+                                    </a>
+                                    <ul class="dropdown-menu dropdown-menu-lg">
+                                        <li class="text-center notifi-title">Notification</li>
+                                        <li class="list-group">
+                                           <!-- list item-->
+                                           <a href="javascript:void(0);" class="list-group-item">
+                                              <div class="media">
+                                                 <div class="pull-left">
+                                                    <em class="fa fa-user-plus fa-2x text-info"></em>
+                                                 </div>
+                                                 <div class="media-body clearfix">
+                                                    <div class="media-heading">New user registered</div>
+                                                    <p class="m-0">
+                                                       <small>You have 10 unread messages</small>
+                                                    </p>
+                                                 </div>
+                                              </div>
+                                           </a>
+                                           <!-- list item-->
+                                            <a href="javascript:void(0);" class="list-group-item">
+                                              <div class="media">
+                                                 <div class="pull-left">
+                                                    <em class="fa fa-diamond fa-2x text-primary"></em>
+                                                 </div>
+                                                 <div class="media-body clearfix">
+                                                    <div class="media-heading">New settings</div>
+                                                    <p class="m-0">
+                                                       <small>There are new settings available</small>
+                                                    </p>
+                                                 </div>
+                                              </div>
+                                            </a>
+                                            <!-- list item-->
+                                            <a href="javascript:void(0);" class="list-group-item">
+                                              <div class="media">
+                                                 <div class="pull-left">
+                                                    <em class="fa fa-bell-o fa-2x text-danger"></em>
+                                                 </div>
+                                                 <div class="media-body clearfix">
+                                                    <div class="media-heading">Updates</div>
+                                                    <p class="m-0">
+                                                       <small>There are
+                                                          <span class="text-primary">2</span> new updates available</small>
+                                                    </p>
+                                                 </div>
+                                              </div>
+                                            </a>
+                                           <!-- last list item -->
+                                            <a href="javascript:void(0);" class="list-group-item">
+                                              <small>See all notifications</small>
+                                            </a>
+                                        </li>
+                                    </ul>
+                                </li>
+
+                                <li class="hidden-xs">
+                                    <ul class="nav navbar-nav navbar-right auth-top">
+                                        <li class="dropdown hidden-xs">
+                                            <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
+                                                <span>project</span>
+                                                <i class="glyphicon glyphicon-list"></i>
+                                            </a>
+
+                                          <ul class="dropdown-menu">
+                                            <li><a href="javascript:;">Users</a></li>
+                                          </ul>
+                                        </li>
+                                    </ul>
+                                </li>
+
+                                
+                                <li class="hidden-xs" style="display:none;">
+                                    <a href="#" id="btn-fullscreen" class="waves-effect"><i class="md md-crop-free"></i></a>
+                                </li>
+                                <li class="hidden-xs" style="display:none;">
+                                    <a href="#" class="right-bar-toggle waves-effect"><i class="md md-chat"></i></a>
+                                </li>
+                                <li class="dropdown">
+                                    <a href="" class="dropdown-toggle profile" data-toggle="dropdown" aria-expanded="true"><img src="../img/users/avatar-1.jpg" alt="user-img" class="img-circle"> </a>
+                                    <ul class="dropdown-menu">
+                                        <li><a href="javascript:void(0)"><i class="glyphicon glyphicon-user"  style="top: 3px;"></i> <span id="manage-name">个人资料</span></a></li>
+                                        <li><a href="javascript:;" data-name="ttt" id="edit_password" onclick="pass($(this));"><i class="glyphicon glyphicon-cog" style="top: 3px;"></i> 修改密码</a></li>
+                                        <li style="display:none;"><a href="javascript:void(0)"><i class="glyphicon glyphicon-lock" style="top: 3px;"></i> 锁屏</a></li>
+                                        <li><a id="logout-url" href="javascript:void(0)"><i class="glyphicon glyphicon-log-out"  style="top: 3px;"></i> 退出</a></li>
+                                    </ul>
+                                </li>
+                            </ul>
+                        </div>
+                        <!--/.nav-collapse -->
+                    </div>
+                </div>
+            </div>
+            <!-- Top Bar End -->

+ 86 - 0
assets/moltran/html/inc/script.html

@@ -0,0 +1,86 @@
+<!-- 模态框(Modal) -->
+
+<div class="modal fade" id="dever_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+  <div class="modal-dialog">
+    <div class="modal-content">
+        <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+            <h3 id="dever_modal_title">消息提醒</h3>
+        </div>
+        <div class="modal-body" id="dever_modal_body" style="overflow-x: hidden;overflow-y: auto;max-height: 400px;">
+            
+        </div>
+        <div class="modal-footer">
+            <button class="btn btn-default" id="dever_modal_no" data-dismiss="modal" aria-hidden="true">取消</button>
+            <button class="btn btn-danger" id="dever_modal_yes">确定</button>
+        </div>
+      </div>
+    </div>
+</div>
+<script type="text/javascript" src="../script/lib/pic/webp.js"></script>
+
+<!--[if (gte IE 9)|!(IE)]><!-->
+<script type="text/javascript" src="../script/lib/jquery/store.js"></script>
+<script type="text/javascript" src="../script/lib/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="../script/lib/pjax/pjax.js"></script>
+<script type="text/javascript" src="../script/lib/pjax/nprogress.js"></script>
+<!--<![endif]-->
+
+<!-- 加载颜色控件 -->
+<script type="text/javascript" src="../script/lib/color/colpick.js"></script>
+
+<!-- 加载时间控件 -->
+<script type="text/javascript" src="../script/lib/datetime/jquery.datetimepicker.min.js"></script>
+
+<!-- 加载notify提醒 -->
+<!--script type="text/javascript" src="../script/lib/pnotify/pnotify.js"></script-->
+
+<!-- 加载图片展示 -->
+<script type="text/javascript" src="../script/lib/fancybox/jquery.fancybox.js"></script>
+
+<!-- 加载echarts -->
+<script type="text/javascript" src="../script/lib/echarts/echarts.common.min.js?v1"></script>
+
+<!-- 加载highlight.min.js -->
+<script type="text/javascript" src="../script/lib/highlight/highlight.min.js"></script>
+
+<script type="text/javascript" src="../script/lib/clipboard/clipboard.js"></script>
+
+<!-- 加载主要js,很乱,后续优化 -->
+<script type="text/javascript" src="../script/lib/manage/main.js?v13"></script>
+
+<!-- 加载一些模板自带效果 -->
+<script>
+    var resizefunc = [];
+
+    $(document).ready(function()
+    {
+        initMenu();
+    });
+</script>
+<script type="text/javascript" src="../js/detect.js"></script>
+<script type="text/javascript" src="../js/fastclick.js"></script>
+<script type="text/javascript" src="../js/jquery.slimscroll.js"></script>
+
+<script type="text/javascript" src="../js/waves.js"></script> 
+<script type="text/javascript" src="../js/wow.min.js"></script> 
+<script type="text/javascript" src="../js/jquery.app.js"></script> 
+<script type="text/javascript" src="../script/lib/table/rwd-table.min.js?v3"></script>
+
+<script type="text/javascript" src="../script/lib/ui/ui.min.js"></script>
+
+
+<!-- 加载valid -->
+<script type="text/javascript" src="../script/lib/valid/jquery.validationEngine.min.js?v3"></script>
+
+<!-- 加载文本编辑器 -->
+<script type="text/javascript" src="../script/lib/kindeditor/kindeditor-all-min.js?v5"></script>
+<script type="text/javascript" src="../script/lib/kindeditor/lang/zh-CN.js"></script>
+
+<script type="text/javascript" src="../script/lib/qiniu/upload/plupload.full.min.js"></script>
+
+<script type="text/javascript" src="../script/lib/qiniu/qiniu.upload.js"></script>
+<script type="text/javascript" src="../script/lib/tool/md5.js"></script>
+
+<script type="text/javascript" src="../script/lib/layui/upload.js?v2"></script>
+<script type="text/javascript" src="../script/lib/layui/layui.all.js"></script>

+ 199 - 0
assets/moltran/html/list.html

@@ -0,0 +1,199 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+  <filter><script src="../../lib/common.js"></script><script src="../../lib/jquery/jquery.min.js"></script></filter>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+
+</head>
+  
+<body class="fixed-left">
+<!-- Begin page -->
+<div id="wrapper">
+    <script class="include" system="" path="inc/" file="nav">include()</script>
+    
+    <script class="include" system="" path="inc/" file="menu">include()</script>
+
+    <!-- ============================================================== -->
+    <!-- Start right Content here -->
+    <!-- ============================================================== -->
+    <div class="content-page">
+        <!-- Start content -->
+        <div class="content">
+<style>
+.container_list .form-control
+{
+    width:80%;
+    display: inline;
+}
+.container_list .panel-heading .form-control,#mul .form-control,#page .form-control
+{
+    display:inline;
+    width:15%;
+    margin-top: 10px;
+}
+
+.container_list .table
+{
+    margin-bottom: 0px;
+}
+
+.container_list td
+{
+    vertical-align: middle;
+}
+
+.container_list th,.container_list td
+{
+    white-space: nowrap;
+    /*white-space: none;*/
+}
+.container_list .table-responsive[data-pattern="priority-columns"]
+{
+    position:inherit;
+    margin-top:20px;
+    overflow-x: auto;
+    overflow-y: hidden;
+}
+.dever-emoji img {
+  width:16px;
+}
+</style>
+<style id="addstyle">
+</style>
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+            <div class="container container_list" id="content_1" style="display:none;"></div>
+            <div class="container container_list" id="content_2">
+                <!-- Page-Title -->
+                <div class="row">
+                    <div class="col-sm-12">
+                        <ul class="nav navbar-nav navbar-left data-auth-top">
+                            <li class="dropdown">
+                                <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
+                                    <span>project</span>
+                                </a>
+
+                              <ul class="dropdown-menu" style="overflow: auto;max-height: 350px;">
+                                <li><a href="javascript:;">Users</a></li>
+                              </ul>
+                            </li>
+                        </ul>
+                        <h4 class="pull-left page-title" id="list-name">Responsive Table</h4>
+                        <ol class="breadcrumb pull-right">
+                            <li><a href="javascript:;" onclick="showMsg('数据结构', $(this), '#struct')" id="list-project">Tables</a></li>
+                            <li class="active" id="list-desc">Responsive Table</li>
+                        </ol>
+                    </div>
+                </div>
+                <input type="hidden" name="url1" id="url" value=""/>
+                <form id="form1" name="form1" method="get" target="f1">
+                  <input type="hidden" name="l" id="l" value="msg"/>
+                  <input type="hidden" name="project" id="project" value="msg"/>
+                  <input type="hidden" name="table" id="tables" value="msg"/>
+                  <input type="hidden" name="menu" id="menu" value="msg"/>
+                  <input type="hidden" name="menu_id" id="menu_id" value="msg"/>
+                  <input type="hidden" name="search_option_state" id="search_option_state" value="msg"/>
+
+                  <input type="hidden" name="function" id="function" value="msg"/>
+                  <input type="hidden" name="method" id="method" value="search"/>
+                  <div id="search_param"></div> 
+                  <iframe id="f1" name="f1" style="display:none;"></iframe>
+
+                    <div class="row">
+                        <div class="col-lg-12">
+                            <div class="panel panel-border panel-primary">
+                                <div class="panel-heading"> 
+                                    <div class="btn-toolbar list-toolbar">
+
+ 
+                                        <a class="btn btn-primary" type="button" id="list-parent" style="display:none;"><i class="fa fa-chevron-left"></i> 返回上一页</a>
+                                        
+                                        <a class="btn btn-primary" type="button" id="list-add"><i class="fa fa-plus"></i> 新增</a>
+                                       
+                                        
+                                        <span id="list-button"></span>
+                                        <div id="search"></div>
+                                    </div>
+                                </div> 
+                                <div id="table_1" style="display:none;" class="panel-body table-rep-plugin"> 
+                                </div>
+                                <div id="table_2" class="panel-body table-rep-plugin"> 
+
+                                    <div class="table-responsive" data-pattern="priority-columns">
+                                        <div>
+                                            <table id="tech-companies-1" class="table table-small-font table-bordered table-striped table-tool">
+                                                <thead id="list-thead">
+                                                    <tr>
+                                                        <th>Company</th>
+                                                        <th data-priority="1">Last Trade</th>
+                                                        <th data-priority="3">Trade Time</th>
+                                                        <th data-priority="1">Change</th>
+                                                        <th data-priority="3">Prev Close</th>
+                                                        <th data-priority="3">Open</th>
+                                                        <th data-priority="6">Bid</th>
+                                                        <th data-priority="6">Ask</th>
+                                                        <th data-priority="6">1y Target Est</th>
+                                                        <th data-priority="6">Lorem</th>
+                                                        <th data-priority="6">Ipsum</th>
+                                                    </tr>
+                                                </thead>
+                                                <tbody id="list-tbody">
+                                                    <tr>
+                                                        <th>GOOG <span class="co-name">Google Inc.</span></th>
+                                                        <td>597.74</td>
+                                                        <td>12:12PM</td>
+                                                        <td>14.81 (2.54%)</td>
+                                                        <td>582.93</td>
+                                                        <td>597.95</td>
+                                                        <td>597.73 x 100</td>
+                                                        <td>597.91 x 300</td>
+                                                        <td>731.10</td>
+                                                        <td colspan="2">Spanning cell</td>
+                                                    </tr>      
+                                                    
+                                                </tbody>
+                                            </table>
+                                        </div>
+                                    </div>  
+                                    <div id="mul"></div>
+                                    <div id="page"></div>
+                                    <div class="dever_desc" id="desc"></div>
+                                </div> 
+                            </div>
+
+                        </div>
+                    </div> <!-- end row -->
+                    
+                </form>
+                <form id="form2" name="form2" method="get" style="display: none;">
+                </form>
+                <div id="struct" style="display:none;"></div>
+                <script>
+                    $(document).ready(function()
+                    {
+                      init();
+                    });
+                </script>
+            </div>
+        </div>
+        
+
+        <script class="include" system="" path="inc/" file="foot">include()</script>
+        
+        </div>
+        <!-- ============================================================== -->
+        <!-- End Right content here -->
+        <!-- ============================================================== -->
+
+        <script class="include" system="" path="inc/" file="chat">include()</script>
+        
+    </div>
+
+    <script class="include" system="" path="inc/" file="script">include()</script>
+
+</body>
+</html>

+ 44 - 0
assets/moltran/html/list/photo.html

@@ -0,0 +1,44 @@
+<style>
+.pr-list {
+    color: #97a0af;
+    font-size: 12px;
+    font-weight: 400;
+    margin: 0 -20px 30px;
+    padding: 0;
+    text-transform: none;
+}
+.pr-list li {
+    list-style: none;
+    padding: 6px 20px;
+}
+#page {
+	clear: both;
+}
+</style>
+
+<div id="photo_list" class="table-wrapper">
+<div class="col-sm-6 col-md-6 col-lg-3 photo_list">
+	  <div class="pricing-item">
+	    <div class="pricing-item-inner">
+	      <div class="pricing-wrap">     
+	        <!-- Pricing Title -->
+	        <div class="pricing-title">
+	          <div class="dever-img">
+				<img width="200" layer-src="https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=527764164,2221564766&fm=173&app=25&f=JPEG?w=218&h=146&s=593ABBF1405397EB5CA8891C030010D3" layer-pid="" src="https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=527764164,2221564766&fm=173&app=25&f=JPEG?w=218&h=146&s=593ABBF1405397EB5CA8891C030010D3" alt="说好的,一起Fly" style="display:none;">
+				</div>
+	        </div>
+
+	        <div class="pr-per dever-desc">
+	          我在那男的开发的经费看见对方
+	        </div>                      
+	        <!-- Button -->                     
+	        <div class="pr-button dever-button">
+	          <button class="btn btn-success w-md waves-effect waves-light">审核</button>
+	        </div>
+	      </div>
+	    </div>
+	  </div>
+	</div>
+</div>
+
+<div id="page"></div>

+ 90 - 0
assets/moltran/html/login.html

@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+  <filter><script src="../../lib/common.js"></script><script src="../../lib/jquery/jquery.min.js"></script></filter>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+</head>
+    <body>
+
+
+        <div class="wrapper-page">
+            <div class="panel panel-color panel-primary panel-pages">
+                <div class="panel-heading bg-img"> 
+                    <div class="bg-overlay"></div>
+                    <h3 class="text-center m-t-10 text-white"> 登录到 <strong id="name">Dever Manage</strong> </h3>
+                </div> 
+
+
+                <div class="panel-body">
+                <form action="/auth.login" method="post" target="f1" class="form-horizontal m-t-20" id="login">
+                <input type="hidden" name="function" id="function" value="msg">
+                <input type="hidden" name="refer" id="refer" value="">
+                <iframe id="f1" name="f1" style="display:none;"></iframe>
+                    
+                    <div class="form-group">
+                        <div class="col-xs-12">
+                            <input class="form-control input-lg" name="username" type="text" required="" placeholder="账号">
+                        </div>
+                    </div>
+
+                    <div class="form-group">
+                        <div class="col-xs-12">
+                            <input class="form-control input-lg" name="password" type="password" required="" placeholder="密码">
+                        </div>
+                    </div>
+
+                    <div class="form-group">
+                        <div class="col-xs-12">
+                            <div class="checkbox checkbox-primary">
+                                <input id="checkbox-signup" type="checkbox" checked>
+                                <label for="checkbox-signup">
+                                    记住密码
+                                </label>
+                            </div>
+                            
+                        </div>
+                    </div>
+                    
+                    <div class="form-group text-center m-t-40">
+                        <div class="col-xs-12">
+                            <button class="btn btn-primary btn-lg w-lg waves-effect waves-light" type="submit">登录</button>
+                        </div>
+                    </div>
+
+                    <div class="form-group m-t-30" style="display:none;">
+                        <div class="col-sm-7">
+                            <a href="recoverpw.html"><i class="fa fa-lock m-r-5"></i> 忘记密码?</a>
+                        </div>
+                        <div class="col-sm-5 text-right">
+                            <a href="register.html">注册</a>
+                        </div>
+                    </div>
+                </form> 
+                </div>                                 
+                
+            </div>
+
+            <div>
+                <p class="pull-right" style="font-size: .75em; margin-top: .25em;" id="footer">© 2015-2020 dever.cc,Inc. Licensed under MIT license.</p>
+            </div>
+        </div>
+
+        
+
+        
+        <script class="include" system="" path="inc/" file="script">include()</script>
+        <script>
+        $(function()
+        {
+          $("#login").bind("keydown",function(e){
+            var theEvent = e || window.event;    
+            var code = theEvent.keyCode || theEvent.which || theEvent.charCode;    
+            if (code == 13) {    
+                    $("#login").submit();
+                }
+           });
+        });
+
+        </script>
+    </body>
+</html>

+ 1 - 0
assets/moltran/html/manage/test.html

@@ -0,0 +1 @@
+test

+ 28 - 0
assets/moltran/html/map.html

@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>关键字检索</title>
+    <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
+    <style type="text/css">
+        #panel {
+            position: absolute;
+            background-color: white;
+            max-height: 90%;
+            overflow-y: auto;
+            top: 10px;
+            right: 10px;
+            width: 280px;
+        }
+    </style>
+    <script id="map" type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key={key}"></script>
+    <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
+</head>
+<body>
+<div id="container"></div>
+<div id="panel"></div>
+<script type="text/javascript" src="../script/lib/map/gaode.js"></script>
+</body>
+</html>

+ 59 - 0
assets/moltran/html/notice.html

@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+  <filter><script src="../../lib/common.js"></script><script src="../../lib/jquery/jquery.min.js"></script></filter>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+</head>
+  
+<body class="fixed-left">
+<!-- Begin page -->
+<div id="wrapper">
+
+    <script class="include" system="" path="inc/" file="nav">include()</script>
+    
+    <script class="include" system="" path="inc/" file="menu">include()</script>
+
+            <!-- ============================================================== -->
+            <!-- Start right Content here -->
+            <!-- ============================================================== -->                      
+            <div class="content-page">
+                <!-- Start content -->
+                <div class="content">
+                    <div class="container">
+
+                        <div class="row">
+                            <!-- INBOX -->
+                            <div class="col-lg-12" id="panel-contact">
+                                <div class="panel panel-default panel-fill">
+                                    <div class="panel-heading">
+                                        <h3 class="panel-title page-title">公告</h3>
+                                    </div>
+                                    <div class="panel-body main-content">
+
+                                    </div>
+                                </div>
+                            </div> <!-- end col -->
+
+                        </div> <!-- End row -->
+
+
+                    </div> <!-- container -->
+                               
+                </div> <!-- content -->
+
+                <script class="include" system="" path="inc/" file="foot">include()</script>
+
+            </div>
+            <!-- ============================================================== -->
+            <!-- End Right content here -->
+            <!-- ============================================================== -->
+
+            <script class="include" system="" path="inc/" file="chat">include()</script>
+
+    </div>
+    <!-- END wrapper -->
+
+    <script class="include" system="" path="inc/" file="script">include()</script>
+
+</body>
+</html>

+ 1 - 0
assets/moltran/html/project/database/list.html

@@ -0,0 +1 @@
+@include:list

+ 126 - 0
assets/moltran/html/project/database/stat.html

@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+  <filter><script src="../../lib/common.js"></script><script src="../../lib/jquery/jquery.min.js"></script></filter>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+
+</head>
+  
+<body class="fixed-left">
+<!-- Begin page -->
+<div id="wrapper">
+
+    <script class="include" system="" path="inc/" file="nav">include()</script>
+    
+    <script class="include" system="" path="inc/" file="menu">include()</script>
+
+    <!-- ============================================================== -->
+    <!-- Start right Content here -->
+    <!-- ============================================================== -->
+    <div class="content-page">
+
+        <!-- Start content -->
+        <div class="content">
+        <div class="topbar">
+                <div class="banner dever-layout" style="display:none;">
+                    <a target="_blank"><img src="#"></a>
+                    <span>项目名称</span>
+                </div>
+            </div>
+            <div class="container container_stat">
+<style>
+.container_stat .form-control
+{
+    display:inline;
+    width:15%;
+    margin-top: 10px;
+}
+</style>
+                <!-- Page-Title -->
+                <div class="row">
+                    <div class="col-sm-12">
+                        <ul class="nav navbar-nav navbar-left data-auth-top">
+                            <li class="dropdown">
+                                <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
+                                    <span>project</span>
+                                </a>
+
+                              <ul class="dropdown-menu">
+                                <li><a href="javascript:;">Users</a></li>
+                              </ul>
+                            </li>
+                        </ul>
+                        <h4 class="pull-left page-title" id="list-name">Responsive Table</h4>
+                        <ol class="breadcrumb pull-right">
+                            <li><a href="#dever_modal" data-toggle="modal" onclick="showMsg('数据结构', $(this), '#struct')" id="list-project">Tables</a></li>
+                            <li class="active" id="list-desc">Responsive Table</li>
+                        </ol>
+                    </div>
+                </div>
+
+                <div class="row">
+                        <div class="col-lg-12">
+                            <div class="panel panel-border panel-primary">
+                                <div class="panel-heading"> 
+                                    <div class="btn-toolbar list-toolbar">
+                                        <div id="search">
+                                            <div class="form-group">
+                                            <label>Username</label>
+                                            <input type="text" value="jsmith" class="form-control">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div> 
+                                <div class="panel-body table-rep-plugin"> 
+                                    <div data-pattern="priority-columns" id="table-list">
+                                        <table class="table table-small-font table-bordered table-striped">
+                                            <thead>
+                                                <tr>
+                                                    <th>字段</th>
+                                                    <th>日期</th>
+                                                    <th>统计数字</th>
+                                                </tr>
+                                            </thead>
+                                            <tbody>
+                                                <tr>
+                                                    <td>Product Design<br><p class="text-sm">Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master.</p></td>
+                                                    <td>10/3/2014</td>
+                                                    <td>$1,200.00</td>
+                                                </tr>
+                                            </tbody>
+                                        </table>
+                                    </div>
+
+                                    <div data-pattern="priority-columns" id="chart-list">
+                                        
+                                    </div>  
+                                </div> 
+                            </div>
+
+                        </div>
+                    </div> <!-- end row -->
+                <div id="struct" style="display:none;"></div>
+                <script>
+                    $(document).ready(function()
+                    {
+                      init();
+                    });
+                </script>
+            </div>
+        </div>
+        
+
+        <script class="include" system="" path="inc/" file="foot">include()</script>
+        
+        </div>
+        <!-- ============================================================== -->
+        <!-- End Right content here -->
+        <!-- ============================================================== -->
+        <script class="include" system="" path="inc/" file="chat">include()</script>
+        
+    </div>
+
+    <script class="include" system="" path="inc/" file="script">include()</script>
+
+</body>
+</html>

+ 155 - 0
assets/moltran/html/project/database/update.html

@@ -0,0 +1,155 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+  <filter><script src="../../lib/common.js"></script><script src="../../lib/jquery/jquery.min.js"></script></filter>
+  <script class="include" system="" path="inc/" file="head">include()</script>
+
+</head>
+  
+<body class="fixed-left">
+
+  <!-- Begin page -->
+  <div id="wrapper">    
+
+    <script class="include" system="" path="inc/" file="nav">include()</script>
+    
+    <script class="include" system="" path="inc/" file="menu">include()</script>
+
+    <!-- ============================================================== -->
+    <!-- Start right Content here -->
+    <!-- ============================================================== -->                      
+    <div class="content-page">
+        <!-- Start content -->
+        <div class="content">
+            <style>
+            .container_update #update_button button
+            {
+              margin-right: 5px;
+            }
+            .container_update #update_button
+            {
+              margin-top:20px;
+            }
+            .container_update .form-control
+            {
+              width: 50%;
+            }
+            .simditor img
+            {
+              width:100%;
+            }
+            .layui-tab-title {
+              height: 100%;
+              white-space: inherit;
+            }
+            </style>
+            <div class="topbar">
+                <div class="banner dever-layout" style="display:none;">
+                    <a target="_blank"><img src="#"></a>
+                    <span>项目名称</span>
+                </div>
+            </div>
+            <div class="container container_update" id="content_1" style="display:none;"></div>
+            <div class="container container_update" id="content_2">
+                <!-- Page-Title -->
+                <div class="row">
+                    <div class="col-sm-12">
+                        <ul class="nav navbar-nav navbar-left data-auth-top">
+                            <li class="dropdown">
+                                <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
+                                    <span>project</span>
+                                </a>
+
+                              <ul class="dropdown-menu">
+                                <li><a href="javascript:;">Users</a></li>
+                              </ul>
+                            </li>
+                        </ul>
+                        <h4 class="pull-left page-title" id="list-name">General elements</h4>
+                        <ol class="breadcrumb pull-right">
+                            <li><a href="#dever_modal" data-toggle="modal" onclick="showMsg('数据结构', $(this), '#struct')" id="list-project">Home</a></li>
+                            <li class="active" id="list-desc">General elements</li>
+                        </ol>
+                    </div>
+                </div>
+
+                <form method="post" target="f1" class="form1" role="form" autocomplete="off">
+                <input type="hidden" name="function" id="function" value="msg"/>
+                <input type="hidden" name="url" id="url" />
+                <input type="hidden" name="project" id="project" />
+                <input type="hidden" name="table" id="table" />
+                <iframe id="f1" name="f1" style="display:none;"></iframe>
+                  <div class="row">
+                    <div class="col-sm-12">
+                        <div class="panel panel-border panel-primary">
+                            <div class="panel-heading">
+                              <h3 class="panel-title dever_desc" id="desc">更新数据</h3>
+                              <ul class="nav nav-tabs">
+                                <li class="active" style="display:none;"><a href="#data-1" data-toggle="tab">更新数据</a></li>
+                                <li><a href="javascript:;" class="dever_update_add">增加一条</a></li>
+                                <li><a href="javascript:;" class="dever_save" style="display:none;">您有保存到草稿箱的数据</a></li>
+                              </ul>
+                            </div>
+                            <div class="panel-body" id="myTabContent">    
+                              <div class="tab-pane active in" id="data-1">     
+                                <input type="hidden" name="update_where_id" id="update_where_id"/>
+                                <input type="hidden" name="copy_num" id="copy_num" value="0"/>                      
+                                <div id="content">
+                                    <div class="form-group">
+                                      <label class="col-md-2 control-label">Text</label>
+                                      <div class="col-md-10">
+                                          <input type="text" class="form-control" value="Some text value...">
+                                      </div>
+                                    </div>
+                                </div>
+                              </div>
+                              <div class="list-toolbar" id="update_button">
+                                <button type="button" class="btn btn-primary save-data"><i class="fa fa-save"></i> 提交保存</button>
+                                <a href="#dever_modal" data-toggles="modal" class="btn btn-danger" onclick="msg({status:1,msg:'yes'})">放弃保存</a>
+                              </div>
+                            </div> <!-- panel-body -->
+
+                            
+                        </div> <!-- panel -->
+                    </div> <!-- col -->
+                  </div> <!-- End row -->
+                </form>
+                
+                
+                <div id="valid"></div>
+                <div id="struct" style="display:none;"></div>
+                  <link rel="stylesheet" href="../script/lib/layui/admin/modules/plugin/formselects/formselects.css" media="all" />
+               <style>
+                  .layui-input,.xm-select-parent
+                  {
+                    width: 50%;
+                  }
+              </style>
+              <script src="../script/lib/layui/admin/modules/plugin/formselects/formselects.js" type="text/javascript" charset="utf-8"></script>
+                <script>
+                    $(document).ready(function()
+                    {
+                      if (typeof(window.formSelects) != "undefined") {
+                        window.formSelects.render();
+                      }
+                      
+                      init();
+                    });
+                </script>
+
+            </div> <!-- container -->     
+          </div> <!-- content -->
+
+        
+
+        <script class="include" system="" path="inc/" file="foot">include()</script>
+
+    </div>
+    <!-- ============================================================== -->
+    <!-- End Right content here -->
+    <!-- ============================================================== -->
+
+    <script class="include" system="" path="inc/" file="script">include()</script>
+
+</body>
+</html>

BIN
assets/moltran/img/bg/bg.jpg


BIN
assets/moltran/img/users/avatar-1.jpg


+ 3 - 0
assets/moltran/js/demo.js

@@ -0,0 +1,3 @@
+/*
+自定义脚本,只是一个demo,可以在自己的项目建立
+*/

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 6 - 0
assets/moltran/js/detect.js


+ 841 - 0
assets/moltran/js/fastclick.js

@@ -0,0 +1,841 @@
+;(function () {
+	'use strict';
+
+	/**
+	 * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
+	 *
+	 * @codingstandard ftlabs-jsv2
+	 * @copyright The Financial Times Limited [All Rights Reserved]
+	 * @license MIT License (see LICENSE.txt)
+	 */
+
+	/*jslint browser:true, node:true*/
+	/*global define, Event, Node*/
+
+
+	/**
+	 * Instantiate fast-clicking listeners on the specified layer.
+	 *
+	 * @constructor
+	 * @param {Element} layer The layer to listen on
+	 * @param {Object} [options={}] The options to override the defaults
+	 */
+	function FastClick(layer, options) {
+		var oldOnClick;
+
+		options = options || {};
+
+		/**
+		 * Whether a click is currently being tracked.
+		 *
+		 * @type boolean
+		 */
+		this.trackingClick = false;
+
+
+		/**
+		 * Timestamp for when click tracking started.
+		 *
+		 * @type number
+		 */
+		this.trackingClickStart = 0;
+
+
+		/**
+		 * The element being tracked for a click.
+		 *
+		 * @type EventTarget
+		 */
+		this.targetElement = null;
+
+
+		/**
+		 * X-coordinate of touch start event.
+		 *
+		 * @type number
+		 */
+		this.touchStartX = 0;
+
+
+		/**
+		 * Y-coordinate of touch start event.
+		 *
+		 * @type number
+		 */
+		this.touchStartY = 0;
+
+
+		/**
+		 * ID of the last touch, retrieved from Touch.identifier.
+		 *
+		 * @type number
+		 */
+		this.lastTouchIdentifier = 0;
+
+
+		/**
+		 * Touchmove boundary, beyond which a click will be cancelled.
+		 *
+		 * @type number
+		 */
+		this.touchBoundary = options.touchBoundary || 10;
+
+
+		/**
+		 * The FastClick layer.
+		 *
+		 * @type Element
+		 */
+		this.layer = layer;
+
+		/**
+		 * The minimum time between tap(touchstart and touchend) events
+		 *
+		 * @type number
+		 */
+		this.tapDelay = options.tapDelay || 200;
+
+		/**
+		 * The maximum time for a tap
+		 *
+		 * @type number
+		 */
+		this.tapTimeout = options.tapTimeout || 700;
+
+		if (FastClick.notNeeded(layer)) {
+			return;
+		}
+
+		// Some old versions of Android don't have Function.prototype.bind
+		function bind(method, context) {
+			return function() { return method.apply(context, arguments); };
+		}
+
+
+		var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
+		var context = this;
+		for (var i = 0, l = methods.length; i < l; i++) {
+			context[methods[i]] = bind(context[methods[i]], context);
+		}
+
+		// Set up event handlers as required
+		if (deviceIsAndroid) {
+			layer.addEventListener('mouseover', this.onMouse, true);
+			layer.addEventListener('mousedown', this.onMouse, true);
+			layer.addEventListener('mouseup', this.onMouse, true);
+		}
+
+		layer.addEventListener('click', this.onClick, true);
+		layer.addEventListener('touchstart', this.onTouchStart, false);
+		layer.addEventListener('touchmove', this.onTouchMove, false);
+		layer.addEventListener('touchend', this.onTouchEnd, false);
+		layer.addEventListener('touchcancel', this.onTouchCancel, false);
+
+		// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+		// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
+		// layer when they are cancelled.
+		if (!Event.prototype.stopImmediatePropagation) {
+			layer.removeEventListener = function(type, callback, capture) {
+				var rmv = Node.prototype.removeEventListener;
+				if (type === 'click') {
+					rmv.call(layer, type, callback.hijacked || callback, capture);
+				} else {
+					rmv.call(layer, type, callback, capture);
+				}
+			};
+
+			layer.addEventListener = function(type, callback, capture) {
+				var adv = Node.prototype.addEventListener;
+				if (type === 'click') {
+					adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
+						if (!event.propagationStopped) {
+							callback(event);
+						}
+					}), capture);
+				} else {
+					adv.call(layer, type, callback, capture);
+				}
+			};
+		}
+
+		// If a handler is already declared in the element's onclick attribute, it will be fired before
+		// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
+		// adding it as listener.
+		if (typeof layer.onclick === 'function') {
+
+			// Android browser on at least 3.2 requires a new reference to the function in layer.onclick
+			// - the old one won't work if passed to addEventListener directly.
+			oldOnClick = layer.onclick;
+			layer.addEventListener('click', function(event) {
+				oldOnClick(event);
+			}, false);
+			layer.onclick = null;
+		}
+	}
+
+	/**
+	* Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
+	*
+	* @type boolean
+	*/
+	var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
+
+	/**
+	 * Android requires exceptions.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
+
+
+	/**
+	 * iOS requires exceptions.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
+
+
+	/**
+	 * iOS 4 requires an exception for select elements.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
+
+
+	/**
+	 * iOS 6.0-7.* requires the target element to be manually derived
+	 *
+	 * @type boolean
+	 */
+	var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent);
+
+	/**
+	 * BlackBerry requires exceptions.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
+
+	/**
+	 * Determine whether a given element requires a native click.
+	 *
+	 * @param {EventTarget|Element} target Target DOM element
+	 * @returns {boolean} Returns true if the element needs a native click
+	 */
+	FastClick.prototype.needsClick = function(target) {
+		switch (target.nodeName.toLowerCase()) {
+
+		// Don't send a synthetic click to disabled inputs (issue #62)
+		case 'button':
+		case 'select':
+		case 'textarea':
+			if (target.disabled) {
+				return true;
+			}
+
+			break;
+		case 'input':
+
+			// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
+			if ((deviceIsIOS && target.type === 'file') || target.disabled) {
+				return true;
+			}
+
+			break;
+		case 'label':
+		case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
+		case 'video':
+			return true;
+		}
+
+		return (/\bneedsclick\b/).test(target.className);
+	};
+
+
+	/**
+	 * Determine whether a given element requires a call to focus to simulate click into element.
+	 *
+	 * @param {EventTarget|Element} target Target DOM element
+	 * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
+	 */
+	FastClick.prototype.needsFocus = function(target) {
+		switch (target.nodeName.toLowerCase()) {
+		case 'textarea':
+			return true;
+		case 'select':
+			return !deviceIsAndroid;
+		case 'input':
+			switch (target.type) {
+			case 'button':
+			case 'checkbox':
+			case 'file':
+			case 'image':
+			case 'radio':
+			case 'submit':
+				return false;
+			}
+
+			// No point in attempting to focus disabled inputs
+			return !target.disabled && !target.readOnly;
+		default:
+			return (/\bneedsfocus\b/).test(target.className);
+		}
+	};
+
+
+	/**
+	 * Send a click event to the specified element.
+	 *
+	 * @param {EventTarget|Element} targetElement
+	 * @param {Event} event
+	 */
+	FastClick.prototype.sendClick = function(targetElement, event) {
+		var clickEvent, touch;
+
+		// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
+		if (document.activeElement && document.activeElement !== targetElement) {
+			document.activeElement.blur();
+		}
+
+		touch = event.changedTouches[0];
+
+		// Synthesise a click event, with an extra attribute so it can be tracked
+		clickEvent = document.createEvent('MouseEvents');
+		clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
+		clickEvent.forwardedTouchEvent = true;
+		targetElement.dispatchEvent(clickEvent);
+	};
+
+	FastClick.prototype.determineEventType = function(targetElement) {
+
+		//Issue #159: Android Chrome Select Box does not open with a synthetic click event
+		if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
+			return 'mousedown';
+		}
+
+		return 'click';
+	};
+
+
+	/**
+	 * @param {EventTarget|Element} targetElement
+	 */
+	FastClick.prototype.focus = function(targetElement) {
+		var length;
+
+		// Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
+		if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
+			length = targetElement.value.length;
+			targetElement.setSelectionRange(length, length);
+		} else {
+			targetElement.focus();
+		}
+	};
+
+
+	/**
+	 * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
+	 *
+	 * @param {EventTarget|Element} targetElement
+	 */
+	FastClick.prototype.updateScrollParent = function(targetElement) {
+		var scrollParent, parentElement;
+
+		scrollParent = targetElement.fastClickScrollParent;
+
+		// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
+		// target element was moved to another parent.
+		if (!scrollParent || !scrollParent.contains(targetElement)) {
+			parentElement = targetElement;
+			do {
+				if (parentElement.scrollHeight > parentElement.offsetHeight) {
+					scrollParent = parentElement;
+					targetElement.fastClickScrollParent = parentElement;
+					break;
+				}
+
+				parentElement = parentElement.parentElement;
+			} while (parentElement);
+		}
+
+		// Always update the scroll top tracker if possible.
+		if (scrollParent) {
+			scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
+		}
+	};
+
+
+	/**
+	 * @param {EventTarget} targetElement
+	 * @returns {Element|EventTarget}
+	 */
+	FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
+
+		// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
+		if (eventTarget.nodeType === Node.TEXT_NODE) {
+			return eventTarget.parentNode;
+		}
+
+		return eventTarget;
+	};
+
+
+	/**
+	 * On touch start, record the position and scroll offset.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onTouchStart = function(event) {
+		var targetElement, touch, selection;
+
+		// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
+		if (event.targetTouches.length > 1) {
+			return true;
+		}
+
+		targetElement = this.getTargetElementFromEventTarget(event.target);
+		touch = event.targetTouches[0];
+
+		if (deviceIsIOS) {
+
+			// Only trusted events will deselect text on iOS (issue #49)
+			selection = window.getSelection();
+			if (selection.rangeCount && !selection.isCollapsed) {
+				return true;
+			}
+
+			if (!deviceIsIOS4) {
+
+				// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
+				// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
+				// with the same identifier as the touch event that previously triggered the click that triggered the alert.
+				// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
+				// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
+				// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
+				// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
+				// random integers, it's safe to to continue if the identifier is 0 here.
+				if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
+					event.preventDefault();
+					return false;
+				}
+
+				this.lastTouchIdentifier = touch.identifier;
+
+				// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
+				// 1) the user does a fling scroll on the scrollable layer
+				// 2) the user stops the fling scroll with another tap
+				// then the event.target of the last 'touchend' event will be the element that was under the user's finger
+				// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
+				// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
+				this.updateScrollParent(targetElement);
+			}
+		}
+
+		this.trackingClick = true;
+		this.trackingClickStart = event.timeStamp;
+		this.targetElement = targetElement;
+
+		this.touchStartX = touch.pageX;
+		this.touchStartY = touch.pageY;
+
+		// Prevent phantom clicks on fast double-tap (issue #36)
+		if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+			event.preventDefault();
+		}
+
+		return true;
+	};
+
+
+	/**
+	 * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.touchHasMoved = function(event) {
+		var touch = event.changedTouches[0], boundary = this.touchBoundary;
+
+		if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
+			return true;
+		}
+
+		return false;
+	};
+
+
+	/**
+	 * Update the last position.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onTouchMove = function(event) {
+		if (!this.trackingClick) {
+			return true;
+		}
+
+		// If the touch has moved, cancel the click tracking
+		if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
+			this.trackingClick = false;
+			this.targetElement = null;
+		}
+
+		return true;
+	};
+
+
+	/**
+	 * Attempt to find the labelled control for the given label element.
+	 *
+	 * @param {EventTarget|HTMLLabelElement} labelElement
+	 * @returns {Element|null}
+	 */
+	FastClick.prototype.findControl = function(labelElement) {
+
+		// Fast path for newer browsers supporting the HTML5 control attribute
+		if (labelElement.control !== undefined) {
+			return labelElement.control;
+		}
+
+		// All browsers under test that support touch events also support the HTML5 htmlFor attribute
+		if (labelElement.htmlFor) {
+			return document.getElementById(labelElement.htmlFor);
+		}
+
+		// If no for attribute exists, attempt to retrieve the first labellable descendant element
+		// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
+		return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
+	};
+
+
+	/**
+	 * On touch end, determine whether to send a click event at once.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onTouchEnd = function(event) {
+		var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
+
+		if (!this.trackingClick) {
+			return true;
+		}
+
+		// Prevent phantom clicks on fast double-tap (issue #36)
+		if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+			this.cancelNextClick = true;
+			return true;
+		}
+
+		if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {
+			return true;
+		}
+
+		// Reset to prevent wrong click cancel on input (issue #156).
+		this.cancelNextClick = false;
+
+		this.lastClickTime = event.timeStamp;
+
+		trackingClickStart = this.trackingClickStart;
+		this.trackingClick = false;
+		this.trackingClickStart = 0;
+
+		// On some iOS devices, the targetElement supplied with the event is invalid if the layer
+		// is performing a transition or scroll, and has to be re-detected manually. Note that
+		// for this to function correctly, it must be called *after* the event target is checked!
+		// See issue #57; also filed as rdar://13048589 .
+		if (deviceIsIOSWithBadTarget) {
+			touch = event.changedTouches[0];
+
+			// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
+			targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
+			targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
+		}
+
+		targetTagName = targetElement.tagName.toLowerCase();
+		if (targetTagName === 'label') {
+			forElement = this.findControl(targetElement);
+			if (forElement) {
+				this.focus(targetElement);
+				if (deviceIsAndroid) {
+					return false;
+				}
+
+				targetElement = forElement;
+			}
+		} else if (this.needsFocus(targetElement)) {
+
+			// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
+			// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
+			if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
+				this.targetElement = null;
+				return false;
+			}
+
+			this.focus(targetElement);
+			this.sendClick(targetElement, event);
+
+			// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
+			// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
+			if (!deviceIsIOS || targetTagName !== 'select') {
+				this.targetElement = null;
+				event.preventDefault();
+			}
+
+			return false;
+		}
+
+		if (deviceIsIOS && !deviceIsIOS4) {
+
+			// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
+			// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
+			scrollParent = targetElement.fastClickScrollParent;
+			if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
+				return true;
+			}
+		}
+
+		// Prevent the actual click from going though - unless the target node is marked as requiring
+		// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
+		if (!this.needsClick(targetElement)) {
+			event.preventDefault();
+			this.sendClick(targetElement, event);
+		}
+
+		return false;
+	};
+
+
+	/**
+	 * On touch cancel, stop tracking the click.
+	 *
+	 * @returns {void}
+	 */
+	FastClick.prototype.onTouchCancel = function() {
+		this.trackingClick = false;
+		this.targetElement = null;
+	};
+
+
+	/**
+	 * Determine mouse events which should be permitted.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onMouse = function(event) {
+
+		// If a target element was never set (because a touch event was never fired) allow the event
+		if (!this.targetElement) {
+			return true;
+		}
+
+		if (event.forwardedTouchEvent) {
+			return true;
+		}
+
+		// Programmatically generated events targeting a specific element should be permitted
+		if (!event.cancelable) {
+			return true;
+		}
+
+		// Derive and check the target element to see whether the mouse event needs to be permitted;
+		// unless explicitly enabled, prevent non-touch click events from triggering actions,
+		// to prevent ghost/doubleclicks.
+		if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
+
+			// Prevent any user-added listeners declared on FastClick element from being fired.
+			if (event.stopImmediatePropagation) {
+				event.stopImmediatePropagation();
+			} else {
+
+				// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+				event.propagationStopped = true;
+			}
+
+			// Cancel the event
+			event.stopPropagation();
+			event.preventDefault();
+
+			return false;
+		}
+
+		// If the mouse event is permitted, return true for the action to go through.
+		return true;
+	};
+
+
+	/**
+	 * On actual clicks, determine whether this is a touch-generated click, a click action occurring
+	 * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
+	 * an actual click which should be permitted.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onClick = function(event) {
+		var permitted;
+
+		// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
+		if (this.trackingClick) {
+			this.targetElement = null;
+			this.trackingClick = false;
+			return true;
+		}
+
+		// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
+		if (event.target.type === 'submit' && event.detail === 0) {
+			return true;
+		}
+
+		permitted = this.onMouse(event);
+
+		// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
+		if (!permitted) {
+			this.targetElement = null;
+		}
+
+		// If clicks are permitted, return true for the action to go through.
+		return permitted;
+	};
+
+
+	/**
+	 * Remove all FastClick's event listeners.
+	 *
+	 * @returns {void}
+	 */
+	FastClick.prototype.destroy = function() {
+		var layer = this.layer;
+
+		if (deviceIsAndroid) {
+			layer.removeEventListener('mouseover', this.onMouse, true);
+			layer.removeEventListener('mousedown', this.onMouse, true);
+			layer.removeEventListener('mouseup', this.onMouse, true);
+		}
+
+		layer.removeEventListener('click', this.onClick, true);
+		layer.removeEventListener('touchstart', this.onTouchStart, false);
+		layer.removeEventListener('touchmove', this.onTouchMove, false);
+		layer.removeEventListener('touchend', this.onTouchEnd, false);
+		layer.removeEventListener('touchcancel', this.onTouchCancel, false);
+	};
+
+
+	/**
+	 * Check whether FastClick is needed.
+	 *
+	 * @param {Element} layer The layer to listen on
+	 */
+	FastClick.notNeeded = function(layer) {
+		var metaViewport;
+		var chromeVersion;
+		var blackberryVersion;
+		var firefoxVersion;
+
+		// Devices that don't support touch don't need FastClick
+		if (typeof window.ontouchstart === 'undefined') {
+			return true;
+		}
+
+		// Chrome version - zero for other browsers
+		chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
+
+		if (chromeVersion) {
+
+			if (deviceIsAndroid) {
+				metaViewport = document.querySelector('meta[name=viewport]');
+
+				if (metaViewport) {
+					// Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
+					if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+						return true;
+					}
+					// Chrome 32 and above with width=device-width or less don't need FastClick
+					if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
+						return true;
+					}
+				}
+
+			// Chrome desktop doesn't need FastClick (issue #15)
+			} else {
+				return true;
+			}
+		}
+
+		if (deviceIsBlackBerry10) {
+			blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
+
+			// BlackBerry 10.3+ does not require Fastclick library.
+			// https://github.com/ftlabs/fastclick/issues/251
+			if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
+				metaViewport = document.querySelector('meta[name=viewport]');
+
+				if (metaViewport) {
+					// user-scalable=no eliminates click delay.
+					if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+						return true;
+					}
+					// width=device-width (or less than device-width) eliminates click delay.
+					if (document.documentElement.scrollWidth <= window.outerWidth) {
+						return true;
+					}
+				}
+			}
+		}
+
+		// IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
+		if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
+			return true;
+		}
+
+		// Firefox version - zero for other browsers
+		firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
+
+		if (firefoxVersion >= 27) {
+			// Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
+
+			metaViewport = document.querySelector('meta[name=viewport]');
+			if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
+				return true;
+			}
+		}
+
+		// IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
+		// http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
+		if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
+			return true;
+		}
+
+		return false;
+	};
+
+
+	/**
+	 * Factory method for creating a FastClick object
+	 *
+	 * @param {Element} layer The layer to listen on
+	 * @param {Object} [options={}] The options to override the defaults
+	 */
+	FastClick.attach = function(layer, options) {
+		return new FastClick(layer, options);
+	};
+
+
+	if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
+
+		// AMD. Register as an anonymous module.
+		define(function() {
+			return FastClick;
+		});
+	} else if (typeof module !== 'undefined' && module.exports) {
+		module.exports = FastClick.attach;
+		module.exports.FastClick = FastClick;
+	} else {
+		window.FastClick = FastClick;
+	}
+}());

+ 370 - 0
assets/moltran/js/jquery.app.js

@@ -0,0 +1,370 @@
+/**
+* Theme: Montran Admin Template
+* Author: Coderthemes
+* Module/App: Main Js
+*/
+
+
+!function($) {
+    "use strict";
+
+    var Sidemenu = function() {
+        this.$body = $("body"),
+        this.$openLeftBtn = $(".open-left"),
+        this.$menuItem = $("#sidebar-menu a")
+    };
+    Sidemenu.prototype.openLeftBar = function() {
+      $("#wrapper").toggleClass("enlarged");
+      $("#wrapper").addClass("forced");
+
+      if($("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left")) {
+        $("body").removeClass("fixed-left").addClass("fixed-left-void");
+      } else if(!$("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left-void")) {
+        $("body").removeClass("fixed-left-void").addClass("fixed-left");
+      }
+      
+      if($("#wrapper").hasClass("enlarged")) {
+        //close
+        $.cookie('left_menu', 'close');
+        $(".left ul").removeAttr("style");
+      } else {
+        $.cookie('left_menu', 'open');
+        $(".subdrop").siblings("ul:first").show();
+      }
+      
+      toggle_slimscroll(".slimscrollleft");
+      $("body").trigger("resize");
+    },
+    //menu item click
+    Sidemenu.prototype.menuItemClick = function(e) {
+       if(!$("#wrapper").hasClass("enlarged")){
+        if($(this).parent().hasClass("has_sub")) {
+          e.preventDefault();
+        }   
+        if(!$(this).hasClass("subdrop")) {
+          // hide any open menus and remove all other classes
+          $("ul",$(this).parents("ul:first")).slideUp(350);
+          $("a",$(this).parents("ul:first")).removeClass("subdrop");
+          $("#sidebar-menu .pull-right i").removeClass("md-remove").addClass("md-add");
+          
+          // open our new menu and add the open class
+          $(this).next("ul").slideDown(350);
+          $(this).addClass("subdrop");
+          $(".pull-right i",$(this).parents(".has_sub:last")).removeClass("md-add").addClass("md-remove");
+          $(".pull-right i",$(this).siblings("ul")).removeClass("md-remove").addClass("md-add");
+        }else if($(this).hasClass("subdrop")) {
+          $(this).removeClass("subdrop");
+          $(this).next("ul").slideUp(350);
+          $(".pull-right i",$(this).parent()).removeClass("md-remove").addClass("md-add");
+        }
+      } 
+    },
+
+    //init sidemenu
+    Sidemenu.prototype.init = function() {
+      var $this  = this;
+      //bind on click
+      $(".open-left").click(function(e) {
+        e.stopPropagation();
+        $this.openLeftBar();
+      });
+
+      // LEFT SIDE MAIN NAVIGATION
+      $this.$menuItem.on('click', $this.menuItemClick);
+
+      // NAVIGATION HIGHLIGHT & OPEN PARENT
+      $("#sidebar-menu ul li.has_sub a.active").parents("li:last").children("a:first").addClass("active").trigger("click");
+    },
+
+    //init Sidemenu
+    $.Sidemenu = new Sidemenu, $.Sidemenu.Constructor = Sidemenu
+    
+}(window.jQuery),
+
+
+function($) {
+    "use strict";
+
+    var FullScreen = function() {
+        this.$body = $("body"),
+        this.$fullscreenBtn = $("#btn-fullscreen")
+    };
+
+    //turn on full screen
+    // Thanks to http://davidwalsh.name/fullscreen
+    FullScreen.prototype.launchFullscreen  = function(element) {
+      if(element.requestFullscreen) {
+        element.requestFullscreen();
+      } else if(element.mozRequestFullScreen) {
+        element.mozRequestFullScreen();
+      } else if(element.webkitRequestFullscreen) {
+        element.webkitRequestFullscreen();
+      } else if(element.msRequestFullscreen) {
+        element.msRequestFullscreen();
+      }
+    },
+    FullScreen.prototype.exitFullscreen = function() {
+      if(document.exitFullscreen) {
+        document.exitFullscreen();
+      } else if(document.mozCancelFullScreen) {
+        document.mozCancelFullScreen();
+      } else if(document.webkitExitFullscreen) {
+        document.webkitExitFullscreen();
+      }
+    },
+    //toggle screen
+    FullScreen.prototype.toggle_fullscreen  = function() {
+      var $this = this;
+      var fullscreenEnabled = document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled;
+      if(fullscreenEnabled) {
+        if(!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
+          $this.launchFullscreen(document.documentElement);
+        } else{
+          $this.exitFullscreen();
+        }
+      }
+    },
+    //init sidemenu
+    FullScreen.prototype.init = function() {
+      var $this  = this;
+      //bind
+      $this.$fullscreenBtn.on('click', function() {
+        $this.toggle_fullscreen();
+      });
+    },
+     //init FullScreen
+    $.FullScreen = new FullScreen, $.FullScreen.Constructor = FullScreen
+    
+}(window.jQuery),
+
+//portlets
+function($) {
+    "use strict";
+
+    /**
+    Portlet Widget
+    */
+    var Portlet = function() {
+        this.$body = $("body"),
+        this.$portletIdentifier = ".portlet",
+        this.$portletCloser = '.portlet a[data-toggle="remove"]',
+        this.$portletRefresher = '.portlet a[data-toggle="reload"]'
+    };
+
+    //on init
+    Portlet.prototype.init = function() {
+        // Panel closest
+        var $this = this;
+        $(document).on("click",this.$portletCloser, function (ev) {
+            ev.preventDefault();
+            var $portlet = $(this).closest($this.$portletIdentifier);
+                var $portlet_parent = $portlet.parent();
+            $portlet.remove();
+            if ($portlet_parent.children().length == 0) {
+                $portlet_parent.remove();
+            }
+        });
+
+        // Panel Reload
+        $(document).on("click",this.$portletRefresher, function (ev) {
+            ev.preventDefault();
+            var $portlet = $(this).closest($this.$portletIdentifier);
+            // This is just a simulation, nothing is going to be reloaded
+            $portlet.append('<div class="panel-disabled"><div class="loader-1"></div></div>');
+            var $pd = $portlet.find('.panel-disabled');
+            setTimeout(function () {
+                $pd.fadeOut('fast', function () {
+                    $pd.remove();
+                });
+            }, 500 + 300 * (Math.random() * 5));
+        });
+    },
+    //
+    $.Portlet = new Portlet, $.Portlet.Constructor = Portlet
+    
+}(window.jQuery),
+
+//main app module
+ function($) {
+    "use strict";
+    
+    var MoltranApp = function() {
+        this.VERSION = "1.1.0", 
+        this.AUTHOR = "Coderthemes", 
+        this.SUPPORT = "coderthemes@gmail.com", 
+        this.pageScrollElement = "html, body", 
+        this.$body = $("body")
+    };
+
+    //initializing tooltip
+    MoltranApp.prototype.initTooltipPlugin = function() {
+        $.fn.tooltip && $('[data-toggle="tooltip"]').tooltip()
+    }, 
+
+    //initializing popover
+    MoltranApp.prototype.initPopoverPlugin = function() {
+        $.fn.popover && $('[data-toggle="popover"]').popover()
+    }, 
+
+    //initializing nicescroll
+    MoltranApp.prototype.initNiceScrollPlugin = function() {
+        //You can change the color of scroll bar here
+        $.fn.niceScroll &&  $(".nicescroll").niceScroll({ cursorcolor: '#9d9ea5', cursorborderradius: '0px'});
+    },
+    
+     //on doc load
+    MoltranApp.prototype.onDocReady = function(e) {
+      FastClick.attach(document.body);
+      resizefunc.push("initscrolls");
+      resizefunc.push("changeptype");
+
+      $('.animate-number').each(function(){
+        $(this).animateNumbers($(this).attr("data-value"), true, parseInt($(this).attr("data-duration"))); 
+      });
+    
+      //RUN RESIZE ITEMS
+      $(window).resize(debounce(resizeitems,100));
+      $("body").trigger("resize");
+
+      // right side-bar toggle
+      $('.right-bar-toggle').on('click', function(e){
+          e.preventDefault();
+          $('#wrapper').toggleClass('right-bar-enabled');
+      }); 
+
+      
+    },
+    //initilizing 
+    MoltranApp.prototype.init = function() {
+        var $this = this;
+        this.initTooltipPlugin(),
+        this.initPopoverPlugin(),
+        this.initNiceScrollPlugin(),
+        //document load initialization
+        $(document).ready($this.onDocReady);
+        //creating portles
+        $.Portlet.init();
+        //init side bar - left
+        $.Sidemenu.init();
+        //init fullscreen
+        $.FullScreen.init();
+    },
+
+    $.MoltranApp = new MoltranApp, $.MoltranApp.Constructor = MoltranApp
+
+}(window.jQuery),
+
+//initializing main application module
+function($) {
+    "use strict";
+    $.MoltranApp.init();
+}(window.jQuery);
+
+
+
+/* ------------ some utility functions ----------------------- */
+//this full screen
+var toggle_fullscreen = function () {
+
+}
+
+function executeFunctionByName(functionName, context /*, args */) {
+  var args = [].slice.call(arguments).splice(2);
+  var namespaces = functionName.split(".");
+  var func = namespaces.pop();
+  for(var i = 0; i < namespaces.length; i++) {
+    context = context[namespaces[i]];
+  }
+  return context[func].apply(this, args);
+}
+var w,h,dw,dh;
+var changeptype = function(){
+    w = $(window).width();
+    h = $(window).height();
+    dw = $(document).width();
+    dh = $(document).height();
+
+    if(jQuery.browser.mobile === true){
+        $("body").addClass("mobile").removeClass("fixed-left");
+    }
+
+    if(!$("#wrapper").hasClass("forced")){
+      if(w > 990){
+        $("body").removeClass("smallscreen").addClass("widescreen");
+          $("#wrapper").removeClass("enlarged");
+      }else{
+        $("body").removeClass("widescreen").addClass("smallscreen");
+        $("#wrapper").addClass("enlarged");
+        $(".left ul").removeAttr("style");
+      }
+      if($("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left")){
+        $("body").removeClass("fixed-left").addClass("fixed-left-void");
+      }else if(!$("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left-void")){
+        $("body").removeClass("fixed-left-void").addClass("fixed-left");
+      }
+
+  }
+  toggle_slimscroll(".slimscrollleft");
+}
+
+
+var debounce = function(func, wait, immediate) {
+  var timeout, result;
+  return function() {
+    var context = this, args = arguments;
+    var later = function() {
+      timeout = null;
+      if (!immediate) result = func.apply(context, args);
+    };
+    var callNow = immediate && !timeout;
+    clearTimeout(timeout);
+    timeout = setTimeout(later, wait);
+    if (callNow) result = func.apply(context, args);
+    return result;
+  };
+}
+
+function resizeitems(){
+  if($.isArray(resizefunc)){  
+    for (i = 0; i < resizefunc.length; i++) {
+        window[resizefunc[i]]();
+    }
+  }
+}
+
+function initscrolls(){
+    if(jQuery.browser.mobile !== true){
+      //SLIM SCROLL
+      $('.slimscroller').slimscroll({
+        height: 'auto',
+        size: "5px"
+      });
+
+      $('.slimscrollleft').slimScroll({
+          height: 'auto',
+          position: 'right',
+          size: "5px",
+          color: '#7A868F',
+          wheelStep: 5
+      });
+  }
+}
+function toggle_slimscroll(item){
+    if($("#wrapper").hasClass("enlarged")){
+      $(item).css("overflow","inherit").parent().css("overflow","inherit");
+      $(item). siblings(".slimScrollBar").css("visibility","hidden");
+    }else{
+      $(item).css("overflow","hidden").parent().css("overflow","hidden");
+      $(item). siblings(".slimScrollBar").css("visibility","visible");
+    }
+}
+
+var wow = new WOW(
+  {
+    boxClass: 'wow', // animated element css class (default is wow)
+    animateClass: 'animated', // animation css class (default is animated)
+    offset: 50, // distance to the element when triggering the animation (default is 0)
+    mobile: false        // trigger animations on mobile devices (true is default)
+  }
+);
+wow.init();

+ 470 - 0
assets/moltran/js/jquery.slimscroll.js

@@ -0,0 +1,470 @@
+/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ *
+ * Version: 1.3.6
+ *
+ */
+(function($) {
+
+  $.fn.extend({
+    slimScroll: function(options) {
+
+      var defaults = {
+
+        // width in pixels of the visible scroll area
+        width : 'auto',
+
+        // height in pixels of the visible scroll area
+        height : '250px',
+
+        // width in pixels of the scrollbar and rail
+        size : '7px',
+
+        // scrollbar color, accepts any hex/color value
+        color: '#000',
+
+        // scrollbar position - left/right
+        position : 'right',
+
+        // distance in pixels between the side edge and the scrollbar
+        distance : '1px',
+
+        // default scroll position on load - top / bottom / $('selector')
+        start : 'top',
+
+        // sets scrollbar opacity
+        opacity : .4,
+
+        // enables always-on mode for the scrollbar
+        alwaysVisible : false,
+
+        // check if we should hide the scrollbar when user is hovering over
+        disableFadeOut : false,
+
+        // sets visibility of the rail
+        railVisible : false,
+
+        // sets rail color
+        railColor : '#333',
+
+        // sets rail opacity
+        railOpacity : .2,
+
+        // whether  we should use jQuery UI Draggable to enable bar dragging
+        railDraggable : true,
+
+        // defautlt CSS class of the slimscroll rail
+        railClass : 'slimScrollRail',
+
+        // defautlt CSS class of the slimscroll bar
+        barClass : 'slimScrollBar',
+
+        // defautlt CSS class of the slimscroll wrapper
+        wrapperClass : 'slimScrollDiv',
+
+        // check if mousewheel should scroll the window if we reach top/bottom
+        allowPageScroll : false,
+
+        // scroll amount applied to each mouse wheel step
+        wheelStep : 20,
+
+        // scroll amount applied when user is using gestures
+        touchScrollStep : 200,
+
+        // sets border radius
+        borderRadius: '7px',
+
+        // sets border radius of the rail
+        railBorderRadius : '7px'
+      };
+
+      var o = $.extend(defaults, options);
+
+      // do it for every element that matches selector
+      this.each(function(){
+
+      var isOverPanel, isOverBar, isDragg, queueHide, touchDif,
+        barHeight, percentScroll, lastScroll,
+        divS = '<div></div>',
+        minBarHeight = 30,
+        releaseScroll = false;
+
+        // used in event handlers and for better minification
+        var me = $(this);
+
+        // ensure we are not binding it again
+        if (me.parent().hasClass(o.wrapperClass))
+        {
+            // start from last bar position
+            var offset = me.scrollTop();
+
+            // find bar and rail
+            bar = me.closest('.' + o.barClass);
+            rail = me.closest('.' + o.railClass);
+
+            getBarHeight();
+
+            // check if we should scroll existing instance
+            if ($.isPlainObject(options))
+            {
+              // Pass height: auto to an existing slimscroll object to force a resize after contents have changed
+              if ( 'height' in options && options.height == 'auto' ) {
+                me.parent().css('height', 'auto');
+                me.css('height', 'auto');
+                var height = me.parent().parent().height();
+                me.parent().css('height', height);
+                me.css('height', height);
+              }
+
+              if ('scrollTo' in options)
+              {
+                // jump to a static point
+                offset = parseInt(o.scrollTo);
+              }
+              else if ('scrollBy' in options)
+              {
+                // jump by value pixels
+                offset += parseInt(o.scrollBy);
+              }
+              else if ('destroy' in options)
+              {
+                // remove slimscroll elements
+                bar.remove();
+                rail.remove();
+                me.unwrap();
+                return;
+              }
+
+              // scroll content by the given offset
+              scrollContent(offset, false, true);
+            }
+
+            return;
+        }
+        else if ($.isPlainObject(options))
+        {
+            if ('destroy' in options)
+            {
+            	return;
+            }
+        }
+
+        // optionally set height to the parent's height
+        o.height = (o.height == 'auto') ? me.parent().height() : o.height;
+
+        // wrap content
+        var wrapper = $(divS)
+          .addClass(o.wrapperClass)
+          .css({
+            position: 'relative',
+            overflow: 'hidden',
+            width: o.width,
+            height: o.height
+          });
+
+        // update style for the div
+        me.css({
+          overflow: 'hidden',
+          width: o.width,
+          height: o.height
+        });
+
+        // create scrollbar rail
+        var rail = $(divS)
+          .addClass(o.railClass)
+          .css({
+            width: o.size,
+            height: '100%',
+            position: 'absolute',
+            top: 0,
+            display: (o.alwaysVisible && o.railVisible) ? 'block' : 'none',
+            'border-radius': o.railBorderRadius,
+            background: o.railColor,
+            opacity: o.railOpacity,
+            zIndex: 90
+          });
+
+        // create scrollbar
+        var bar = $(divS)
+          .addClass(o.barClass)
+          .css({
+            background: o.color,
+            width: o.size,
+            position: 'absolute',
+            top: 0,
+            opacity: o.opacity,
+            display: o.alwaysVisible ? 'block' : 'none',
+            'border-radius' : o.borderRadius,
+            BorderRadius: o.borderRadius,
+            MozBorderRadius: o.borderRadius,
+            WebkitBorderRadius: o.borderRadius,
+            zIndex: 99
+          });
+
+        // set position
+        var posCss = (o.position == 'right') ? { right: o.distance } : { left: o.distance };
+        rail.css(posCss);
+        bar.css(posCss);
+
+        // wrap it
+        me.wrap(wrapper);
+
+        // append to parent div
+        me.parent().append(bar);
+        me.parent().append(rail);
+
+        // make it draggable and no longer dependent on the jqueryUI
+        if (o.railDraggable){
+          bar.bind("mousedown", function(e) {
+            var $doc = $(document);
+            isDragg = true;
+            t = parseFloat(bar.css('top'));
+            pageY = e.pageY;
+
+            $doc.bind("mousemove.slimscroll", function(e){
+              currTop = t + e.pageY - pageY;
+              bar.css('top', currTop);
+              scrollContent(0, bar.position().top, false);// scroll content
+            });
+
+            $doc.bind("mouseup.slimscroll", function(e) {
+              isDragg = false;hideBar();
+              $doc.unbind('.slimscroll');
+            });
+            return false;
+          }).bind("selectstart.slimscroll", function(e){
+            e.stopPropagation();
+            e.preventDefault();
+            return false;
+          });
+        }
+
+        // on rail over
+        rail.hover(function(){
+          showBar();
+        }, function(){
+          hideBar();
+        });
+
+        // on bar over
+        bar.hover(function(){
+          isOverBar = true;
+        }, function(){
+          isOverBar = false;
+        });
+
+        // show on parent mouseover
+        me.hover(function(){
+          isOverPanel = true;
+          showBar();
+          hideBar();
+        }, function(){
+          isOverPanel = false;
+          hideBar();
+        });
+
+        // support for mobile
+        me.bind('touchstart', function(e,b){
+          if (e.originalEvent.touches.length)
+          {
+            // record where touch started
+            touchDif = e.originalEvent.touches[0].pageY;
+          }
+        });
+
+        me.bind('touchmove', function(e){
+          // prevent scrolling the page if necessary
+          if(!releaseScroll)
+          {
+  		      e.originalEvent.preventDefault();
+		      }
+          if (e.originalEvent.touches.length)
+          {
+            // see how far user swiped
+            var diff = (touchDif - e.originalEvent.touches[0].pageY) / o.touchScrollStep;
+            // scroll content
+            scrollContent(diff, true);
+            touchDif = e.originalEvent.touches[0].pageY;
+          }
+        });
+
+        // set up initial height
+        getBarHeight();
+
+        // check start position
+        if (o.start === 'bottom')
+        {
+          // scroll content to bottom
+          bar.css({ top: me.outerHeight() - bar.outerHeight() });
+          scrollContent(0, true);
+        }
+        else if (o.start !== 'top')
+        {
+          // assume jQuery selector
+          scrollContent($(o.start).position().top, null, true);
+
+          // make sure bar stays hidden
+          if (!o.alwaysVisible) { bar.hide(); }
+        }
+
+        // attach scroll events
+        attachWheel(this);
+
+        function _onWheel(e)
+        {
+          // use mouse wheel only when mouse is over
+          if (!isOverPanel) { return; }
+
+          var e = e || window.event;
+
+          var delta = 0;
+          if (e.wheelDelta) { delta = -e.wheelDelta/120; }
+          if (e.detail) { delta = e.detail / 3; }
+
+          var target = e.target || e.srcTarget || e.srcElement;
+          if ($(target).closest('.' + o.wrapperClass).is(me.parent())) {
+            // scroll content
+            scrollContent(delta, true);
+          }
+
+          // stop window scroll
+          if (e.preventDefault && !releaseScroll) { e.preventDefault(); }
+          if (!releaseScroll) { e.returnValue = false; }
+        }
+
+        function scrollContent(y, isWheel, isJump)
+        {
+          releaseScroll = false;
+          var delta = y;
+          var maxTop = me.outerHeight() - bar.outerHeight();
+
+          if (isWheel)
+          {
+            // move bar with mouse wheel
+            delta = parseInt(bar.css('top')) + y * parseInt(o.wheelStep) / 100 * bar.outerHeight();
+
+            // move bar, make sure it doesn't go out
+            delta = Math.min(Math.max(delta, 0), maxTop);
+
+            // if scrolling down, make sure a fractional change to the
+            // scroll position isn't rounded away when the scrollbar's CSS is set
+            // this flooring of delta would happened automatically when
+            // bar.css is set below, but we floor here for clarity
+            delta = (y > 0) ? Math.ceil(delta) : Math.floor(delta);
+
+            // scroll the scrollbar
+            bar.css({ top: delta + 'px' });
+          }
+
+          // calculate actual scroll amount
+          percentScroll = parseInt(bar.css('top')) / (me.outerHeight() - bar.outerHeight());
+          delta = percentScroll * (me[0].scrollHeight - me.outerHeight());
+
+          if (isJump)
+          {
+            delta = y;
+            var offsetTop = delta / me[0].scrollHeight * me.outerHeight();
+            offsetTop = Math.min(Math.max(offsetTop, 0), maxTop);
+            bar.css({ top: offsetTop + 'px' });
+          }
+
+          // scroll content
+          me.scrollTop(delta);
+
+          // fire scrolling event
+          me.trigger('slimscrolling', ~~delta);
+
+          // ensure bar is visible
+          showBar();
+
+          // trigger hide when scroll is stopped
+          hideBar();
+        }
+
+        function attachWheel(target)
+        {
+          if (window.addEventListener)
+          {
+            target.addEventListener('DOMMouseScroll', _onWheel, false );
+            target.addEventListener('mousewheel', _onWheel, false );
+          }
+          else
+          {
+            document.attachEvent("onmousewheel", _onWheel)
+          }
+        }
+
+        function getBarHeight()
+        {
+          // calculate scrollbar height and make sure it is not too small
+          barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);
+          bar.css({ height: barHeight + 'px' });
+
+          // hide scrollbar if content is not long enough
+          var display = barHeight == me.outerHeight() ? 'none' : 'block';
+          bar.css({ display: display });
+        }
+
+        function showBar()
+        {
+          // recalculate bar height
+          getBarHeight();
+          clearTimeout(queueHide);
+
+          // when bar reached top or bottom
+          if (percentScroll == ~~percentScroll)
+          {
+            //release wheel
+            releaseScroll = o.allowPageScroll;
+
+            // publish approporiate event
+            if (lastScroll != percentScroll)
+            {
+                var msg = (~~percentScroll == 0) ? 'top' : 'bottom';
+                me.trigger('slimscroll', msg);
+            }
+          }
+          else
+          {
+            releaseScroll = false;
+          }
+          lastScroll = percentScroll;
+
+          // show only when required
+          if(barHeight >= me.outerHeight()) {
+            //allow window scroll
+            releaseScroll = true;
+            return;
+          }
+          bar.stop(true,true).fadeIn('fast');
+          if (o.railVisible) { rail.stop(true,true).fadeIn('fast'); }
+        }
+
+        function hideBar()
+        {
+          // only hide when options allow it
+          if (!o.alwaysVisible)
+          {
+            queueHide = setTimeout(function(){
+              if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)
+              {
+                bar.fadeOut('slow');
+                rail.fadeOut('slow');
+              }
+            }, 1000);
+          }
+        }
+
+      });
+
+      // maintain chainability
+      return this;
+    }
+  });
+
+  $.fn.extend({
+    slimscroll: $.fn.slimScroll
+  });
+
+})(jQuery);

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
assets/moltran/js/modernizr.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 337 - 0
assets/moltran/js/waves.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
assets/moltran/js/wow.min.js


+ 16 - 0
common.php

@@ -0,0 +1,16 @@
+<?php
+# 自动加载的公共函数
+function test()
+{
+	echo 1;die;
+}
+
+# 判断是否是layadmin模板
+function layadmin()
+{
+	$assets = Dever::config('template')->assets;
+    if ($assets && is_string($assets) && strstr($assets, 'layadmin')) {
+        return true;
+    }
+    return false;
+}

+ 98 - 0
config/base.php

@@ -0,0 +1,98 @@
+<?php
+
+$url = function()
+{
+	$url = Dever::input('loading') ? 'loading=1' : '';
+	$url .= Dever::input('ms') ? '&ms=' . Dever::input('ms') : '';
+
+	return $url;
+};
+
+# 一些基本配置
+$config['base'] = array
+(
+	'url' => $url(),
+
+	# 针对管理系统的配置,开启这个则每次刷新都读取admin的最新数据,测试功能
+	'getAdmin' => true,
+
+	# 开启批量更新
+	'mul_type' => 1,
+
+	# 地图配置
+	'map' => array
+	(
+		'url' => 'https://webapi.amap.com/maps?v=1.4.8&key=b51a0d5f8f977726eeaa070a30bcf3cd',
+	),
+
+	# 后台管理的数据执行权限的设置
+	'manageAuthData' => '',
+
+	# 后台左侧主菜单,定义了这个之后,所有deverapp中的project建立主菜单功能将失效
+	/*
+	'menu' => array
+	(
+		# 菜单名
+		'demand' => array
+		(
+			# 菜单名称
+			'name' => '需求管理',
+			# 哪些项目包含进来,多个用逗号隔开,直接把该项目中的database放到该菜单下
+			'project' => 'demand,service',
+			# 菜单图标 直接使用哪个project的图标
+			'icon' => 'demand',
+			# 排序
+			'order' => 100,
+		),
+
+		'main' => array
+		(
+			# 菜单名称
+			'name' => '系统设置',
+			# 哪些项目包含进来,多个用逗号隔开,直接把该项目中的database放到该菜单下
+			'project' => 'main,score,attr,category',
+			# 菜单图标 直接使用哪个project的图标
+			'icon' => 'main',
+			# 排序
+			'order' => 99,
+		),
+	)
+	*/
+);
+
+# 模板配置
+$config['template'] = array
+(
+	# 使用的模板 注意:定义这个之后,将会强制将本项目模板变成这个
+
+	'assets' => 'moltran',
+	'template' => 'default',
+
+	//'assets' => 'layadmin',
+	
+	# 替换设置 一般用于替换资源,将模板中的(html中的)js等相对url换成绝对url,如果不定义,则默认为../js这样的
+	'replace' => array
+	(
+		'css' => '../css/',
+		'lib' => '../lib/',
+		'img' => '../img/',
+		'images' => '../images/',
+		'js' => '../js/',
+		'script' => '../script/',
+
+		# 以下的替换主要用于合并操作(host里的merge项)
+		'font' => '../fonts/',
+	),
+
+	'path' => 'html',
+
+	# 是否启用layout 如启用,填写要替换的class或者id即可,具体效果可参考youtube,只加载部分内容,前端请加载pjax.js
+	'layout' => '.content',
+);
+
+if ($config['template']['assets'] == 'layadmin') {
+	$config['template']['layout'] = '';
+	$config['template']['template'] = $config['template']['assets'];
+}
+
+return $config;

+ 28 - 0
config/route.php

@@ -0,0 +1,28 @@
+<?php
+
+return array
+(
+	//'my/([0-9]+)/test/([a-zA-Z0-9]+).html' => 'project.database?id=$1&page=$2',
+	
+	# 项目管理
+	/*
+	'project-([a-zA-Z0-9]+)' => 'project/database?key=$1',
+	'project-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-list' => 'project/database/list?key=$1&table=$2',
+	'project-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-list-([0-9]+)' => 'project/database/list?key=$1&table=$2&page=$3',
+
+
+	'project-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-update' => 'project/database/update?key=$1&table=$2',
+	'project-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-update-([a-zA-Z0-9]+)' => 'project/database/update?key=$1&table=$2&where_id=$3',
+
+	# 为thead特殊处理 也可以不做处理
+	'project-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-list' => 'project/database/list?key=$1&table=$2&where_thead_id=$3',
+	'project-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)-list-([0-9]+)' => 'project/database/list?key=$1&table=$2&where_thead_id=$3&page=$4',
+
+	# 数据更新
+	'update_action' => 'database.update_action',
+	
+	# 登录
+	'login-(.*?)' => 'login?refer=$1',
+	*/
+
+);

+ 7 - 0
daemon/loop.php

@@ -0,0 +1,7 @@
+<?php
+
+define('DEVER_DAEMON', true);
+
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../index.php');
+
+Dever::load('manage/project.loop');

+ 7 - 0
daemon/main.php

@@ -0,0 +1,7 @@
+<?php
+
+define('DEVER_DAEMON', true);
+
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../index.php');
+
+Dever::load('manage/project.cron');

+ 619 - 0
database/admin.php

@@ -0,0 +1,619 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| admin.php 管理员表
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$status = array
+(
+	1 => '普通',
+	2 => '封禁',
+);
+
+$cur = Dever::load('manage/auth.data', false);
+
+$desc = '';
+if($cur['role'] > 1)
+{
+	$desc =  $cur['username'] . ',你好,你可以在此管理你的下属账号';
+
+	$child = array_keys(Dever::db('manage/role')->all());
+
+	$admin = Dever::db('manage/admin_role')->list(array
+	(
+		'col' => 'admin_id|admin_id',
+		'option' => array
+		(
+			'role_id' => array('yes', 'in'),
+		),
+		'option_role_id' => implode(',', $child),
+	));
+
+	# 配置当前列表页的参数 只能查看自己下属的管理员
+	Dever::$global['model']['manage/admin-list'] = array
+	(
+		'option' => array
+		(
+			'id' => array('yes', 'in'),
+		),
+		'option_id' => $admin ? array_keys($admin) : -1,
+	);
+}
+
+$role = function()
+{
+	return Dever::load('manage/role-all');
+};
+
+$group = function()
+{
+	return Dever::load('manage/group-all');
+};
+
+$config = function()
+{
+	return Dever::load('manage/config-all');
+};
+
+# 获取头部菜单list 建议这里使用匿名函数
+$top = function()
+{
+	$data = Dever::load('manage/top.all');
+	$data['state'] = 1;
+	return $data;
+};
+
+return array
+(
+	# 表名
+	'name' => 'admin',
+	# 显示给用户看的名称
+	'lang' => '管理账户设置',
+	'desc' => $desc,
+
+	/* 设置上级菜单,当config里设置menu后,这里将失效
+	'parent' => array
+	(
+		'key' => 'kefu',
+		'order' => 1,
+		'name' => '客服设置',
+	),
+	*/
+
+	# 这个表不使用cache功能
+	//'cache' => false,
+	/*
+	# 用到哪个后台菜单上,对应项目的key
+	'menu' => 'project_niuyou_main',
+	# 后台菜单排序
+	'order' => 10,
+	# 显示到后台快捷发布中,值为排序
+	'fast' => 1,
+	*/
+	'order' => 9,
+
+	# 检测email必须唯一
+	'check' => 'email',
+	# 同步更新另外一个或多个表的多条关联数据,以逗号隔开
+	'sync' => array
+	(
+		'manage/admin_role' => array
+		(
+			# 更新时的条件,另外一个表的字段 => 本表的字段
+			'where' => array('admin_id' => 'id'),
+			# 要更新的数据
+			'update' => array('role_id' => 'role'),
+			# 同步更新的类型,delete为先删再插入,update为先查询是否存在,存在直接更新,不存在则插入, only为仅更新
+			'type' => 'delete',
+		)
+	),
+
+
+	# 同步更新另外一个或多个表的一条关联数据
+	/*
+	'syncone' => array
+	(
+		'manage/admin_role' => array
+		(
+			# 更新另外一个表的字段 => 本表的字段
+			'where' => array('admin_id' => 'id'),
+			# 要更新的数据
+			'update' => array('role_id' => 'role'),
+		)
+	),
+	*/
+
+	/*该方法用check替代
+	'start' => array
+	(
+		'update' => 'manage/auth.check',
+		'insert' => 'manage/auth.check',
+	),
+	*/
+	'end' => array
+	(
+		'update' => 'manage/auth.update',
+	),
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '管理员ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+		
+		'username'		=> array
+		(
+			'type' 		=> 'varchar-24',
+			'name' 		=> '管理员名',
+			'default' 	=> '',
+			'desc' 		=> '请输入管理员名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			# 自动完成功能,第一个参数是请求的地址,请自行实现,第二个参数是要使用的字段,共有id和value两个选择,id会特殊处理,value则直接把当前值写入,第三个参数是直接替换当前的值,第四个参数是当前表里的字段名,一般为分类的id
+			//'autocomplete' => array('auth.role?json=1', 'value', 'manage/role-check#name', 'cate_id'),
+			//'autocomplete' => array('auth.role?json=1'),
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+			# 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
+			//'bind'		=> array('onblur', 'loading', array('url' => Dever::url("auth.blur"))),
+		),
+
+		#多级联动
+		//'update'	=> 'linkage',//多级联动 option参数:请求地址(返回参数为level_num当前联动级数,level_id当前选择的id),参考area组件:dever package area
+		//'option'	=> Dever::url('api.get', 'area'),
+
+		'email'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '邮箱-可用于登录,请准确填写,不允许重复',
+			'default' 	=> '',
+			'desc' 		=> '请输入邮箱',
+			'match' 	=> Dever::rule('email'),
+			'update'	=> 'text',
+			/*
+			* 列表页搜索选项,这里的search或者update的值为
+			* fulltext:全文检索,模糊匹配
+			* text:精确匹配
+			* exp:大小判断,仅能选择一项
+			* select:选择器,需要option项
+			* group:组选择器,需要option项
+			* linkage:多级联动选择器,需要option项,值为联动数据接口地址,参考area组件 'option'	=> Dever::url('api.get', 'area'), 'list'		=> 'Dever::load("area/api.string", "{area}")',
+			* exist:是否存在,需要exist项,基本配置为
+			$source_id = array
+			(
+				'yes' => '有值',
+				'no' => '没有值',
+				'no|2832' => '没有值或者有值为2832',
+				'yes|2832' => '有值并且过滤值为2829',
+				'2832' => '查找',
+			);
+			* 如果search的值为数组,则认为是接口,需要从接口获取数据后再进行查找
+			* 如'search'	=> array
+			(
+				'api' => 'passport/user-all',//接口地址,最好是获取多条数据的地址
+				'col' => 'name',//要查询的字段
+				'result' => 'id',//返回的字段
+				'search' => 'uid',//本表的字段,默认为当前的字段
+			),
+			* 就是将本字段email当做passport/user-one的name字段来查找id
+			*/
+			'search'	=> 'fulltext',
+			'list'		=> true,
+			# 在手机版或者小屏幕下,列表页的表格是否展示,1为展示,2、3、4、5、6均为在一定宽度下展示,详细参考:https://github.com/nadangergeo/RWD-Table-Patterns
+			'level'		=> 1,
+
+			//直接上传到云端
+			//'upload'	=> 'qiniu',
+			//上传大数据
+			//'large' 	=> true,
+		),
+
+		# 比较特殊的一些设置,不断添加中:
+		/*
+		'cate'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '标签分类',
+			'default' 	=> '1',
+			'desc' 		=> '标签分类',
+			'match' 	=> 'is_string',
+			'update'	=> 'select',
+			'option'	=> $cate,
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+			'control'	=> 'cate',
+		),
+		
+		# 标签,根据分类变化的标签
+		'tag'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '标签',
+			'default' 	=> '',
+			'desc' 		=> '标签',
+			'match' 	=> 'is_string',
+			'update'	=> 'checkbox',
+			# 新增接口 暂未实现
+			'adding'	=> 'tag/manage.getByCate?cate=',
+			# 开启这个,需要将update更换为text类型,输入文字即可选择标签
+			//'autocomplete' => array('tag/manage.getByName', 'id', 'tag/info-one#name'),
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+			# 与上边的cate联动(ajax)
+			'show'	=> 'cate=tag/manage.getByCate?cate=',
+		),
+		
+		# 加载地图
+		'map'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '地理位置',
+			'default' 	=> '',
+			'desc' 		=> '地理位置',
+			'match' 	=> 'is_string',
+			# 如果是map,必须在config的base.php中设置map信息
+			//'update'	=> 'map',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+
+			//自定义编辑器右侧按钮
+			'editor'	=> array
+			(
+				'name' => '选择插入模块',
+				'button' => array
+				(
+					array
+					(
+						# 名称
+						'name' => '图片',
+						# 资源库id
+						'key' => 1,
+						# 类型
+						'type' => 'image',
+					),
+					array
+					(
+						'name' => '音频',
+						'key' => 2,
+						'type' => 'media',
+					),
+					array
+					(
+						'name' => '视频',
+						'key' => 'video/lib/core.vod',
+					),
+					array
+					(
+						'name' => '直播',
+						'key' => 'video/lib/core.live',
+					),
+				),
+			),
+		),
+
+		# 三级地区联动
+		'area'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '地区',
+			'default' 	=> '',
+			'desc' 		=> '地区',
+			'match' 	=> 'is_string',
+			'search'	=> 'linkage',
+			'update'	=> 'linkage',//多级联动 option参数:请求地址(参数为level_num当前联动级数,level_id当前选择的id)
+			'option'	=> Dever::url('api.get', 'area'),
+			'list'		=> 'Dever::load("area/api.string", "{area}")',
+		),
+
+		# 无限级联动
+		'category'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '分类',
+			'default' 	=> '',
+			'desc' 		=> '分类',
+			'match' 	=> 'is_string',
+			'search'	=> 'linkage',
+			//'update'	=> 'linkage',
+			'option'	=> Dever::url('api.get', 'category'),
+			'list'		=> 'Dever::load("category/api.string", "{category}")',
+		),
+
+		# 属性管理
+		'attr'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '属性设置',
+			'default' 	=> '',
+			'desc' 		=> '属性设置',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $attr,
+			'update_input' => '',
+			'update_input_default' => '',
+			'update_parent' => 'checkbox',
+		),
+
+		# 属性管理 需要用这个来设置值
+		'attr_input'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '属性值设置',
+			'default' 	=> '',
+			'desc' 		=> '属性值设置',
+			'match' 	=> 'option',
+		),
+		*/
+
+		'mobile'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '手机号',
+			'default' 	=> '',
+			'desc' 		=> '请输入手机号',
+			'match' 	=> Dever::rule('mobile'),
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+			'level'		=> 1,
+			# 显示在table中
+			//'list_table'=> '111',
+		),
+		
+		'password'		=> array
+		(
+			'type' 		=> 'varchar-64',
+			'name' 		=> '管理员密码',
+			'default' 	=> '',
+			'desc' 		=> '请输入管理员密码',
+			'match' 	=> 'option',
+			'update'	=> 'password',
+			'callback'	=> 'hash.sha256',
+		),
+		
+		'config'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '后台配置',
+			'default' 	=> '1',
+			'desc' 		=> '请选择后台配置',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $config,
+			'update'	=> 'select',
+			'list'		=> true,
+		),
+		
+		'role'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '角色',
+			'default' 	=> '1',
+			'desc' 		=> '请选择角色',
+			'match' 	=> 'is_string',
+			'option' 	=> $role,
+			'update'	=> 'checkbox',
+			//'list'		=> true,
+		),
+
+		'group'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分组',
+			'default' 	=> '1',
+			'desc' 		=> '请选择分组',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $group,
+			'update'	=> 'select',
+			//'list'		=> true,
+		),
+
+		'top'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '头部菜单-这里的头部菜单如果设置,则会覆盖角色中的头部菜单',
+			'default' 	=> '',
+			'desc' 		=> '请选择头部菜单',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $top,
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '数据状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			//'option' 	=> $option,
+			//'update'	=> 'radio',
+			//'list'		=> true,
+			//'extend'	=> true,//扩展功能,该字段为虚拟字段,只在数据库中建立extend字段来保存 后续实现
+		),
+
+		/*
+		提供冲突检测机制(乐观锁),保证高并发下的数据安全
+		这是模仿自 php 的 Memcached 扩展 后续实现
+		'token'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'token',
+			'default' 	=> '1',
+			'desc' 		=> 'token',
+			'match' 	=> 'is_numeric',
+		),
+		*/
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $status,
+			'update'	=> 'radio',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', DEVER_TIME),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'delete' => false,
+		// 载入自定义资源
+		'res' => array
+		(
+			'js' => 'demo',
+			'css' => 'demo',
+		),
+
+		# 快捷更新
+		/*
+		'list_button' => array
+		(
+			'edit' => array('审核', 'name'),
+		),
+		*/
+
+
+		/*
+		'insert' => false,
+		'edit' => false,
+		//'delete' => false,
+
+		# 自定义快捷新增和编辑
+		'button' => array
+		(
+			'新增' => array('fast', 'name,reorder'),
+		),
+		# 快捷更新
+		'list_button' => array
+		(
+			'edit' => array('编辑', 'name,reorder'),
+		),
+		*/
+	),
+	
+	# 更新表结构
+	'alter' => array
+	(
+		2 => array
+		(
+			//array('update', 'role', 'role', 'varchar-100 1 角色'),
+			//array('add', 'config', 'config', 'int-11 1 配置'),
+		),
+		'version' => 2,
+	),
+	
+	# 默认值
+	/*
+	'default' => array
+	(
+		'col' => 'username,email,password,role,state,cdate',
+		'value' => array
+		(
+			//'"DMC","DMC@dever.cc","'. md5('admin_' . date('Y_m_d_H')) . '",1, 1,' . time(),
+			'"admin","DMC@dever.cc","'. hash('sha256', 'admin_123') . '",1, 1,' . DEVER_TIME,
+		),
+	),
+	*/
+	
+	# 索引
+	'index' => array
+	(
+		# 索引名 => 索引id
+		//'id' => 'id,state',
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		# one 根据用户名和密码取一条数据
+		'user' => array
+		(
+			# 匹配的正则或函数 必填项
+			'where' => array
+			(
+				//'username' => '/^([A-Za-z0-9])/',
+				//'username' => 'yes',
+				'email' => 'yes',
+				'status' => 1,
+				'state' => 1,
+				//'password' => 'is_string',
+			),
+			'type' => 'one',
+			# 为这个接口独立设置缓存
+			'cache' => true,
+		),
+
+		# one 根据用户名和密码取一条数据
+		'email' => array
+		(
+			# 匹配的正则或函数 必填项
+			'where' => array
+			(
+				//'username' => '/^([A-Za-z0-9])/',
+				//'username' => 'yes',
+				'email' => 'yes',
+				'status' => 1,
+				'state' => 1,
+				//'password' => 'is_string',
+			),
+			'type' => 'one',
+			# 为这个接口独立设置缓存
+			'cache' => true,
+		),
+
+		# one 根据用户名和密码取一条数据
+		'mobile' => array
+		(
+			# 匹配的正则或函数 必填项
+			'where' => array
+			(
+				//'username' => '/^([A-Za-z0-9])/',
+				//'username' => 'yes',
+				'mobile' => 'yes',
+				'status' => 1,
+				'state' => 1,
+				//'password' => 'is_string',
+			),
+			'type' => 'one',
+			# 为这个接口独立设置缓存
+			'cache' => true,
+		),
+		
+		# 更新密码
+		'password' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'password' => 'yes',
+			),
+		),
+	),
+);

+ 106 - 0
database/admin_role.php

@@ -0,0 +1,106 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| admin.php 管理员表
+|--------------------------------------------------------------------------
+*/
+
+return array
+(
+	# 表名
+	'name' => 'admin_role',
+	# 显示给用户看的名称
+	'lang' => '管理员角色关联表',
+	'menu' => false,
+
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+		
+		'admin_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '管理员ID',
+			'default' 	=> '',
+			'desc' 		=> '管理员ID',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'role_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '角色ID',
+			'default' 	=> '',
+			'desc' 		=> '角色ID',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', DEVER_TIME),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'*getTest' => array
+		(
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'type' => 'one',
+
+			#join为临时解决方案,不建议用join,建议用relate,join仅支持mysql
+			
+			# 联表
+			'join' => array
+			(
+				array
+				(
+					'table' => 'manage/admin',
+					'type' => 'left join',
+					'on' => array('admin_id','id'),
+					'col' => 'username',
+				),
+			),
+
+			# 检索相关的数据
+			'relate' => array
+			(
+				'manage/admin-one' => array
+				(
+					'option_id' => 'admin_id'
+				),
+			),
+		),
+
+		# query测试
+		'*getTest1' => array
+		(
+			'query' => 'select * from {table} where id = ?',
+			'type' => 'one',
+		),
+	)
+);

+ 190 - 0
database/api.php

@@ -0,0 +1,190 @@
+<?php
+
+$type = array
+(
+	1 => '获取',
+	2 => '更新',
+	3 => '删除',
+);
+
+$doc = 'token:<br />' . Dever\Http\Api::token() . '<br /><br />加密步骤:<br />a、将所有参数(包括公共请求参数和token)进行字符串字典序排序<br />b、将所有参数字符串拼接成一个字符串进行sha1加密,得到signature<br />c、将所有参数(不包括token)和signature一起传输过来即可';
+
+$request = array
+(
+	'time' => '时间戳(登录加密请忽略此参数)',
+	'nonce' => '唯一值(登录加密请忽略此参数)',
+	'signature' => '加密字符串',
+	'json' => '1(返回json格式数据)',
+	'dever_api_test' => 'test_yes(测试参数,请忽略)',
+);
+
+$html = '<br  />公共请求参数:<br />'.Dever::table($request).'<br />';
+
+$response = array
+(
+	'status' => '1请求成功2请求失败',
+	'msg' => '提示信息',
+	'data' => '数据,详见下述输出参数',
+	'code' => '状态码,一般不定义',
+);
+
+$html .= '公共返回参数:<br />'.Dever::table($response).'<br />';
+
+return array
+(
+	# 表名
+	'name' => 'api',
+	# 显示给用户看的名称
+	'lang' => '接口列表',
+	'menu' => false,
+	'html' => $html,
+	'doc' => $doc,
+	'gettype' => $type,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+		),
+
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '接口名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入接口名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '接口类型',
+			'default' 	=> '1',
+			'desc' 		=> '请选择接口类型',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $type,
+			//'update'	=> 'radio',
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
+
+		'project'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '所属项目',
+			'default' 	=> '',
+			'desc' 		=> '请输入所属项目',
+			'match' 	=> 'is_string',
+		),
+		
+		'site'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '接口地址',
+			'default' 	=> '',
+			'desc' 		=> '请输入接口地址',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> 'Dever::load("manage/api.getHtml", "{name}", "{site}", "'.$html.'", {id}, "{project}")',
+			'modal'		=> '点此查看',
+			//'bind'		=> array('onclick', 'checking', array('url' => Dever::url("manage/api.load?json=1"))),
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			//'search'	=> 'order',
+			//'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', DEVER_TIME),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	# 更新表结构
+	/*
+	'alter' => array
+	(
+		1 => array
+		(
+			array('update', 'request', 'request', 'text-255  请求'),
+			array('update', 'response', 'response', 'text-255  返回参数'),
+		),
+		'version' => 1,
+	),
+	*/
+	
+	'manage' => array
+	(
+		# 后台banner
+		'banner' => array
+		(
+			'img' => '"http://css.selfimg.com.cn/vogue/mobile-v2/vip/images/index-logo.png"',
+			'name' => '"项目名称"',
+		),
+		'button' => array
+		(
+			'更新接口' => 'manage/api.update',
+			'加密说明' => 'modal|' . $doc,
+			'生成接口文档' => Dever::url('doc/view?type=api', 'manage'),
+		),
+		'delete' => false,
+		//'insert' => false,
+		'edit' => false,
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		'site' => array
+		(
+			'where' => array
+			(
+				'site' => 'yes',
+			),
+			'type' => 'one',
+		),
+		
+		# 取所有
+		'all' => array
+		(
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|id',
+		),
+
+		# 取所有
+		'getAll' => array
+		(
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|project|id|',
+		),
+	),
+);

+ 96 - 0
database/api_request.php

@@ -0,0 +1,96 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| api_log.php 日志表
+|--------------------------------------------------------------------------
+*/
+
+return array
+(
+	# 表名
+	'name' => 'api_request',
+	# 显示给用户看的名称
+	'lang' => '接口请求信息',
+	'menu' => false,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+
+		'api_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '接口ID',
+			'default' 	=> '',
+			'desc' 		=> '接口ID',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+
+		'parent_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级ID',
+			'default' 	=> '-1',
+			'desc' 		=> '上级ID',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '字段',
+			'default' 	=> '',
+			'desc' 		=> '请输入字段',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '类型',
+			'default' 	=> '',
+			'desc' 		=> '请输入类型',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '描述',
+			'default' 	=> '',
+			'desc' 		=> '请输入描述',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作时间',
+			'match' 	=> array('is_numeric', DEVER_TIME),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+);

+ 96 - 0
database/api_response.php

@@ -0,0 +1,96 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| api_log.php 日志表
+|--------------------------------------------------------------------------
+*/
+
+return array
+(
+	# 表名
+	'name' => 'api_response',
+	# 显示给用户看的名称
+	'lang' => '接口响应信息',
+	'menu' => false,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+
+		'api_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '接口ID',
+			'default' 	=> '',
+			'desc' 		=> '接口ID',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+
+		'parent_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级ID',
+			'default' 	=> '-1',
+			'desc' 		=> '上级ID',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '字段',
+			'default' 	=> '',
+			'desc' 		=> '请输入字段',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '类型',
+			'default' 	=> '',
+			'desc' 		=> '请输入类型',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '描述',
+			'default' 	=> '',
+			'desc' 		=> '请输入描述',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作时间',
+			'match' 	=> array('is_numeric', DEVER_TIME),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+);

+ 175 - 0
database/auth.php

@@ -0,0 +1,175 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '生效',
+	2 => '失效',
+);
+
+return array
+(
+	# 表名
+	'name' => 'auth',
+	# 显示给用户看的名称
+	'lang' => '功能权限设置',
+	'menu' => false,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+		),
+
+		'project'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '项目key',
+			'default' 	=> '',
+			'desc' 		=> '请输入项目key',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'project_name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '项目名',
+			'default' 	=> '',
+			'desc' 		=> '请输入项目名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '权限名',
+			'default' 	=> '',
+			'desc' 		=> '请输入权限名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+		
+		'auth_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级权限',
+			'default' 	=> '-1',
+			'desc' 		=> '请选择上级权限',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'search'	=> 'order,select',
+			'list'		=> '{auth_id} > 0 ? Dever::load("manage/auth-one#name", {auth_id}) : "父级权限"',
+		),
+		
+		'key'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '权限key',
+			'default' 	=> '',
+			'desc' 		=> '请输入权限key',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'value'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '对应的值',
+			'default' 	=> '',
+			'desc' 		=> '请输入对应的值',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> array('is_numeric', 1),
+			'option' 	=> $option,
+			'update'	=> 'radio',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		'key' => array
+		(
+			'where' => array
+			(
+				'key' => 'yes',
+			),
+			'type' => 'one',
+		),
+
+		'project' => array
+		(
+			'where' => array
+			(
+				'state' => 1,
+			),
+			'type' => 'all',
+			'group' => 'project,project_name',
+			'col' => 'project,project_name',
+		),
+
+		# main 取所有主栏目
+		'main' => array
+		(
+			'where' => array
+			(
+				'auth_id' => -1,
+				'state' => 1,
+			),
+			
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*|project|id|',
+		),
+		
+		# 取所有下级栏目
+		'child' => array
+		(
+			'where' => array
+			(
+				'auth_id' => array('1', '>='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*|auth_id|id|',
+		),
+	)
+);

+ 208 - 0
database/config.php

@@ -0,0 +1,208 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| config.php 后台配置信息
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$option = array
+(
+	1 => '启用',
+	2 => '失效',
+);
+
+# 定义图片选择器的内容 key为id,value为显示的样式
+$template = array
+(
+	1 => '<span class="color theme-1"></span>',
+	2 => '<span class="color theme-2"></span>',
+	3 => '<span class="color theme-3"></span>',
+	4 => '<span class="color theme-4"></span>',
+	5 => '<span class="color theme-5"></span>',
+	6 => '<span class="color theme-6"></span>',
+	7 => '<span class="color theme-7"></span>',
+	8 => '<span class="color theme-8"></span>',
+);
+
+$selector = 'selector';
+/*
+if(Dever::$global['base'] != 'default')
+{
+	$selector = 'hidden';
+}
+*/
+
+return array
+(
+	# 表名
+	'name' => 'config',
+	# 显示给用户看的名称
+	'lang' => '后台个性化',
+	'order' => 10,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '配置ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '配置名',
+			'default' 	=> '',
+			'desc' 		=> '请输入配置名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		# 测试关联其他表字段 项目-表-字段 这里仅仅是测试
+		/*
+		'manage-admin-username'		=> array
+		(
+			# 必填,两个表之间的关联字段,第一个为当前表的,第二个为关联表的
+			'sync'		=> array('id', 'config'),
+			'default' 	=> '',
+			'name' 		=> '管理员',
+			'desc' 		=> '管理员',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		*/
+		
+		'template'		=> array
+		(
+			'type' 		=> 'int-1',
+			'name' 		=> '后台模板',
+			'default' 	=> '1',
+			'desc' 		=> '请选择后台模板',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $template,
+			//'update'	=> $selector,//图片选择器 注意跟select/radio不同哦
+		),
+		
+		'title'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '后台title',
+			'default' 	=> '',
+			'desc' 		=> '请输入后台title',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'info'		=> array
+		(
+			'type' 		=> 'varchar-40',
+			'name' 		=> '控制台欢迎标题',
+			'default' 	=> '',
+			'desc' 		=> '请输入控制台欢迎标题',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '控制台欢迎内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入控制台欢迎内容',
+			'match' 	=> 'option',
+			'update'	=> 'editor',
+			//'strip'		=> false,//默认是开启strip_tags过滤的,这里可以加上这个来取消过滤
+		),
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			//'option' 	=> $option,
+			//'update'	=> 'radio',
+			//'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	# 更新表结构
+	/*
+	'alter' => array
+	(
+		1 => array
+		(
+			array('add', 'info', 'info', 'varchar-40  控制台欢迎标题'),
+			array('add', 'content', 'content', 'text-255  控制台欢迎内容'),
+		),
+		
+		2 => array
+		(
+			array('add', 'template', 'template', 'int-1 1 模板'),
+		),
+		'version' => 2,
+	),
+	*/
+
+	# 默认值
+	'default' => array
+	(
+		'col' => 'name,state,cdate',
+		'value' => array
+		(
+			'"默认配置",1,' . time(),
+		),
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		# all 取所有数据
+		'all' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'name' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*|id',
+		),
+		
+		# 取一条正常的数据
+		'info' => array
+		(
+			# 匹配的正则或函数 选填项
+			'where' => array
+			(
+				'id' => 'yes',
+				'state' => 1,
+			),
+			'type' => 'one',
+		),
+	),
+);

+ 174 - 0
database/cron.php

@@ -0,0 +1,174 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| role.php 角色表
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$option = array
+(
+	1 => '可执行',
+	2 => '已完成',
+);
+
+$info = Dever::load('manage/project.get');
+
+$path = $info['manage']['path'];
+
+if(isset($info['manage']['setup']))
+{
+	$path = $info['manage']['setup'];
+}
+
+ 
+# 获取project
+$project = function() use ($info)
+{
+	$data = array();
+	foreach($info as $k => $v)
+	{
+		//$k = $v['lib'];
+		$data[$k]['id'] = $v['name'];
+		$data[$k]['name'] = $v['lang'];
+	}
+
+	return $data;
+};
+
+return array
+(
+	# 表名
+	'name' => 'cron',
+	# 显示给用户看的名称
+	'lang' => '计划任务',
+	'desc' => Dever::markdown('**启动cron的方法,以下三项任选其一:**
+	1. 常规任务:请将 ```* * * * * root php '.$path.'daemon/main.php``` 放到cron中[建议每分钟执行一次] 
+	2. 用户触发:请在 ```config/base.php里开启cron=true``` [一般适用于虚拟主机]
+	3. 长期运行:请执行 ```setsid php '.$path.'daemon/loop.php > /dev/null &``` 指令,放置后台运行[一般用于队列等需要长期运行的项目]'),
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '任务名',
+			'default' 	=> '',
+			'desc' 		=> '请输入任务名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'project'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '项目',
+			'default' 	=> '',
+			'desc' 		=> '请选择项目',
+			'match' 	=> 'is_string',
+			'update'	=> 'select',
+			'option'	=> $project,
+			'list'		=> true,
+		),
+		
+		'interface'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '接口(命令行)',
+			'default' 	=> '',
+			'desc' 		=> '请输入接口(命令行)',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'ldate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '执行时间',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '请选择执行时间',
+			'update'	=> 'date',
+			'callback'	=> 'maketime',
+			'list'		=> 'date("Y-m-d H:i:s", {ldate})',
+		),
+
+		'time'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '时间间隔(为0则执行一次)',
+			'default' 	=> '0',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '请输入时间间隔',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		//'delete' => false
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		# get
+		'get' => array
+		(
+			'where' => array
+			(
+				'ldate' => array('yes', '<='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*',
+		),
+
+		# get
+		'getOne' => array
+		(
+			'where' => array
+			(
+				'project' => 'yes',
+				'interface' => 'yes',
+			),
+			'type' => 'one',
+		),
+	),
+);

+ 121 - 0
database/filter.php

@@ -0,0 +1,121 @@
+<?php
+
+# 定义几个常用的选项
+$status = array
+(
+	1 => '未审核',
+	2 => '审核通过',
+	3 => '审核未通过',
+);
+
+return array
+(
+	# 表名
+	'name' => 'filter',
+	# 显示给用户看的名称
+	'lang' => '过滤词配置',
+	'order' => 1,
+	'menu' => false,
+	'check' => 'name',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '过滤词-请填写一些常用的黑名单词汇',
+			'default' 	=> '',
+			'desc' 		=> '请输入过滤词',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '过滤次数',
+			'default' 	=> '',
+			'desc' 		=> '请输入过滤次数',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '审核状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择审核状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $status,
+			'update'	=> 'radio',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+	
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '数据状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择数据状态',
+			'match' 	=> 'is_numeric',
+			//'option' 	=> $option,
+			//'update'	=> 'radio',
+			//'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	# 后台管理
+	'manage' => array
+	(
+		# 自定义页面
+		'page_list' => 'test',
+		# 是否有删除按钮
+		'delete' => 1,
+		# 是否物理删除
+		//'delete' => 2,
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'up' => array
+		(
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num' => array(1, '+='),
+			),
+			'type' => 'update',
+		),
+	)
+);

+ 99 - 0
database/filter_task.php

@@ -0,0 +1,99 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '生效',
+	2 => '失效',
+);
+
+return array
+(
+	# 表名
+	'name' => 'filter_task',
+	# 显示给用户看的名称
+	'lang' => '过滤系统任务',
+	'menu' => false,
+	'check' => 'content.s',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+		),
+
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '表名+id',
+			'default' 	=> '',
+			'desc' 		=> '请输入表名+id',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '过滤的内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入过滤的内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+	
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> array('is_numeric', 1),
+			'option' 	=> $option,
+			'update'	=> 'radio',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'data' => array
+		(
+			'limit' => array(10, 0),
+			'type' => 'all',
+			'order' => array('id', 'asc'),
+			'col' => 'id,name,content|id',
+		),
+
+		'dels' => array
+		(
+			'where' => array
+			(
+				'id' => array('yes', 'in'),
+			),
+			'type' => 'delete',
+		),
+	)
+);

+ 106 - 0
database/group.php

@@ -0,0 +1,106 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| role.php 角色表
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$option = array
+(
+	1 => '可用',
+	2 => '不可用',
+);
+
+$area = function()
+{
+	return Dever::load('setting/area-getAll', array('where_area_id_parent' => 0));
+};
+
+$config = array
+(
+	# 表名
+	'name' => 'group',
+	# 显示给用户看的名称
+	'lang' => '管理组设置',
+	'order' => 8,
+	# 表类型 值为\innodb\myisam\,默认为innodb,仅在mysql类型有效
+	'type' => 'innodb',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '组ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '组名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入组名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			//'list_name'	=> '角色名',//定义列表页的名称
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'area'		=> array
+		(
+			'type' 		=> 'varchar-255',
+			'name' 		=> '区域',
+			'default' 	=> '',
+			'desc' 		=> '请选择区域',
+			'match' 	=> 'option',
+			//'update'	=> 'checkbox',
+			//'option'	=> $area,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', DEVER_TIME),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	# 默认值
+	'default' => array
+	(
+		'col' => 'name,state,cdate',
+		'value' => array
+		(
+			'"默认分组",1,' . DEVER_TIME,
+		),
+	),
+
+	
+	# 后台管理 此处的功能全部开放
+	'manage' => array
+	(
+		
+	),
+);
+
+return $config;

+ 142 - 0
database/log.php

@@ -0,0 +1,142 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| log.php 日志表
+|--------------------------------------------------------------------------
+*/
+
+$admin = function()
+{
+	$array = array();
+	$info = Dever::load('manage/admin-state');
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+return array
+(
+	# 表名
+	'name' => 'log',
+	# 显示给用户看的名称
+	'lang' => '管理操作日志',
+	# 关闭验证重复提交功能
+	'submit' => false,
+	# 建表时进行分区,一般按照时间分区,仅在mysql类型有效
+	'partition' => array
+	(
+		'type' => 'range',//range分区,具体的值请查看mysql分区类型
+		'col' => 'YEAR(cdate)',//分区的字段值
+		'value' => array(2000,2010),//分区的值
+		'exp' => 'LESS THEN',//LESS THEN还是in等表达式
+	),
+
+	# 表类型 值为\innodb\myisam\,默认为innodb,仅在mysql类型有效
+	//'type' => 'innodb',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'project'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '项目名',
+			'default' 	=> '',
+			'desc' 		=> '请输入项目名',
+			'match' 	=> 'is_string',
+			'list'		=> 'Dever::load("manage/project.name", "{project}")',
+		),
+		
+		'table'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '项目下的表名',
+			'default' 	=> '',
+			'desc' 		=> '项目下的表名',
+			'match' 	=> 'is_string',
+			'list'		=> 'Dever::load("manage/database.getTableName", "{project}", "{table}")',
+		),
+		
+		'info'		=> array
+		(
+			'type' 		=> 'longtext',
+			'name' 		=> '日志记录',
+			'default' 	=> '',
+			'desc' 		=> '日志记录',
+			'match' 	=> 'is_string',
+			'list'		=> 'base64_decode("{info}")',
+			'modal'		=> '查看详情',
+		),
+		
+		'admin'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作人',
+			'default' 	=> '',
+			'desc' 		=> '操作人',
+			'match' 	=> 'is_string',
+			'list'		=> 'Dever::load("manage/admin-one#username", {admin})',
+			//'option'	=> $admin,
+			'search'	=> 'fulltext',
+		),
+		
+		'tid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '来源表id',
+			'default' 	=> '',
+			'desc' 		=> '来源表id',
+			'match' 	=> 'is_string',
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'option',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'time',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'delete' => false,
+	),
+	
+	# 索引
+	'index' => array
+	(
+		# 索引名 => 索引id
+		//'id' => 'id,state',
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		# onload 增加hack功能 使用该请求接口必须首先载入的类 如果需要子项也添加类似功能,可以使用start、end
+		'onload' => 'manage/auth.init',//这个是权限验证,必须后台登录
+	),
+);

+ 358 - 0
database/menu.php

@@ -0,0 +1,358 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '可用',
+	2 => '不可用',
+);
+
+$fast = array
+(
+	1 => '是',
+	2 => '否',
+);
+
+
+$type = array
+(
+	1 => '开启',
+	2 => '不开启',
+);
+
+# 图标
+$icon = array
+(
+	1 => '默认',
+);
+
+$menu = function()
+{
+	$array = array(-1 => array('name' => '父级菜单'));
+	$menu = Dever::load('manage/menu-get');
+	if($menu)
+	{
+		$array += $menu;
+	}
+	return $array;
+};
+
+$group = function()
+{
+	$array = array();
+	$menu = Dever::db('manage/menu_group')->state();
+	if($menu)
+	{
+		$array += $menu;
+	}
+	return $array;
+};
+
+if (layadmin()) {
+	$link = 'https://www.layui.com/doc/element/icon.html';
+} else {
+	$link = 'http://dwz.cn/1j8SP0';
+}
+return array
+(
+	# 表名
+	'name' => 'menu',
+	# 显示给用户看的名称
+	'lang' => '管理菜单设置',
+	'order' => 2,
+	//'check' => 'key',
+	'end' => array
+	(
+		'update' => 'manage/menu.updateKey',
+	),
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '菜单ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '菜单名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入菜单名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+
+		'group_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '选择分组',
+			'default' 	=> 1,
+			'desc' 		=> '请选择选择分组',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'search'	=> 'select',
+			'list'		=> true,
+			'option' 	=> $group,
+			'edit'		=> true,
+		),
+		
+		'menu_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级菜单',
+			'default' 	=> -1,
+			'desc' 		=> '请选择上级菜单',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			//'search'	=> 'order,select',
+			'value'		=> Dever::input('option_menu_id', -1),
+			'list'		=> '{menu_id} > 0 ? Dever::load("manage/menu-one#name", {menu_id}) : "父级菜单"',
+			'option' 	=> $menu,
+			//'edit'		=> true,
+		),
+
+		'menu'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '上级菜单',
+			'default' 	=> Dever::input('option_menu', -1),
+			'desc' 		=> '请选择上级菜单',
+			'match' 	=> 'is_string',
+			'update'	=> 'linkage',
+			'linkage' 	=> 'id=' . Dever::input('where_id'),
+			'option'	=> Dever::url('menu.getCate', 'manage'),
+		),
+		
+		'key'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '菜单标识-选填,可以为空,用来标识菜单的唯一性',
+			'default' 	=> '',
+			'desc' 		=> '请输入菜单标识',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+			//'modal'		=> 'test',
+		),
+
+		'link'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '链接(或路径)-选填,可以为空',
+			'default' 	=> '',
+			'desc' 		=> '请输入链接',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+		
+		'type'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '开启子菜单',
+			'default' 	=> '2',
+			'desc' 		=> '请选择开启子菜单',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $type,
+			//'update'	=> 'radio',
+			//'list'		=> true,
+		),
+
+		'icon'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '图标代码-请<a href="'.$link.'" target="_blank">点此</a>查看图标代码',
+			'default' 	=> 'glyphicon glyphicon-folder-close',
+			'desc' 		=> '请输入图标代码',
+			'match' 	=> 'is_string',
+			//'option' 	=> $icon,
+			'update'	=> 'text',
+		),
+		
+		'fast'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '是否快捷菜单',
+			'default' 	=> '2',
+			'desc' 		=> '请选择快捷菜单',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $fast,
+			'update'	=> 'radio',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		# 列表页的类型
+		'list_type' => 'tree',
+		'list_button' => array
+		(
+			'update' => '编辑',
+			'add' => array('新增子菜单', '"{menu}" == -1 ? "menu&option_menu={id}" : "menu&option_menu={menu},{id}"'),
+			'delete' => '删除',
+		),
+		'button' => array
+		(
+			'更新菜单' => 'manage/menu.update',
+			'菜单分组' => array('location', 'manage/project/database/list&project=manage&table=menu_group'),
+			//'全部清空' => 'manage/menu.delete',
+		),
+		# 每页显示条数,第一个为默认值
+		'num' => array(30,50,100),
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'menu_id' => 'yes',
+				'id' => array('yes', '!='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder' => 'desc', 'id' => 'asc'),
+			'col' => 'id as value, name',
+		),
+		# info 取一条正常的数据
+		'info' => array
+		(
+			'where' => array
+			(
+				'id' => 'is_numeric',
+				'state' => 1,
+			),
+			'type' => 'one',
+		),
+		
+		'key' => array
+		(
+			'where' => array
+			(
+				'key' => 'yes',
+			),
+			'type' => 'one',
+		),
+		
+		'keyId' => array
+		(
+			'where' => array
+			(
+				'key' => 'yes',
+				'id' => array('yes', '!='),
+			),
+			'type' => 'one',
+		),
+		
+		# 取所有菜单
+		'all' => array
+		(
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|id',
+		),
+
+		# main 取所有子菜单
+		'child' => array
+		(
+			'where' => array
+			(
+				'state' => 1,
+				'menu_id' => array(1, '>='),
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|menu_id|key|',
+		),
+		
+		# main 取所有一级菜单
+		'main' => array
+		(
+			'where' => array
+			(
+				'state' => 1,
+				'menu_id' => -1,
+			),
+			'option' => array
+			(
+				'key' => array('yes', 'in'),
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|key',
+		),
+		
+		# main 取所有一级菜单
+		'get' => array
+		(
+			'where' => array
+			(
+				'state' => 1,
+				'menu_id' => -1,
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|id',
+		),
+
+		# in测试in
+		'in' => array
+		(
+			'where' => array
+			(
+				'id' => array('yes', 'in'),
+			),
+			'type' => 'all',
+			//'order' => array('id' => 'desc'),
+		),
+	),
+);

+ 120 - 0
database/menu_group.php

@@ -0,0 +1,120 @@
+<?php
+
+# 图标
+$icon = array
+(
+	1 => '默认',
+);
+
+
+if (layadmin()) {
+	$link = 'https://www.layui.com/doc/element/icon.html';
+} else {
+	$link = 'http://dwz.cn/1j8SP0';
+}
+return array
+(
+	# 表名
+	'name' => 'menu_group',
+	# 显示给用户看的名称
+	'lang' => '菜单分组设置',
+	'order' => 2,
+	'menu' => false,
+	# 不允许key重复
+	'start' => array
+	(
+		//'update' => 'manage/menu.checkKey',
+		//'insert' => 'manage/menu.checkKey',
+	),
+	//'check' => 'key',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分组ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '分组名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入分组名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+
+		'icon'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '图标代码-请<a href="'.$link.'" target="_blank">点此</a>查看图标代码',
+			'default' 	=> 'glyphicon glyphicon-folder-close',
+			'desc' 		=> '请输入图标代码',
+			'match' 	=> 'is_string',
+			//'option' 	=> $icon,
+			'update'	=> 'text',
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'default' => array
+	(
+		'col' => 'name,icon,reorder,state,cdate',
+		'value' => array
+		(
+			'"默认分组","layui-icon layui-icon-home",1,1,' . DEVER_TIME,
+		),
+	),
+	
+	'manage' => array
+	(
+		
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	),
+);

+ 154 - 0
database/node.php

@@ -0,0 +1,154 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| opt.php 记录字段的表
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$option = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
+$info = Dever::load('manage/project.get');
+
+$path = $info['manage']['path'];
+
+if(isset($info['manage']['setup']))
+{
+	$path = $info['manage']['setup'];
+}
+ 
+# 获取project
+$project = function() use ($info)
+{
+	$data = array();
+	foreach($info as $k => $v)
+	{
+		$k = $v['lib'];
+		$data[$k]['id'] = $v['name'];
+		$data[$k]['name'] = $v['lang'];
+	}
+
+	return $data;
+};
+
+return array
+(
+	# 表名
+	'name' => 'node',
+	# 显示给用户看的名称
+	'lang' => '节点记录表',
+	'menu' => false,
+	'desc' => Dever::markdown('**本表记录所有模板用到的html节点:**
+	1. 请点击更新节点,获取最新的节点列表。 
+	2. 根据本记录表的内容,可以方便的开发一套新的模板。'),
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+		),
+		
+		'project'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '项目',
+			'default' 	=> '',
+			'desc' 		=> '请选择项目',
+			'match' 	=> 'is_string',
+			'update'	=> 'select',
+			'search'	=> 'select',
+			'option'	=> $project,
+			'list'		=> true,
+		),
+		
+		'service'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '模板业务-请输入模板业务',
+			'default' 	=> '',
+			'desc' 		=> '请选择模板业务',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'template'		=> array
+		(
+			'type' 		=> 'varchar-255',
+			'name' 		=> '模板名',
+			'default' 	=> '',
+			'desc' 		=> '请输入模板名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'key'			=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '节点标识',
+			'default' 	=> '',
+			'desc' 		=> '请输入节点标识',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'value'			=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '节点的值',
+			'default' 	=> '',
+			'desc' 		=> '节点的值',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '数据是否存在',
+			'default' 	=> '1',
+			'desc' 		=> '请选择数据是否存在',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+			//'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'edit' => false,
+		'insert' => false,
+		'button' => array
+		(
+			'更新节点' => 'manage/node.update',
+		)
+	),
+);

+ 151 - 0
database/notice.php

@@ -0,0 +1,151 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| admin.php 管理员表
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$option = array
+(
+	1 => '启用',
+	2 => '关闭',
+);
+
+$config = function()
+{
+	return Dever::load('manage/config-all');
+};
+
+return array
+(
+	# 表名
+	'name' => 'notice',
+	# 显示给用户看的名称
+	'lang' => '后台公告管理',
+	'order' => 7,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '公告ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '公告标题',
+			'default' 	=> '',
+			'desc' 		=> '请输入公告标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			//'autocomplete' => 'auth.role?json=1',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+		
+		'config'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '后台配置',
+			'default' 	=> '1',
+			'desc' 		=> '请选择后台配置',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $config,
+			'update'	=> 'select',
+			'list'		=> true,
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			//'list'		=> true,
+			'key' 		=> 1,
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		# 增加批量更新功能,根据哪个字段批量更新
+		'update_mul' => 'name',
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		# 根据配置id获取notice
+		'getAll' => array
+		(
+			# 匹配的正则或函数 必填项
+			'where' => array
+			(
+				//'username' => '/^([A-Za-z0-9])/',
+				'config' => 'yes',
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'limit' => '0,5',
+			'col' => '*',
+		),
+		
+		# 根据配置id和notice Id获取
+		'getOne' => array
+		(
+			'type' => 'one',
+			'where' => array
+			(
+				'id' => 'yes',
+				'config' => 'yes',
+				'state' => 1,
+			),
+			'input' => true,
+		),
+	),
+);

+ 230 - 0
database/opt.php

@@ -0,0 +1,230 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| opt.php 记录字段的表
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$option = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
+$status = array
+(
+	1 => '未做任何操作',
+	2 => '已建立索引',
+);
+
+$info = Dever\Loader\Project::read();
+
+$path = $info['manage']['path'];
+
+if(isset($info['manage']['setup']))
+{
+	$path = $info['manage']['setup'];
+}
+
+# 获取project
+$project = function() use ($info)
+{
+	$data = array();
+	foreach($info as $k => $v)
+	{
+		$k = $v['name'];
+		$data[$k]['id'] = $v['name'];
+		$data[$k]['name'] = $v['lang'];
+	}
+
+	return $data;
+};
+
+return array
+(
+	# 表名
+	'name' => 'opt',
+	# 显示给用户看的名称
+	'lang' => '字段记录表',
+	'desc' => Dever::markdown('**本表记录所有数据表文件里的request方法:**
+	1. 启用本表的记录功能,不会影响所有业务逻辑的执行效率,但会消耗服务器资源。建议仅在测试环境下开启或短时间内开启。请在config/base项中添加opt来确定是否启用。 
+	2. 在这里可以根据相应的记录,手动添加索引。'),
+	# 表类型 值为\innodb\myisam\,默认为innodb,仅在mysql类型有效
+	'type' => 'innodb',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+		),
+		
+		'project'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '项目',
+			'default' 	=> '',
+			'desc' 		=> '请选择项目',
+			'match' 	=> 'is_string',
+			'update'	=> 'select',
+			'search'	=> 'select',
+			'option'	=> $project,
+			'list'		=> true,
+		),
+		
+		'table'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '数据表-请输入表的英文名',
+			'default' 	=> '',
+			'desc' 		=> '请选择数据表',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> 'Dever::load("manage/opt.get#table", {id})',
+		),
+		
+		'method'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '所属方法名',
+			'default' 	=> '',
+			'desc' 		=> '请输入所属方法名',
+			'match' 	=> 'option',
+			//'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+
+		'col'			=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '使用的字段',
+			'default' 	=> '',
+			'desc' 		=> '请选择字段',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> 'Dever::load("manage/opt.get#text", {id})',
+			'list_name'	=> '分析优化',
+		),
+		
+		'col_index'			=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '建立索引的字段',
+			'default' 	=> '',
+			'desc' 		=> '请选择建立索引的字段',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+		
+		'version'			=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '版本号',
+			'default' 	=> '0',
+			'desc' 		=> '版本号',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '执行次数',
+			'default' 	=> '0',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '执行次数',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+
+		'time'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '执行时间',
+			'default' 	=> '0',
+			'match' 	=> 'is_string',
+			'desc' 		=> '执行时间',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+		
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '是否建立索引',
+			'default' 	=> '1',
+			'desc' 		=> '请选择是否建立索引',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $status,
+			'update'	=> 'radio',
+			//'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '数据是否存在',
+			'default' 	=> '1',
+			'desc' 		=> '请选择数据是否存在',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+			//'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'edit' => false,
+		'insert' => false,
+		'delete' => false,
+
+		'button' => array
+		(
+			'生成数据结构文档' => Dever::url('doc/view?type=db', 'manage'),
+			'Mysql规范和建议' => Dever::url('doc/view?type=mysql', 'manage'),
+			//'全部清空' => 'manage/menu.delete',
+		)
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		'updateNum' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'col' => 'yes',
+				'time' => 'yes',
+				'num' => array('1', '+='),
+			),
+		),
+	),
+);

+ 576 - 0
database/role.php

@@ -0,0 +1,576 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| role.php 角色表
+|--------------------------------------------------------------------------
+*/
+# 定义几个常用的选项
+$option = array
+(
+	1 => '可用',
+	2 => '不可用',
+);
+
+# 获取头部菜单list 建议这里使用匿名函数
+$top = function()
+{
+	$data = Dever::load('manage/top.all');
+	$data['state'] = 1;
+	return $data;
+};
+
+# 操作权限控制
+$oper = array
+(
+	1 => '浏览',
+	2 => '检索',
+	3 => '更新',
+	4 => '新增',
+	5 => '删除',
+);
+
+# 是否只能管理自己发布的内容
+$self = array
+(
+	1 => '是',
+	2 => '否',
+);
+
+# 获取当前登录管理员的所属角色,除id为1外,其余的角色只能管理本角色级别之下的子角色
+$cur = Dever::load('manage/auth.data');
+//print_r($cur);die;
+$desc = '';
+if($cur['role'] > 1)
+{
+	$desc =  $cur['username'] . ',你好,你可以在此管理你的下属角色';
+
+	# 配置当前列表页的参数
+	Dever::$global['model']['manage/role-all'] = Dever::$global['model']['manage/role-list'] = array
+	(
+		'option_role_id' => $cur['role'],
+	);
+
+	$temp = explode(',', $cur['oper']);
+	foreach($oper as $k => $v)
+	{
+		if(!in_array($k, $temp))
+		{
+			unset($oper[$k]);
+		}
+	}
+}
+
+# 获取权限list 建议这里使用匿名函数
+$auth = function() use($cur)
+{
+	if($cur['role'] > 1)
+	{
+		$auth = Dever::load('manage/auth.get', false);
+	}
+	else
+	{
+		$auth = Dever::load('manage/auth.get', true);
+	}
+	return $auth;
+};
+
+$role = function() use($cur)
+{
+	$param = $array = array();
+	if($cur['role'] > 1)
+	{
+		$param['option_id'] = $cur['role'];
+	}
+	else
+	{
+		$array = array(-1 => array('name' => '无'));
+	}
+	
+	$data = Dever::load('manage/role-main', $param);
+	if($data)
+	{
+		$array += $data;
+	}
+	return $array;
+};
+
+# 获取权限list 建议这里使用匿名函数
+$auth_data = function()
+{
+	$auth_data = Dever::load('manage/auth.getByData');
+	return $auth_data;
+};
+
+//print_r($auth);die;
+
+$config = array
+(
+	# 表名
+	'name' => 'role',
+	# 显示给用户看的名称
+	'lang' => '管理角色设置',
+	'desc' => $desc,
+	'order' => 8,
+	# 表类型 值为\innodb\myisam\,默认为innodb,仅在mysql类型有效
+	'type' => 'innodb',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '角色ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+
+		'hr0'		=> array
+		(
+			'name' 		=> '基本设置',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-24',
+			'name' 		=> '角色名',
+			'default' 	=> '',
+			'desc' 		=> '请输入角色名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list_name'	=> '角色名',//定义列表页的名称
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'role_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级角色',
+			'default' 	=> '-1',
+			'desc' 		=> '请选择上级角色',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'search'	=> 'order,select',
+			'list'		=> '{role_id}',
+			'option' 	=> $role,
+			'edit'		=> true,
+		),
+
+		'self'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '是否只能管理自己发布的内容-请在需要此项权限的表中增加[数据查询时影响的字段]',
+			'default' 	=> '2',
+			'desc' 		=> '请选择是否只能管理自己发布的内容',
+			'match' 	=> 'option',
+			'update'	=> 'radio',
+			'option'	=> $self,
+			'auth'		=> '"{my_role_id}"==1',
+		),
+
+		'col_select'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '数据查询时影响的字段-该项影响数据查询,如果在表中增加该字段,则后台在查询数据时自动查询当前管理员的id下的数据,多个用逗号隔开,与[是否只能管理自己发布的内容]相关',
+			'default' 	=> 'admin_founder',
+			'desc' 		=> '数据更新时影响的字段',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'auth'		=> '"{my_role_id}"==1',
+		),
+
+		'col_insert'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '数据插入时影响的字段-该项影响数据插入,如果在表中增加该字段,则后台操作时自动为该字段赋值为当前管理员的id,多个用逗号隔开',
+			'default' 	=> 'admin_founder',
+			'desc' 		=> '数据插入时影响的字段',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'auth'		=> '"{my_role_id}"==1',
+		),
+
+		'col_update'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '数据更新时影响的字段-该项影响数据更新,如果在表中增加该字段,则后台操作时自动为该字段赋值为当前管理员的id,多个用逗号隔开',
+			'default' 	=> 'admin_editor',
+			'desc' 		=> '数据更新时影响的字段',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'auth'		=> '"{my_role_id}"==1',
+		),
+		
+		/*
+		//启用复制其他字段的值
+		'testname'		=> array
+		(
+			'type' 		=> 'varchar-24',
+			'name' 		=> '角色名',
+			'default' 	=> '',
+			'desc' 		=> '请输入角色名',
+			'match' 	=> 'is_string',
+			'update'	=> 'copy.name',//直接复制name的值
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+
+		//当前的字段属于另外一个表,主要不要有type
+		'manage-role_test-name'=> array
+		(
+			'name' 		=> '测试名',
+			'default' 	=> '',
+			'desc' 		=> '请输入角色名',
+			'match' 	=> 'option',
+			'update'	=> 'text',//直接复制name的值
+			# 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
+			'sync'		=> array('id', 'role_id'),
+			'list'		=> true,
+		),
+		*/
+	
+		
+		#设置分割条
+		/*
+		'hr1'		=> array
+		(
+			'name' 		=> '基本信息',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+		*/
+		
+		'oper'		=> array
+		(
+			'type' 		=> 'varchar-24',
+			'name' 		=> '操作权限',
+			'default' 	=> array(1,2,3),
+			'desc' 		=> '请选择操作权限',
+			'match' 	=> 'is_string',
+			'update'	=> 'checkbox',
+			'option'	=> $oper,
+		),
+
+		'hr1'		=> array
+		(
+			'name' 		=> '菜单权限设置',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+
+		'auth'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '左侧菜单',
+			'default' 	=> '',
+			'desc' 		=> '请选择左侧菜单',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			//每个项对应的一个input以及父级更新的类型
+			//'update_input' => '数量',
+			//'update_parent' => 'radio',
+			'option'	=> $auth,
+		),
+
+		'top'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '右侧头部菜单',
+			'default' 	=> '',
+			'desc' 		=> '请选择右侧头部菜单',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $top,
+		),
+
+		'auth_data'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '数据权限',
+			'default' 	=> '',
+			'desc' 		=> '数据权限',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			//每个项对应的一个input以及父级更新的类型
+			//'update_input' => '数量',
+			//'update_parent' => 'radio',
+			'option'	=> $auth_data,
+		),
+	),
+
+	# 更新表结构 请注意,新增字段已经无需在此增加add了,直接在struct中新增即可。如果是更新字段和删除字段,还需在此加相应配置,并且修改最新的版本号。
+	/*
+	'alter' => array
+	(
+		1 => array
+		(
+			array('add', 'top', 'top', 'text-255  头部菜单'),//新增字段
+			array('update', 't1', 't2', 'text-255  头部菜单'),//更新字段
+			array('delete', 't1'), //删除字段
+		),
+		'version' => 1,
+	),
+	*/
+	
+	# 默认值
+	'default' => array
+	(
+		'col' => 'name,oper,auth,role_id,col_update,col_insert,col_select,state,cdate',
+		'value' => array
+		(
+			'"系统管理员","1,2,3,4,5","all",-1,"admin","admin","admin",1,' . time(),
+			'"普通管理员","1,2,3,4,5","",-1,"admin","admin","admin",1,' . time(),
+		),
+	),
+	
+	# 索引
+	/*
+	'index' => array
+	(
+		1 => array
+		(
+			# 索引名 => 索引id 如果有后缀.unique,则为建立索引的类型,如id,state.unique
+			'id' => 'id,state',
+		),
+		
+		# 版本号 更改版本号会更新当前表的索引
+		'version' => 1,
+	),
+	*/
+
+	# 头部菜单权限管理
+	//'auth' => 'customer-project',
+	
+	# 后台管理 此处的功能全部开放
+	'manage' => array
+	(
+		# 自定义列表页面
+		//'page_list' => 'test',
+		# 自定义页面
+		/*
+		'page' => 'test',
+		# 后台banner
+		'banner' => array
+		(
+			'img' => 'Dever::load("project/data.customer#img")',
+			'name' => 'Dever::load("project/data.customer#name")',
+		),
+		*/
+
+		# 更新数据时,要显示的按钮,这里填写js脚本事件即可。保存当前数据可为固定参数:"save-data",复制数据为:copy-data
+		/*
+		'update_button' => array
+		(
+			'提交保存' => 'save-data',
+			'放弃保存' => "msg({status:1,msg:'yes'})",
+			'复制数据' => 'copy-datas',
+		),
+		*/
+	
+		# 列表页的类型
+		//'list_type' => 'parent',
+		# 启动自动保存功能
+		//'save' => true,
+		# 启动预览功能
+		'preview' => true,
+		
+		# 开启报表下载 
+		# 涉及到报表下载,如果想使用phpexcel,请用composer安装phpexcel:require中添加 ,"phpoffice/phpexcel": "1.8.1",
+		# 否则请使用框架自带的csv
+		'excel' => true,
+		# 开启批量管理
+		'mul' => true,
+		# 开启主动统计,需要人工选择选项来确定统计的项,有别于被动统计,实现中
+		//'stat' => 'top,auth,state,oper,role_id,reorder',//值为不显示的字段,无需输入id和cdate
+		
+		
+		# 列表页每个元素管理下的button,其中'update'为编辑、'delete'为删除,其他可以自定义。
+		'list_button' => array('update' => '编辑'),
+		
+		# 列表头部的button,多个直接添加字段即可
+		'button' => array
+		(
+			//'更新接口' => 'manage/api.update',
+		)
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		# all 取所有数据
+		'alls' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'name' => array('is_string', 'like'),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*,name as value,name as label|id',//这里为了做autocomplete进行测试,必须输出value和label
+		),
+
+		# main 取所有主栏目
+		'main' => array
+		(
+			'where' => array
+			(
+				//'role_id' => -1,
+				'state' => 1,
+			),
+			'option' => array
+			(
+				'id' => array('yes', 'in'),
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|id',
+		),
+		
+		# 取所有下级栏目
+		'child' => array
+		(
+			'where' => array
+			(
+				'role_id' => array('1', '>='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|role_id|id|',
+		),
+		
+		# 带有*号前缀的,可以直接接口访问
+		'*get' => array
+		(
+			# 匹配的正则或函数 选填项
+			'where' => array
+			(
+				'id' => array('is_string', 'in'),
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*',
+		),
+		
+		# get 根据role的id取多条数据
+		'get' => array
+		(
+			# 匹配的正则或函数 选填项
+			'where' => array
+			(
+				'id' => array('is_string', 'in'),
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*|id',
+		),
+	),
+);
+
+$project = Dever::load('manage/auth-project');
+#Dever::debug('test');
+if($project)
+{
+	$config['struct']['hr2'] = array
+	(
+		'name' 		=> '项目精细权限设置',
+		'class'		=> '',//本项必须填写
+		'attr'		=> '',
+	);
+
+	$project_auth = Dever::load('manage/auth.all');
+
+	foreach($project as $k => $v)
+	{
+		$config['struct']['auth_' . $v['project']] = array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> $v['project_name'] . '下的权限设置',
+			'default' 	=> '',
+			'desc' 		=> '请选择' . $v['project_name'] . '下的权限设置',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $project_auth[$v['project']],
+		);
+	}
+}
+
+$config['struct']['reorder'] = array
+(
+	'type' 		=> 'int-11',
+	'name' 		=> '排序-数值越大越靠前',
+	'default' 	=> '1',
+	'desc' 		=> '请输入排序',
+	'match' 	=> 'option',
+	'update'	=> 'text',
+	'search'	=> 'order',
+	'list'		=> true,
+	'order'		=> 'desc',
+	'edit'		=> true,
+);
+
+$config['struct']['state'] = array
+(
+	'type' 		=> 'tinyint-1',
+	'name' 		=> '状态',
+	'default' 	=> '1',
+	'desc' 		=> '请选择状态',
+	'match' 	=> 'is_numeric',
+	//'option' 	=> $option,
+	//'update'	=> 'radio',
+	//'list'		=> true,
+	/*
+	//启用位运算,仅支持与操作,数据保存时,将从0开始加起,一般用于站点之类的保存,慎用,测试需将radio改成checkbox
+	'bit'		=> array
+	(
+		1 => 1,//1为对应的值,100为保存到数据库中的值
+		2 => 10,
+		//4 => 100,
+	),
+	*/
+);
+
+$config['struct']['status'] = array
+(
+	'type' 		=> 'tinyint-1',
+	'name' 		=> '状态',
+	'default' 	=> '1',
+	'desc' 		=> '请选择状态',
+	'match' 	=> 'is_numeric',
+	'option' 	=> $option,
+	//'update'	=> 'radio',
+	//'list'		=> true,
+	//'edit'		=> true,
+	/*
+	//启用位运算,仅支持与操作,数据保存时,将从0开始加起,一般用于站点之类的保存,慎用,测试需将radio改成checkbox
+	'bit'		=> array
+	(
+		1 => 1,//1为对应的值,100为保存到数据库中的值
+		2 => 10,
+		//4 => 100,
+	),
+	*/
+);
+
+$config['struct']['cdate'] = array
+(
+	'type' 		=> 'int-11',
+	'name' 		=> '录入时间',
+	'match' 	=> array('is_numeric', time()),
+	'desc' 		=> '',
+	# 只有insert时才生效
+	'insert'	=> true,
+	# 加入搜索时间区间段
+	'search'	=> 'date',
+	'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+);
+
+return $config;

+ 68 - 0
database/signature.php

@@ -0,0 +1,68 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| signature.php
+|--------------------------------------------------------------------------
+*/
+
+return array
+(
+	# 表名
+	'name' => 'signature',
+	# 显示给用户看的名称
+	'lang' => '生成的signature',
+	'menu' => false,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'signature'		=> array
+		(
+			'type' 		=> 'varchar-64',
+			'name' 		=> 'signature',
+			'default' 	=> '',
+			'desc' 		=> 'signature',
+			'match' 	=> 'is_string',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'delete' => false,
+		'edit' => false,
+		'insert' => false,
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'deleteByDay' => array
+		(
+			'where' => array
+			(
+				'time' => array('yes-cdate', '<='),
+			),
+			'type' => 'delete',
+		),
+	),
+);

+ 157 - 0
database/top.php

@@ -0,0 +1,157 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '生效',
+	2 => '失效',
+);
+
+return array
+(
+	# 表名
+	'name' => 'top',
+	# 显示给用户看的名称
+	'lang' => '头部菜单设置',
+	'menu' => false,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '权限名',
+			'default' 	=> '',
+			'desc' 		=> '请输入权限名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+		
+		'top_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级权限',
+			'default' 	=> -1,
+			'desc' 		=> '请选择上级权限',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'search'	=> 'order,select',
+			'list'		=> '{top_id} > 0 ? Dever::load("manage/top-one#name", {top_id}) : "父级权限"',
+		),
+		
+		'key'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '权限key',
+			'default' 	=> '',
+			'desc' 		=> '请输入权限key',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'value'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '对应的值',
+			'default' 	=> '',
+			'desc' 		=> '请输入对应的值',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		'key' => array
+		(
+			'where' => array
+			(
+				'key' => 'yes',
+			),
+			'type' => 'one',
+		),
+
+		'getOne' => array
+		(
+			'where' => array
+			(
+				'top_id' => 'yes',
+			),
+			'type' => 'one',
+			'order' => array('id', 'desc'),
+		),
+		
+		'keyId' => array
+		(
+			'where' => array
+			(
+				'key' => 'yes',
+				'id' => array('yes', '!='),
+			),
+			'type' => 'one',
+		),
+
+		# main 取所有子权限
+		'child' => array
+		(
+			'where' => array
+			(
+				'state' => 1,
+				'top_id' => array(1, '>='),
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*|top_id|key|',
+		),
+		
+		# main 取所有一级权限
+		'main' => array
+		(
+			'where' => array
+			(
+				'state' => 1,
+				'top_id' => -1,
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'col' => '*|key',
+		),
+	),
+);

+ 8 - 0
index.php

@@ -0,0 +1,8 @@
+<?php
+define('DEVER_SESSION', 1);
+define('DEVER_APP_NAME', 'manage');
+define('DEVER_APP_LANG', '后台设置');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', -100);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-wrench layui-icon-set-sm');
+include(DEVER_APP_PATH . '../boot.php');

+ 3 - 0
package.json

@@ -0,0 +1,3 @@
+{
+	"rely": "upload,script"
+}

+ 42 - 0
page/list.php

@@ -0,0 +1,42 @@
+<?php
+
+if (layadmin()) {
+	# 定义父节点的类型、属性等(整个page的节点)
+	$html->parent = array('ul', 'class="pagination layui-box layui-laypage layui-laypage-default" style="display:inline-flex;"');
+	# 定义子节点的类型、属性等(每个page的节点)
+	$html->child = array('li', 'class=""');
+	# 定义上一页的名称、样式
+	$html->prev = array('上一页', 'btn p1 layui-laypage-prev');
+	# 定义下一页的名称、样式
+	$html->next = array('下一页', 'btn p2 layui-laypage-next');
+	# 定义每个页数的样式,当前页的样式 样式写在哪 是否和旧样式共用
+	$html->page = array('layui-laypage-curr', 'dever_page_disabled layui-disabled', '');
+	# 定义开始页
+	$html->start = array('首页', 'layui-laypage-first');
+	# 定义结束页
+	$html->end = array('末页', 'layui-laypage-last');
+	# 定义跳转页
+	$html->jump = '<li class="layui-laypage-skip"><input type="text" class="form-control" id="dever_page" style="margin-top:0px;width:50px;font-size: 12px;" value="'.$page->current().'" onclick="$(this).val(\'\')"/><a href="javascript:;" style="float:right;" class="" {click}>跳转</a></li><li><span class="layui-laypage-count">每页 '.$page->num.' 条,共 '.$page->total.' 条</span></li>';
+} else {
+	# 定义父节点的类型、属性等(整个page的节点)
+	$html->parent = array('ul', 'class="pagination"');
+	# 定义子节点的类型、属性等(每个page的节点)
+	$html->child = array('li', 'class=""');
+	# 定义上一页的名称、样式
+	$html->prev = array('上一页', 'btn p1');
+	# 定义下一页的名称、样式
+	$html->next = array('下一页', 'btn p2');
+	# 定义每个页数的样式,当前页的样式 样式写在哪 是否和旧样式共用
+	$html->page = array('', 'dever_page_disabled', 'parent');
+	# 定义开始页
+	$html->start = array('首页', '');
+	# 定义结束页
+	$html->end = array('末页', '');
+	# 定义跳转页
+	$html->jump = '<li><input type="text" class="form-control" id="dever_page" style="margin-top:0px;width:50px;" value="'.$page->current().'" onclick="$(this).val(\'\')"/><a href="javascript:;" style="float:right;" class="" {click}>跳转</a></li>';
+}
+
+# 定义扩展信息
+$html->ext = '';
+# 生成
+$html->create();

+ 440 - 0
src/Api.php

@@ -0,0 +1,440 @@
+<?php
+namespace Manage\Src;
+
+use Dever;
+use Dever\Http\Api as Base;
+
+class Api
+{
+    /**
+     * fast
+     *
+     * @var array
+     */
+    private $fast = array();
+
+    /**
+     * data
+     *
+     * @var array
+     */
+    private $data = array();
+
+    /**
+     * 启动tcp服务
+     *
+     * @return array
+     */
+    public function tcp()
+    {
+        //return Dever::tcpReload(30000);
+    }
+
+    /**
+     * 测试dyna配置
+     *
+     * @return array
+     */
+    public function dyna()
+    {
+        $data['name'] = 1;
+        $data = Dever::dyna('home', $data);
+        return $data;
+    }
+
+    /**
+     * 测试传统模板引擎(类似smarty)
+     *
+     * @return array
+     */
+    public function test_display_api()
+    {
+        $data['test'] = 1111111111111;
+        $data['data'] = $this->test_foreach();
+        return Dever::render('example/render', $data);
+    }
+
+    public function test_display_data()
+    {
+        return 12323234;
+    }
+
+    public function test_foreach()
+    {
+        $config = array
+            (
+            array
+            (
+                'id' => 1,
+                'name' => '1111',
+                'child' => array
+                (
+                    array
+                    (
+                        'id' => 3,
+                        'name' => '3333',
+                        'child' => array
+                        (
+                            array
+                            (
+                                'id' => 9,
+                                'name' => '9999',
+                            ),
+                            array
+                            (
+                                'id' => 10,
+                                'name' => '10101010',
+                            ),
+                        ),
+                    ),
+                    array
+                    (
+                        'id' => 4,
+                        'name' => '4444',
+                    ),
+                ),
+            ),
+            array
+            (
+                'id' => 2,
+                'name' => '2222',
+                'child' => array
+                (
+                    array
+                    (
+                        'id' => 5,
+                        'name' => '5555',
+                    ),
+                    array
+                    (
+                        'id' => 6,
+                        'name' => '6666',
+                    ),
+                ),
+            ),
+        );
+
+        return $config;
+    }
+
+    /**
+     * 测试接口定义
+     *
+     * @return array
+     */
+    public function test_api()
+    {
+        $data = Dever::load('module/data.test');
+
+        print_r($data);die;
+    }
+
+    /**
+     * 测试逻辑验证步骤,必须包含step
+     *
+     * @return array
+     */
+    public function test_step_1()
+    {
+        print_r(Dever::input('type'));
+        # 传给下一步的数据
+        Dever::setStep('test');
+
+        $url = Dever::url('api.test_step_2?' . http_build_query(Dever::$global['step'][1]));
+
+        print_r($url);die;
+
+        #ok
+
+        echo 11;die;
+    }
+
+    /**
+     * 测试逻辑验证步骤,必须包含step
+     *
+     * @return array
+     */
+    public function test_step_2()
+    {
+        $data = Dever::getStep();
+        print_r($data);die;
+        echo 22;die;
+    }
+
+    /**
+     * 从数据库中得到所有接口,如果为空,则从项目中读取一次
+     *
+     * @return array
+     */
+    private function get($auth = '')
+    {
+        $data = Dever::load('manage/api-all');
+
+        if ($data) {
+            foreach ($data as $k => $v) {
+
+            }
+        } else {
+            # 数据为空,读取一次,后续就得手动读取了
+            $this->load();
+
+            $data = $this->get();
+        }
+
+        return $data;
+    }
+
+    /**
+     * 更新接口
+     *
+     * @return array
+     */
+    public function update_api()
+    {
+        $this->load();
+
+        Dever::out('yes');
+    }
+
+    /**
+     * 载入从项目中定义好的接口
+     *
+     * @return array
+     */
+    public function load()
+    {
+        $project = Dever::load('manage/project.get');
+
+        foreach ($project as $k => $v) {
+            $data = Base::config($v['path']);
+
+            if ($data) {
+                foreach ($data as $i => $j) {
+                    $j['order'] = isset($j['order']) ? $j['order'] : 1;
+
+                    $this->updateApi($i, $j['name'], $j['type'], $k, $j['request'], $j['response'], $j['order']);
+                }
+            }
+        }
+    }
+
+    private function updateApi($site, $name, $type, $project, $request, $response, $reorder, $state = true)
+    {
+        $info = Dever::db('manage/api')->site(array('where_site' => $site));
+        if (!$info) {
+            $update['add_site'] = $site;
+            $update['add_name'] = $name;
+            $update['add_type'] = $type;
+            $update['add_project'] = $project;
+            $update['add_reorder'] = $reorder;
+            $info['id'] = Dever::db('manage/api')->insert($update);
+        } elseif ($state) {
+            $update['set_site'] = $site;
+            $update['set_name'] = $name;
+            $update['set_type'] = $type;
+            $update['set_project'] = $project;
+            $update['set_reorder'] = $reorder;
+            $update['where_id'] = $info['id'];
+            Dever::db('manage/api')->update($update);
+        }
+
+        if ($info['id'] > 0) {
+            $this->updateApiData(array($response, $request), $info['id']);
+        }
+
+        return true;
+    }
+
+    private function updateApiData($data, $id)
+    {
+        $this->api_response = $this->api_request = array();
+        foreach($data as $k => $v) {
+            if ($v && is_array($v)) {
+                if ($k == 0) {
+                    $api = 'api_response';
+                } else {
+                    $api = 'api_request';
+                }
+                $this->insertApiData($api, $v, $id, -1, 0);
+            }
+        }
+    }
+
+    private function insertApiData($api, $data, $aid, $id = -1, $num = 0)
+    {
+        foreach($data as $k => $v) {
+            $value = $v;
+            if (is_array($value)) {
+                $value = 'array:' . $k;
+                if (isset($v[0][0])) {
+                    $v = $v[0][0];
+                }
+                if (isset($v[0])) {
+                    $v = $v[0];
+                }
+            }
+
+            if (isset($this->{$api}[$num][$k])) {
+                //continue;
+            }
+            $this->{$api}[$num][$k] = $value;
+
+            $insertId = $this->insertApiDataOne($api, $k, $value, $aid, $id);
+            if ($insertId > 0 && is_array($v)) {
+                
+                $this->insertApiData($api, $v, $aid, $insertId, $num+1);
+            }
+        }
+    }
+
+    private function insertApiDataOne($api, $name, $data, $aid, $id = -1)
+    {
+        if (is_array($data)) {
+            $type = $data[0];
+            $desc = $data[1];
+        } else {
+            $type = 'string';
+            if (is_numeric($name)) {
+                $type = 'int';
+            } elseif (strpos($name, 'id') !== false) {
+                $type = 'int';
+            }
+
+            $desc = $data;
+        }
+
+        if (strlen($desc) > 100) {
+            $desc = '{long}';
+        }
+        $update['add_api_id'] = $aid;
+        $update['add_name'] = $name;
+        $update['add_type'] = $type;
+        $update['add_desc'] = $desc;
+        $update['add_parent_id'] = $id;
+        $update['add_desc'] = $desc;
+        $one = array
+        (
+            'option_parent_id' => $id,
+            'option_api_id' => $aid,
+            'option_name' => $name,
+        );
+        $info = Dever::db('manage/' . $api)->one($one);
+        if (!$info) {
+            return Dever::db('manage/' . $api)->insert($update);
+        }
+        return $info['id'];
+    }
+
+    public function showTable($data, $url = '', $api = '')
+    {
+        $result = '<table border=1 width=100% height=100%>';
+        if ($data) {
+            $result .= Dever::tbody(array('字段', '类型', '描述'));
+            $num = count($data);
+            $table = array();
+            foreach ($data as $k => $v) {
+                if ($v['name'] == '{struct}') {
+                    $table[$k] = '';
+                    unset($data[$k]);
+                    $struct = Dever::db($k)->config['struct'];
+                    if ($v['desc']) {
+                        $temp = $v['desc'];
+                    } else {
+                        $temp = $struct;
+                    }
+
+                    if ($temp) {
+                        foreach ($temp as $i) {
+                            if (isset($struct[$i]) && isset($struct[$i]['type'])) {
+                                $type = explode('-', $struct[$i]['type']);
+                                $table[$k] .= Dever::tbody(array($i, $type[0], $struct[$i]['name']));
+                            }
+                        }
+
+                        if ($v['type']) {
+                            $data[$v['type']] = array('array/json', $result . $table[$k] . '</table>');
+                        } else {
+                            $result .= $table[$k];
+                        }
+                    }
+                }
+            }
+        } else {
+            $result .= '空';
+        }
+
+        $this->table($data, $result, $url, $api);
+
+        return $result;
+    }
+
+    private function table($data, &$table, $url = '', $api = '')
+    {
+        if ($data && is_array($data)) {
+            foreach ($data as $k => $v) {
+                if (is_array($v['desc'])) {
+                    $tbody = '<table border=1 width=100% height=100%>';
+                    $this->table($v['desc'], $tbody) . '</table>';
+                    $v['desc'] = $tbody;
+                }
+
+                $v['name'] = '<span class="edit" data-col="name" data-url="'.$url.'" data-id="'.$v['id'].'" data-type="'.$api.'" >' . $v['name'] . '</span>';
+
+                $v['type'] = '<span class="edit" data-col="type" data-url="'.$url.'" data-id="'.$v['id'].'" data-type="'.$api.'" >' . $v['type'] . '</span>';
+
+                $v['desc'] = '<span class="edit" data-col="desc" data-url="'.$url.'" data-id="'.$v['id'].'" data-type="'.$api.'" >' . $v['desc'] . '</span>';
+
+                $table .= Dever::tbody(array($v['name'], $v['type'], $v['desc']));
+            }
+        }
+
+        $table .= '</table>';
+    }
+
+    public function push($param = false)
+    {
+        $param = $param ? $param : json_decode(base64_decode(Dever::input('param')), true);
+        $api = explode('_api', $param['api']);
+        $api = $api[0];
+        $temp = explode('/', $api);
+        $project = $temp[0];
+        unset($temp[0]);
+        $site = implode('/', $temp);
+
+        $request = array();
+        foreach ($param['request'] as $k => $v) {
+            if (!strpos($k, '/') && !strpos($k, '?') && $k != 'json' && $k != 'callback') {
+                $request[$k] = $v;
+            }
+        }
+
+        $type = 1;
+        $this->updateApi($site, $api, $type, $project, $request, $param['response'], 1, false);
+    }
+
+    public function update_col_api()
+    {
+        $table = Dever::input('type');
+        $col = Dever::input('col');
+        $id = Dever::input('id');
+        $value = Dever::input('value');
+        $update['set_' . $col] = $value;
+        $update['where_id'] = $id;
+        Dever::db('manage/' . $table)->update($update);
+    }
+
+
+    public function getHtml($name, $site, $html, $id, $project)
+    {
+        $one = array
+        (
+            'option_api_id' => $id,
+        );
+        $request = Dever::db('manage/api_request')->all($one);
+        $response = Dever::db('manage/api_response')->all($one);
+
+        $request = $this->showTable($request);
+        $response = $this->showTable($response);
+        return '接口名称:'.$name.'<br />接口地址:<br  />'.Dever::url($site, $project).'<br />'.$html.'请求参数:<br />'.$request.'<br />输出参数:<br />'.$response;
+    }
+}

+ 830 - 0
src/Auth.php

@@ -0,0 +1,830 @@
+<?php
+namespace Manage\Src;
+
+use Dever;
+use Dever\Routing\Uri;
+use Dever\Session\Oper;
+use Dever\String\Encrypt;
+
+class Auth
+{
+    /**
+     * 后台的session名
+     *
+     * @var string
+     */
+    private $name;
+
+    /**
+     * save
+     *
+     * @var Dever\Plad\Save
+     */
+    private $save;
+
+    private $top;
+
+    /**
+     * __construct
+     *
+     * @return mixed
+     */
+    public function __construct()
+    {
+        $this->save = new Oper(false, 'session');
+        $this->name = 'manage';
+    }
+
+    public function test()
+    {
+        return array('name' => 'test', 'check' => false, 'data' => array
+        (
+            0 => array('name' => 'haha1'),
+            1 => array('name' => 'haha2'),
+        ));
+    }
+
+    /**
+     * 只获取中间的内容部分
+     *
+     * @return mixed
+     */
+    public function loading()
+    {
+        $set = Dever::input('loading');
+        if ($set) {
+            Dever::config('base')->url = 'loading=' . $set;
+        }
+
+        return $set;
+    }
+
+    /**
+     * 获取角色
+     *
+     * @return mixed
+     */
+    public function role_api()
+    {
+        $data = Dever::db('manage/role')->alls(array
+            (
+                /* list和all可以自定义参数
+                'option' => array
+                (
+                'name' => array('yes', 'like')
+                ),
+                 */
+                //'option_name' => '%' . Dever::input('term', 'test') . '%')
+                'option_name' => Dever::input('term', 'test'))
+        );
+
+        //Dever::debug($data);
+        if ($data) {
+            return $data;
+        }
+        return array
+            (
+            0 => array('id' => -1, 'value' => '没有找到您搜索的数据', 'label' => '没有找到您搜索的数据'),
+        );
+    }
+
+    public function blur()
+    {
+        $value = Dever::input('value');
+
+        return 1;
+    }
+
+    /**
+     * 获取当前登录的管理员信息
+     *
+     * @return mixed
+     */
+    public function info($state = true)
+    {
+        return $this->real($this->data(), $state);
+    }
+
+    /**
+     * 获取当前登录的管理员信息
+     *
+     * @return mixed
+     */
+    public function authData($state = true)
+    {
+        $data = $this->info($state);
+
+        if (isset($data['role_info']['auth_data'])) {
+            return $data['role_info']['auth_data'];
+        }
+
+        return '';
+    }
+
+    /**
+     * 实时读取信息
+     *
+     * @return mixed
+     */
+    public function real($info, $state = true)
+    {
+        if ($state == true && Dever::config('base')->getAdmin && $info && isset($info['id'])) {
+            $admin = Dever::db('manage/admin')->one($info['id']);
+            if ($admin['top']) {
+                $info['top'] = $admin['top'];
+            }
+        }
+
+        if (!$info) {
+            $info = $this->auth();
+            if ($info) {
+                $this->save($info);
+                Dever::location(Dever::url(''));
+            }
+        }
+
+        if (isset($info['role']) && $info['role']) {
+            $info['role_info'] = Dever::db('manage/role')->one($info['role']);
+            $info['rolename'] = '未分组';
+            if ($info['role_info']['name']) {
+                $info['rolename'] = $info['role_info']['name'];
+            }
+
+            $info['self'] = $info['role_info']['self'];
+            $info['col_update'] = $info['role_info']['col_update'];
+            $info['col_insert'] = $info['role_info']['col_insert'];
+            $info['col_select'] = $info['role_info']['col_select'];
+        }
+
+        if (isset($info['group']) && $info['group']) {
+            $info['group_info'] = Dever::db('manage/group')->one($info['group']);
+        }
+
+        return $info;
+    }
+
+    /**
+     * 获取当前登录的管理员信息
+     *
+     * @return mixed
+     */
+    public function data($state = true)
+    {
+        return $this->save->get($this->name);
+    }
+
+    private function auth()
+    {
+        # 此处可以接入当前的用户系统
+        /*
+        $user = \CondeAdminUser::GetAdminInfo('manage', '后台管理');
+
+        $info = Dever::load('manage/admin-user', array('where_username' => $user['name']));
+        //$info = Dever::load('manage/admin-user', array('where_email' => $user['email']));
+        if(!$info)
+        {
+        $id = Dever::load('manage/admin-insert', array('add_role' => 1, 'add_username' => $user['name'], 'add_email' => $user['email']));
+        $info = Dever::load('manage/admin-one', $id);
+        }
+
+        return $info;
+         */
+        return false;
+    }
+
+    /**
+     * 获取公告
+     *
+     * @return mixed
+     */
+    public function notice()
+    {
+        $admin = $this->info();
+        if ($admin && $admin['config'] && isset($admin['config']['id']) && $admin['config']['id'] > 0) {
+            $data = Dever::db('manage/notice')->getAll(array('where_config' => $admin['config']['id']));
+
+            return $data;
+        }
+
+        return array();
+    }
+
+    /**
+     * 获取当前登录的管理员信息
+     *
+     * @return mixed
+     */
+    public function manage()
+    {
+        $admin = $this->info();
+        if ($admin && $admin['id'] == 1) {
+            return '';
+        }
+        return 'display:none;';
+    }
+
+    /**
+     * 退出登录
+     *
+     * @return mixed
+     */
+    public function quit_api()
+    {
+        if ($this->info()) {
+            $this->save->un($this->name);
+        }
+
+        Dever::location('login');
+    }
+
+    /**
+     * login
+     *
+     * @return mixed
+     */
+    public function login_api()
+    {
+        //$param['where_username'] = Dever::input('username');
+        $username = Dever::input('username');
+        if (strstr($username, '@')) {
+            $param['where_email'] = $username;
+            $method = 'email';
+        } else {
+            $param['where_mobile'] = $username;
+            $method = 'mobile';
+        }
+
+        $password = hash('sha256', Dever::input('password'));
+
+        $user = Dever::db('manage/admin')->$method($param);
+
+        if (!$user) {
+            $total = Dever::db('manage/admin')->total();
+            if ($total <= 0) {
+                $insert['username'] = $username;
+                $insert[$method] = $username;
+                $insert['password'] = Dever::input('password');
+                $insert['status'] = $insert['state'] = 1;
+                $insert['role'] = 1;
+                Dever::db('manage/admin')->insert($insert);
+
+                $param['time'] = 1;
+                $user = Dever::db('manage/admin')->$method($param);
+            } else {
+                Dever::alert('登录失败');
+            }
+        }
+
+        if ($user && $user['password'] == $password) {
+            $this->save($user);
+
+            $refer = Dever::input('refer');
+
+            if ($refer) {
+                $refer = Encrypt::decode($refer);
+                Dever::out($refer);
+            } else {
+                Dever::out(Dever::url('home'));
+            }
+        } else {
+            Dever::alert('登录失败');
+        }
+    }
+
+    public function update($id)
+    {
+        $id = Dever::input('update_where_id');
+
+        $admin = $this->info();
+        if ($id > 0 && $id == $admin['id']) {
+            $user = Dever::db('manage/admin')->one($id);
+            $this->save($user);
+        }
+    }
+
+    public function save(&$user)
+    {
+        if ($user['config']) {
+            $user['config'] = Dever::db('manage/config')->one($user['config']);
+        }
+        if ($user['id'] == 1) {
+            $user['oper'] = 'all';
+            $user['auth'] = 'all';
+            $user['auth_data'] = 'all';
+            $user['top'] = 'all';
+        } else {
+            $role = Dever::db('manage/role')->get(array('where_id' => $user['role']));
+
+            if ($role) {
+                $user['oper'] = array();
+                $user['auth'] = array();
+                $user['auth_data'] = array();
+                $user['self'] = 2;
+                $top = array();
+                foreach ($role as $k => $v) {
+                    if ($v['oper']) {
+                        if (strpos($v['oper'], ',') !== false) {
+                            $user['oper'] += explode(',', $v['oper']);
+                        } else {
+                            $user['oper'][] = $v['oper'];
+                        }
+                    }
+                    if ($v['auth']) {
+                        $user['auth'][] = $v['auth'];
+                    }
+                    if ($v['auth_data']) {
+                        $user['auth_data'][] = $v['auth_data'];
+                    }
+                    if (!$user['top'] && $v['top']) {
+                        $top[] = $v['top'];
+                    }
+                    if ($v['self'] == 1) {
+                        $user['self'] = $v['self'];
+                    }
+                }
+
+                $user['oper'] = implode(',', $user['oper']);
+                $user['auth'] = implode(',', $user['auth']);
+                $user['auth_data'] = implode(',', $user['auth_data']);
+
+                if (!$user['top'] && $top) {
+                    $user['top'] = implode(',', $top);
+                }
+
+                if (strpos($user['oper'], 'all') !== false) {
+                    $user['oper'] = 'all';
+                }
+
+                if (strpos($user['auth'], 'all') !== false) {
+                    $user['auth'] = 'all';
+                }
+
+                if (strpos($user['auth_data'], 'all') !== false) {
+                    $user['auth_data'] = 'all';
+                }
+
+                if (strpos($user['top'], 'all') !== false) {
+                    $user['top'] = 'all';
+                } elseif ($user['top']) {
+                    # 这块暂时不用
+                    //$top = explode(',', $user['top']);
+                    //Dever::load('manage/top.update_action', $top[0]);
+                }
+            }
+        }
+
+        $this->save->add($this->name, $user, 3600 * 24 * 7);
+    }
+
+    /**
+     * set
+     *
+     * @return mixed
+     */
+    public function set()
+    {
+        $param['refer'] = Dever::input('refer');
+
+        return $param;
+    }
+
+    /**
+     * location_login
+     *
+     * @return mixed
+     */
+    public function location_login()
+    {
+        $refer = Encrypt::encode(Dever::url());
+        return Dever::location('login?refer=' . $refer);
+    }
+
+    /**
+     * init
+     *
+     * @return mixed
+     */
+    public function init()
+    {
+        if (isset($this->load)) {
+            return;
+        }
+
+        $this->load = true;
+        $admin = $this->info();
+        if (!$admin) {
+            return $this->location_login();
+        }
+
+        if ($admin['id'] == 1) {
+            return;
+        }
+
+        $menu = Dever::input('menu');
+        $project = Dever::input('key');
+        $table = Dever::input('table');
+        $menu_id = Dever::input('menu_id');
+
+        if ($menu_id && $menu_id > 0) {
+            $menu = Dever::db('manage/menu')->info($menu_id);
+
+            if (!$menu) {
+                Dever::alert('没有该权限');
+            }
+
+            if ($menu['key']) {
+                if (isset($admin['auth']) && $admin['auth']) {
+                    if ($admin['auth'] == 'all' || $admin['auth'] == '') {
+                        return;
+                    }
+
+                    $admin['auth'] = explode(',', $admin['auth']);
+
+                    if (!in_array($menu['key'], $admin['auth'])) {
+                        Dever::alert('您没有操作权限');
+                    }
+                } else {
+                    Dever::alert('您没有操作权限');
+                }
+            } else {
+                Dever::alert('您没有操作权限');
+            }
+        } else {
+            //Dever::alert('您没有操作权限');
+        }
+    }
+
+    # 得到当前管理员的权限
+    public function admin()
+    {
+        $admin = $this->info();
+        return $admin['auth'] == 'all' ? '' : explode(',', $admin['auth']);
+    }
+
+    # 得到当前头部菜单的权限
+    public function top()
+    {
+        $admin = $this->info();
+        return $admin['top'] == 'all' ? '' : $admin['top'];
+        return $admin['top'] == 'all' ? '' : explode(',', $admin['top']);
+    }
+
+    # 设置头部菜单的权限
+    public function _setTop($info)
+    {
+        if ($info) {
+            $info['key'] = explode('_', $info['key']);
+            $count = count($info['key']);
+            if ($count > 2) {
+                foreach ($info['key'] as $k => $v) {
+                    if ($k+1 < $count) {
+                        $key[] = $v;
+                    }
+                }
+                $key = implode('_', $key);
+            } else {
+                $key = $info['key'][0];
+            }
+
+            $data = $this->data();
+
+            $key = str_replace('/', '-', $key);
+            $this->top = $info;
+            $this->save->add($this->name . '_topgetv1_' . $key . '_a' . $data['id'], $info, 3600 * 24 * 365);
+        }
+    }
+
+    # 得到当前头部菜单
+    public function getTop($key)
+    {
+        $state = false;
+        if (is_array($key)) {
+            $key = $key[0];
+            $state = true;
+        }
+
+        $data = $this->data();
+
+        $key = str_replace('/', '-', $key);
+        $data = $this->save->get($this->name . '_topgetv1_' . $key . '_a' . $data['id']);
+
+        $top = Dever::input('top');
+        if ($top) {
+            $data = Dever::db('manage/top')->one($top);
+        }
+        //print_r($data);die;
+        # 当数据不存在时,先从数据库里取出一个最新的
+        if (!$data && $state == true) {
+            $info = Dever::db('manage/top')->key(array('where_key' => $key));
+            if ($info) {
+                $data = Dever::db('manage/top')->getOne(array('where_top_id' => $info['id']));
+            }
+        } elseif (!$data && $this->top) {
+            $data = $this->top;
+        }
+
+        return $data;
+    }
+
+    public function config()
+    {
+        $admin = $this->info();
+
+        if (!$admin && $id = Dever::input('auth')) {
+            $admin['config']['id'] = $id;
+        }
+        if ($admin['config'] && $admin['config']['id'] > 0) {
+            $admin['config'] = Dever::db('manage/config')->info(array('where_id' => $admin['config']['id']));
+        }
+        $state = isset($admin['config']) && $admin['config'];
+        $admin['config']['title'] = ($state && $admin['config']['title']) ? $admin['config']['title'] : Dever::config('base')->name . '';
+        $admin['config']['info'] = ($state && $admin['config']['info']) ? $admin['config']['info'] : Dever::config('base')->name . ' 欢迎您';
+        $admin['config']['content'] = ($state && $admin['config']['content']) ? $admin['config']['content'] : '欢迎您使用本系统';
+        $admin['config']['template'] = ($state && $admin['config']['template']) ? $admin['config']['template'] : 1;
+
+        $admin['config']['front_url'] = Dever::config('base')->host;
+        $admin['config']['front_name'] = '访问' . Dever::config('base')->name;
+        $admin['config']['front_display'] = $admin['config']['front_url'] ? 'display:' : 'display:none';
+
+        return $admin['config'];
+    }
+
+    /**
+     * oper的判断
+     *
+     * @param uri string
+     * @return mixed
+     */
+    public function oper($type = 1)
+    {
+        $oper = '';
+        $admin = $this->info();
+        //$role['oper'] = '1,2,3,4,5';
+        if ($admin && isset($admin['oper']) && $admin['oper'] != 'all') {
+            if (strpos(',' . $admin['oper'], ',' . $type) !== false) {
+                return true;
+            } else {
+                return false;
+            }
+        } else {
+            return true;
+        }
+    }
+
+    /**
+     * 获取当前uri的类型
+     *
+     * @param uri string
+     * @return mixed
+     */
+    private function table($table, $project)
+    {
+        if ($table == 'other') {
+            $table = '';
+        } else {
+            $path = Dever::load('manage/src/project.path', $project);
+            $config = Dever::database(DEVER_PATH . $path . 'database/' . $table . '.php');
+            $table = $config['lang'];
+        }
+
+        return $table;
+    }
+
+    /**
+     * check
+     *
+     * @return mixed
+     */
+    public function check($id)
+    {
+        $id = Dever::input('update_where_id');
+
+        # 先验证email是否已经存在
+        $email = Dever::input('update_email');
+
+        $info = Dever::db('manage/admin')->one(array('option_email' => $email));
+
+        if ($id > 0 && $info && $info['id'] != $id) {
+            Dever::alert('该邮箱已经存在');
+        } elseif ($id < 0 && $info) {
+            Dever::alert('该邮箱已经存在');
+        }
+    }
+
+    /**
+     * 获取当前uri的类型
+     *
+     * @param uri string
+     * @return mixed
+     */
+    public function type($uri)
+    {
+        if (strpos($uri, '.') !== false) {
+            $type = 3;
+        } elseif (strpos($uri, '-') !== false) {
+            $type = 2;
+        } else {
+            $type = 1;
+        }
+        return $type;
+    }
+
+    /**
+     * 获取所有权限列表,并进行统计处理
+     *
+     * @return mixed
+     */
+    public function get($state = true)
+    {
+        $result = Dever::load('manage/src/menu.left', $state);
+        $result['state'] = 1;
+
+        return $result;
+    }
+
+    /**
+     * 获取所有数据权限列表,并进行统计处理
+     *
+     * @return mixed
+     */
+    public function getByData()
+    {
+        $key = Dever::config('base')->manageAuthData;
+        $result = array();
+        if ($key) {
+            $result = Dever::load($key);
+            $result['state'] = 1;
+        }
+
+        return $result;
+    }
+
+    /**
+     * 修改当前管理员的密码
+     *
+     * @return mixed
+     */
+    public function password()
+    {
+        $admin = $this->info();
+
+        $new = Dever::input('new');
+        $old = Dever::input('old');
+
+        if ($admin && $admin['id'] > 0 && $new && $old && $new != $old && hash('sha256', ($old)) == $admin['password']) {
+            $param['set_password'] = $new;
+
+            $param['where_id'] = $admin['id'];
+            Dever::db('manage/admin')->password($param);
+
+            $admin['password'] = hash('sha256', ($new));
+            $this->save->add($this->name, $admin);
+            return '修改成功';
+        } else {
+            return '修改失败';
+        }
+    }
+
+    /**
+     * 更新数据到数据库
+     *
+     * @return array
+     */
+    public function update_action($param = array())
+    {
+        if (isset($param['key'])) {
+            $info = Dever::db('manage/auth')->key(array('where_key' => $param['key']));
+            //print_r($info);die;
+            if (!$info) {
+                $update['add_project'] = $param['project'];
+                $update['add_project_name'] = $param['project_name'];
+
+                $update['add_key'] = $param['key'];
+                $update['add_name'] = $param['name'];
+                $update['add_auth_id'] = isset($param['auth']) ? $param['auth'] : -1;
+                $update['add_value'] = $param['value'];
+                $update['add_state'] = isset($param['state']) ? $param['state'] : 1;
+
+                $info['id'] = Dever::db('manage/auth')->insert($update);
+            } else {
+                $update['set_project'] = $param['project'];
+                $update['set_project_name'] = $param['project_name'];
+                $update['set_name'] = $param['name'];
+                $update['set_value'] = $param['value'];
+                $update['set_state'] = isset($param['state']) ? $param['state'] : 1;
+                $update['where_id'] = $info['id'];
+                Dever::db('manage/auth')->update($update);
+            }
+
+            return $info['id'];
+        }
+
+        return false;
+    }
+
+    /**
+     * 同步子权限更新到数据库
+     *
+     * @return array
+     */
+    public function sync($param = array())
+    {
+        if (isset($param[0]) && isset($param[1])) {
+            $key = $param[1]['key'];
+
+            $info = Dever::db('manage/auth')->key(array('where_key' => $key));
+
+            if ($info) {
+                $update['value'] = Dever::input('where_id', $param[0]);
+
+                $update['name'] = Dever::input('name', '-u');
+
+                $update['top'] = $info['id'];
+
+                $update['key'] = $key . '_' . $update['value'];
+
+                $update['state'] = Dever::input('state', '-u');
+
+                $this->update_action($update);
+            }
+        }
+    }
+
+    /**
+     * 获取所有的项目精细权限
+     *
+     * @return array
+     */
+    public function all()
+    {
+        $data = Dever::db('manage/auth')->main;
+
+        if ($data) {
+            $child = Dever::db('manage/auth')->child;
+
+            foreach ($data as $t => $d) {
+                foreach ($d as $k => $v) {
+                    if (isset($child[$v['id']])) {
+                        $c = 0;
+                        foreach ($child[$v['id']] as $i => $j) {
+                            $data[$t][$k]['child'][$i] = $j;
+                            $c++;
+                        }
+
+                        if (!isset($data[$t][$k]['child'])) {
+                            unset($data[$t][$k]);
+                        }
+                    }
+                }
+                $data[$t]['state'] = 1;
+            }
+
+        }
+
+        return $data;
+    }
+
+    /**
+     * opt push
+     *
+     * @return mixed
+     */
+    public function opt($param = false)
+    {
+        $opt = new Opt;
+        $opt->push($param);
+    }
+
+    /**
+     * opt push
+     *
+     * @return mixed
+     */
+    public function opt_api($param = false)
+    {
+        $opt = new Opt;
+        $opt->push($param);
+    }
+
+    /**
+     * opt push
+     *
+     * @return mixed
+     */
+    public function api($param = false)
+    {
+        $api = new Api;
+        $api->push($param);
+    }
+
+    /**
+     * opt push
+     *
+     * @return mixed
+     */
+    public function api_api($param = false)
+    {
+        $api = new Api;
+        $api->push($param);
+    }
+}

+ 201 - 0
src/Config.php

@@ -0,0 +1,201 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| config.php 后台管理 基本配置管理
+|--------------------------------------------------------------------------
+*/
+namespace DeverApp\Manage;
+
+use Dever;
+use Dever\Security\Internal;
+
+class Config
+{
+	/**
+     * project
+     *
+     * @var string
+     */
+	private $project;
+
+	/**
+     * dir
+     *
+     * @var string
+     */
+	protected $type;
+	
+	/**
+     * config
+     *
+     * @var array
+     */
+	protected $config;
+
+	/**
+     * __construct
+     * 
+     * @return mixed
+     */
+	public function __construct()
+	{
+		$this->project 	= Dever::input('key');
+		$this->type 	= Dever::input('type', 'config');
+		
+		$config = Dever::load('manage/project.get');
+		if(isset($config[$this->project]))
+		{
+			$this->config 		= $config[$this->project];
+		}
+		
+		$type = array('config', 'view', 'database', 'api');
+
+		if(!in_array($this->type, $type))
+		{
+			Dever::out('error');
+		}
+	}
+	
+	/**
+     * get
+     * 
+     * @return mixed
+     */
+	public function get()
+	{
+		$dir 	= Dever::input('dir');
+		$name 	= Dever::input('name');
+		
+		if($dir && $name)
+		{
+			$dir = $dir . '/' . $name;
+		}
+		else
+		{
+			$dir = $this->type;
+		}
+
+		Dever::setInput('dir', $dir);
+		
+		$result = $this->read($dir);
+		
+		return $result;
+	}
+	
+	/**
+     * read
+     * @param string $dir
+     * 
+     * @return mixed
+     */
+	private function read($dir)
+	{
+		$file	= $this->dir($dir);
+
+		if(is_dir($file))
+		{
+			$result = scandir($file);
+			foreach($result as $k => $v)
+			{
+				if($v == '.' || $v == '..')
+				{
+					unset($result[$k]);
+				}
+			}
+			
+			return $result;
+		}
+		elseif(is_file($file))
+		{
+			Dever::$global['temp']['delete'] = '';
+			$data_dir = $this->dir($dir, 'data/');
+			if(is_file($data_dir))
+			{
+				$file = $data_dir;
+				$name = str_replace(DEVER_PATH, '', $file);
+				$md5 = Internal::encode($name);
+
+				$delete = Dever::url('config.del?file=' . $name . '&md5=' . $md5);
+				Dever::$global['temp']['delete'] = '<br /><a href="'.$delete.'" class="oper_6">点此删除</a>';
+			}
+			else
+			{
+				$name = str_replace(DEVER_PATH, '', $file);
+				$md5 = Internal::encode($name);
+			}
+
+			$result[] = array('content' => file_get_contents($file), 'file' => $name, 'md5' => $md5, 'key' => $this->project);
+			
+			return $result;
+		}
+		else
+		{
+			Dever::out('error');
+		}
+	}
+	
+	/**
+     * dir
+     * @param string $dir
+     * 
+     * @return mixed
+     */
+	private function dir($dir, $path = '')
+	{
+		if(!$this->config['path'])
+		{
+			
+		}
+		if($path)
+		{
+			return Dever::path(DEVER_PATH . $path, $this->config['path'] . $dir);
+		}
+		return DEVER_PATH . $this->config['path'] . $dir;
+	}
+
+	/**
+     * set 将内容写入到配置文件中(备份)
+     * 
+     * @return string
+     */
+	public function set()
+	{
+		$file 	= Dever::input('file');
+		$value	= Dever::input('value');
+		$name 	= Dever::input('name');
+		$md5	= Internal::decode(Dever::input('md5'));
+
+		if($file == $md5)
+		{
+			$file = DEVER_PATH . $file;
+			if(is_file($file))
+			{
+				file_put_contents($this->dir($name, 'data/'), $value);
+			}
+		}
+
+		highlight_string($value);die;
+	}
+
+	/**
+     * del 删除后台建立的内容
+     * 
+     * @return mixed
+     */
+	public function del()
+	{
+		$file 	= Dever::input('file');
+		$md5	= Internal::decode(Dever::input('md5'));
+
+		if(strpos($file, 'data/') !== false && $file == $md5)
+		{
+			$file = DEVER_PATH . $file;
+			if(is_file($file))
+			{
+				@unlink($file);
+			}
+		}
+
+		Dever::out('yes');
+	}
+}

+ 3529 - 0
src/Database.php

@@ -0,0 +1,3529 @@
+<?php
+# 此类很大,以后优化,放到Database目录中,拆分为工厂模式
+# 必须要优化了...当时为了快速实现直接扔这一个里面了,近期优化
+namespace Manage\Src;
+
+use Dever;
+use Manage\Src\Lib\Input as Html;
+use Manage\Src\Lib\Log;
+
+class Database
+{
+    /**
+     * project
+     *
+     * @var string
+     */
+    private $project;
+
+    /**
+     * table
+     *
+     * @var string
+     */
+    private $table;
+
+    /**
+     * menu
+     *
+     * @var string
+     */
+    private $menu;
+
+    /**
+     * menu_id
+     *
+     * @var string
+     */
+    private $menu_id;
+
+    /**
+     * id
+     *
+     * @var string
+     */
+    private $id;
+
+    /**
+     * config
+     *
+     * @var array
+     */
+    private $config;
+
+    /**
+     * search
+     *
+     * @var bool
+     */
+    private $search = false;
+
+    /**
+     * __construct
+     *
+     * @return mixed
+     */
+    public function __construct()
+    {
+        $this->project = Dever::input('project');
+        $this->table = Dever::input('table');
+        $this->menu = Dever::input('menu');
+        $this->menu_id = Dever::input('menu_id');
+        $this->id = Dever::input('update_where_id', Dever::input('where_id'));
+        $this->name = $this->project . '/' . $this->table;
+
+        $this->top = Dever::input('top');
+        if ($this->top) {
+            Dever::load('manage/top.update_action', $this->top);
+        }
+    }
+
+    /**
+     * 提供给异步获取数据的接口
+     *
+     * @return array
+     */
+    public function getAjax($data)
+    {
+        $key = Dever::input('key');
+        $value = Dever::input('value');
+        $source = Dever::input('source');
+        
+        $config = Dever::db($source)->config['struct'][$key];
+        $config['value'] = $value;
+        $config['option'] = $data;
+        return $this->create_update_html($key, $config);
+    }
+
+    /**
+     * url
+     *
+     * @return array
+     */
+    public function url($key = false, $id = 0, $table = false, $suffix = '')
+    {
+        $table = $table ? $table : $this->table;
+
+
+        if (strpos($table, 'http://') !== false || strpos($table, 'javascript') !== false) {
+            return $table;
+        }
+
+        $config = array
+        (
+            'project'           => 'project/database?project=' . $this->project,
+            'list'              => 'project/database/list?{param}',
+            'search'              => 'project/database/list?{param}',
+            'add'               => 'project/database/update?{param}',
+            'update'            => 'project/database/update?{param}&where_id=' . $id,
+            # 增加快捷更新
+            'edit'            => 'project/database/update?{param}&where_id=' . $id,
+            'updateAction'      => 'database.update_action',
+            'url'               => '',
+            'delete'      => 'database.delete_action?{param}&where_id=' . $id,
+            'recovery'    => 'database.recovery_action?{param}&where_id=' . $id,
+            'stat'              => 'project/database/stat?{param}',
+            'excel'             => 'database.list_excel?{param}',
+            'stat_excel'        => 'database.stat_excel?{param}',
+            'diy'               => 'list?{param}',
+        );
+        $state = $this->getState();
+        if ($key == 'delete' && $state == 2) {
+            $key = 'recovery';
+        }
+
+        if (strpos($key, 'list') !== false) {
+            $config[$key] = $config['list'];
+        } elseif (strpos($key, 'add') !== false) {
+            $config[$key] = $config['add'];
+        } elseif (strpos($key, 'edit') !== false) {
+            $config[$key] = $config['edit'];
+        }
+
+        if (isset($config[$key])) {
+            if (strpos($config[$key], '{param}')) {
+                $param = $this->getUrlParam($key, $table, $suffix, $state);
+                $config[$key] = str_replace('{param}', $param, $config[$key]);
+            }
+            return Dever::url($config[$key]);
+        }
+        return $config;
+    }
+
+    /**
+     * 获取url需要的参数
+     *
+     * @return string
+     */
+    private function getUrlParam($key, $table, $suffix, $state)
+    {
+        $param = '';
+        $array = array('project', 'search', 'add', 'list', 'update', 'edit');
+        if (in_array($key, $array) && !strstr($table, 'oper_')) {
+            $where = Dever::preInput('search_');
+            if ($where) {
+                if (isset($where['where_id'])) {
+                    //unset($where['where_id']);
+                }
+                unset($where['search_option_state']);
+                $param .= '&' . http_build_query($where);
+            }
+
+            $oper = Dever::preInput('oper_');
+            if ($oper) {
+                $param .= '&' . http_build_query($oper);
+            }
+        }
+
+        if ($key == 'search' && $search_limit = Dever::input('search_limit')) {
+            $param .= '&search_limit=' . $search_limit;
+        }
+        
+        if (strpos($suffix, 'search_option_state') !== false) {
+            $state = '';
+        } else {
+            $state = '&search_option_state=' . $state;
+        }
+        $page_type = Dever::input('page_type');
+        if ($page_type) {
+            $param .= '&page_type=' . $page_type . '';
+        }
+        $param = 'project=' . $this->project . $param . '&table=' . $table . '&menu=' . $this->menu . '&menu_id=' . $this->menu_id . $state . $suffix;
+
+        return $param;
+    }
+
+    /**
+     * 获得refer
+     *
+     * @return string
+     */
+    private function refer($type = 'project')
+    {
+        return '';
+
+        switch ($type) {
+            case 'project':
+                $name = '数据库操作';
+                break;
+            case 'list':
+                $name = '数据列表';
+                break;
+            case 'url':
+                $name = '项目列表';
+                break;
+        }
+
+        $name = '返回上一级';
+
+        $url = $this->url($type);
+
+        $refer = '-[<a href="' . $url . '">' . $name . '</a>]';
+
+        return $refer;
+    }
+
+    /**
+     * getAdminInfo
+     *
+     * @return array
+     */
+    private function getAdminInfo($data)
+    {
+        $admin = Dever::load('manage/auth.info');
+        $data['my_admin_id'] = $admin['id'];
+        $data['my_role_id'] = $admin['role'];
+        return $data;
+    }
+
+    /**
+     * cookie 处理cookie
+     *
+     * @return array
+     */
+    public function cookie()
+    {
+        $cookie = $_COOKIE;
+        $array = array();
+        # 判断手机版
+        $mobile = Dever::mobile();
+        if ((isset($cookie['left_menu']) && $cookie['left_menu'] == 'close') || $mobile) {
+            $array['wrapper'] = 'enlarged forced';
+        } else {
+            $array['wrapper'] = 'forced';
+        }
+        return $array;
+    }
+
+    /**
+     * listStyle
+     *
+     * @return array
+     */
+    public function listStyle()
+    {
+        $mobile = Dever::mobile();
+        if ($mobile) {
+            $style = '.container_list .panel-heading .form-control,#mul .form-control,#page .form-control
+                {
+                    width:70%;
+                }
+                .row 
+                {
+                    margin-right: -15px; 
+                    margin-left: -15px;
+                }
+                #dever_modal_body img
+                {
+                    max-width:300px;
+                }
+            ';
+        } else {
+            $style = '#dever_modal_body img
+                {
+                    max-width:300px;
+                }';
+        }
+        return $style;
+    }
+
+    /**
+     * info 处理一些基本的信息,供模板使用
+     *
+     * @return array
+     */
+    public function info()
+    {
+        $config = $this->config();
+
+        $menu = isset($config['lang']) ? $config['lang'] : $this->project . '-' . $this->table;
+
+        if (isset($config['state']) && $config['state'] == 2) {
+            $menu .= '[回收站]';
+        }
+
+        $top = Dever::load('manage/top.get');
+        //print_r($top);die;
+
+        $display = '';
+
+        # 新增权限
+        $insert_state = Dever::load('manage/auth.oper', 4);
+
+        if ((isset($config['manage']['insert']) && $config['manage']['insert'] == false) || !isset($config['manage']['insert']) || $insert_state == false) {
+            $display = 'display:none';
+        }
+
+        $info = array
+        (
+            'action' => $this->url('updateAction'),
+            'list' => $this->url('list'),
+            'search' => $this->url('search'),
+            'mul' => $this->url('list'),
+            //'add'                 => 'location.href=\'' . $this->url('add') . '\'',
+            'add' => $this->url('add'),
+            'add_state' => $display,
+
+            'state' => $this->getState(),
+            'l' => 'project/database/list',
+            'project' => $this->project,
+            'table' => $this->table,
+            'menu' => $this->menu,
+            'menu_id' => $this->menu_id,
+            'id' => $this->id,
+            'main' => '数据管理' . $this->refer('url'),
+
+            'list_header' => $menu,
+            'list_desc' => '数据列表',
+            'project_name' => Dever::load('manage/project.name', $this->project),
+            'update_header' => $menu,
+            'update_desc' => '更新数据',
+
+            'updateMul' => (!$this->id && isset($config['manage']['updateMul']) && $config['manage']['updateMul']) ? '增加一条' : false,
+            'updateDesc' => isset($config['manage']['desc']) ? $config['manage']['desc'] : '',
+            'listDesc' => isset($config['desc']) ? $config['desc'] : '',
+            'struct' => isset($config['manage']['struct']) ? $config['manage']['struct'] : '',
+            'stat_desc' => '主动统计',
+            'search_param' => '',
+        );
+
+        $info['parent'] = Dever::input('oper_parent');
+        if ($info['parent']) {
+            $oper = Dever::preInput('oper_');
+            if ($oper) {
+                $info['parent'] .= '&' . str_replace('oper_', '', http_build_query($oper));
+                //$info['parent'] .= '&' . http_build_query($oper);
+            }
+            if ($top = Dever::input('top_parent')) {
+                $info['parent'] .= '&oper_parent=' . $top;
+            }
+            //$info['parent'] = 'location.href=\'' . $this->url(Dever::input('oper_index', 11), 0, $info['parent']) . '\'';
+            $info['parent'] = $this->url(Dever::input('oper_index', 'listData'), 0, $info['parent']);
+            $info['parent_state'] = '';
+        } else {
+            $info['parent_state'] = 'display:none';
+        }
+
+        $info['save'] = Dever::input('oper_save_jump');
+        if ($info['save']) {
+            $info['list'] = $this->url(Dever::input('oper_index', 'listData'), 0, $info['save']);
+        }
+
+        $search = Dever::preInput('search_');
+        if ($search) {
+            $info['mul'] .= '&' . http_build_query($search);
+
+            if (layadmin()) {
+                foreach ($search as $k => $v) {
+                    if (!strstr($k, 'search_option_')) {
+                        if (is_array($v)) {
+                            $v = implode(',', $v);
+                        }
+                        $info['search_param'] .= '<input type="hidden" name="'.$k.'"  value="'.$v.'"/>';
+                    }
+                }
+            }
+        }
+
+        if ($this->id) {
+            $info['update_header'] = $menu . '-更新数据' . $this->refer('list');
+        }
+
+        return $info;
+    }
+
+    /**
+     * 获取表名
+     *
+     * @return array
+     */
+    public function getTableName($project, $table)
+    {
+        if ($project == 'other') {
+            return '无数据表';
+        }
+
+        $path = Dever::load('manage/project.path', $project);
+
+        $config = $this->config($project, $path, $table);
+
+        $data = isset($config['lang']) ? $config['lang'] : $project;
+        return $data;
+    }
+
+    private function getState()
+    {
+        return Dever::input('search_option_state', 1);
+    }
+
+    /**
+     * config
+     *
+     * @return array
+     */
+    public function config($project = false, $path = false, $table = false)
+    {
+        if (!$project) {
+            $project = $this->project;
+            $table = $this->table;
+        }
+        if (!$project) {
+            return array();
+        }
+        Dever::$global['manage']['project'] = $project;
+
+        $config = Dever::load('manage/project.config', $project);
+        if (!is_array($config)) {
+            Dever::alert($project . ' error');
+        }
+        $project = $config['name'];
+
+        if (!$path) {
+            if (isset($config['base']) && isset($config['rel'])) {
+                $path = DEVER_INCLUDE_PATH . $config['rel'];
+            } else {
+                $path = $config['path'];
+            }
+        }
+
+        if ($project && $path && empty($this->config[$path])) {
+            $this->config[$path] = array();
+            $dir = $path . 'database/';
+            if (is_dir($dir)) {
+                $database = scandir($dir);
+
+                foreach ($database as $k => $v) {
+                    if (strpos($v, '.php') !== false) {
+                        $k = str_replace('.php', '', $v);
+                        $this->config[$path][$k] = $this->struct($dir . $v, $project);
+                    }
+                }
+            }
+        }
+
+        return ($table && isset($this->config[$path][$table])) ? $this->config[$path][$table] : $this->config[$path];
+    }
+
+    /**
+     * 对database配置文件进行解析
+     *
+     * @return array
+     */
+    private function struct($file, $project = false)
+    {
+        $config = include $file;
+
+        if (isset($config['struct']) && is_array($config['struct']['id'])) {
+            $config['update'] = false;
+
+            $config['manage']['struct'] = '<table border=1 width=100% height=100%>';
+
+            $config['level'] = 1;
+            foreach ($config['struct'] as $k => $v) {
+                if (isset($v['level'])) {
+                    $config['level'] = 3;
+                }
+
+                if (isset($v['search_parent'])) {
+                    $config['manage']['search_parent'][$v['search_parent']] = $k;
+                    $config['manage']['search_child'][$k] = $v['search_parent'];
+                }
+
+                if (isset($v['search']) && is_string($v['search'])) {
+
+                    if (strpos($v['search'], 'time') !== false) {
+                        $config['manage']['search']['time'][$k] = $v['name'];
+                    }
+
+                    if (strpos($v['search'], 'date') !== false) {
+                        $config['manage']['search']['date'][$k] = $v['name'];
+                    }
+
+                    if (strpos($v['search'], 'exp') !== false) {
+                        $config['manage']['search']['exp'][$k] = $v['name'];
+                    }
+
+                    if (strpos($v['search'], 'fulltext') !== false) {
+                        $config['manage']['search']['fulltext'][$k] = $v['name'];
+
+                        isset($v['match']) && $config['request']['list']['option'][$k] = array('option', 'like_score');
+                    } elseif (strpos($v['search'], 'text') !== false) {
+                        $config['manage']['search']['text'][$k] = $v['name'];
+                    }
+
+                    if (isset($v['exist']) && strpos($v['search'], 'exist') !== false) {
+                        $config['manage']['search']['exist'][$k]['option'] = $v['exist'];
+                        $config['manage']['search']['exist'][$k]['lang'] = $v['name'];
+                    }
+
+                    if (isset($v['option']) && strpos($v['search'], 'select') !== false) {
+                        $config['manage']['search']['select'][$k]['option'] = $v['option'];
+                        $config['manage']['search']['select'][$k]['lang'] = $v['name'];
+                        if (isset($v['default'])) {
+                            $config['manage']['search']['select'][$k]['default'] = $v['default'];
+                        }
+                    }
+
+                    if (isset($v['option']) && strpos($v['search'], 'group') !== false) {
+                        $config['manage']['search']['group'][$k]['option'] = $v['option'];
+                        $config['manage']['search']['group'][$k]['lang'] = $v['name'];
+                        if (isset($v['default'])) {
+                            $config['manage']['search']['group'][$k]['default'] = $v['default'];
+                        }
+                    }
+
+                    if (isset($v['option']) && strpos($v['search'], 'linkage') !== false) {
+                        $config['manage']['search']['linkage'][$k]['option'] = $v['option'];
+                        $config['manage']['search']['linkage'][$k]['lang'] = $v['name'];
+                        if (isset($v['default'])) {
+                            $config['manage']['search']['linkage'][$k]['default'] = $v['default'];
+                        }
+                    }
+                } elseif (isset($v['search']) && is_array($v['search'])) {
+                    if (isset($v['search']['api'])) {
+                        $config['manage']['search']['api'][$k] = $v['search'];
+                        $config['manage']['search']['api'][$k]['lang'] = $v['name'];
+                    }
+                }
+
+                /*
+                if (isset($v['table']) && !isset($config['end'])) {
+                    $config['end']['insert'] = $v['value'];
+                }
+                */
+
+                if (isset($v['update'])) {
+                    if (!isset($config['manage']['insert'])) {
+                        $config['manage']['insert'] = true;
+                    }
+                    $config['update'] = true;
+                }
+
+                if (isset($v['type'])) {
+                    $config['manage']['struct'] .= Dever::tbody(array($k, $v['type'], $v['name']));
+                }
+
+            }
+
+            $config['manage']['struct'] .= '</table>';
+
+            $config['manage']['_list'] = array
+                (
+                'col' => 'manage',
+                'name' => '管理',
+                'value' => array(),
+            );
+
+            if (!isset($config['manage']['edit']) || (!isset($config['manage']['edit']) && $config['manage']['edit'] == true)) {
+                if (!isset($config['manage']['list_button']['update'])) {
+                    $config['manage']['_list']['value']['update'] = '编辑';
+                }
+            }
+            
+            if (isset($config['manage']['list'][0]) && is_array($config['manage']['list'][0])) {
+                $config['manage']['_list']['value'] += $config['manage']['list'][0];
+                unset($config['manage']['list'][0]);
+            } elseif (isset($config['manage']['list_button'])) {
+                $config['manage']['_list']['value'] += $config['manage']['list_button'];
+            }
+
+            if (!isset($config['manage']['delete']) || (isset($config['manage']['delete']) && $config['manage']['delete'] == true)) {
+                if (!isset($config['manage']['list_button']['delete'])) {
+                    $config['manage']['_list']['value']['delete'] = '删除';
+                }
+            }
+
+            if (!$config['manage']['_list']['value']) {
+                unset($config['manage']['_list']);
+            }
+        }
+
+        $config['state'] = $this->getState();
+        $config['project'] = $project;
+
+        return $config;
+    }
+
+    /**
+     * 自定义列表页面
+     *
+     * @return array
+     */
+    public function page($key = 'list')
+    {
+        $key = Dever::input('page_value', $key);
+        $type = Dever::input('page_type', 1);
+        $config = $this->config();
+
+        $result = array();
+        $result['s1'] = 'display:none';
+        $result['s2'] = 'display:';
+        $result['content'] = '';
+
+        $key = 'page_' . $key;
+
+        if (isset($config['manage'][$key])) {
+            if ($config['manage'][$key] == 'photo' && isset($config['manage']['photo'])) {
+                $result['content'] = Dever::view('list/photo', false, 'manage');
+            } else {
+                $result['content'] = Dever::view($config['manage'][$key], 'manage', $this->project);
+            }
+            
+            //echo $result['content'];die;
+            if ($result['content']) {
+                Dever::setInput('page_content', 1);
+                $result['s1'] = 'display:';
+                $result['s2'] = 'display:none';
+
+                # 添加底部
+                if ($key != 'page_list_table') {
+                    $result['content'] .= Dever::view('inc/foot', false, 'manage');
+                }
+            }
+        } elseif (strstr($key, 'list_table')) {
+            Dever::setInput('page_type', 2);
+        }
+
+        return $result;
+    }
+
+    /**
+     * 自定义列表页面
+     *
+     * @return array
+     */
+    public function page_list()
+    {
+        return $this->page('list');
+    }
+
+    /**
+     * 自定义列表页面 只接管table部分,同时必须传值page_type=1
+     *
+     * @return array
+     */
+    public function page_list_table()
+    {
+        $type = Dever::input('page_type', 2);
+        if ($type == 1) {
+            return $this->page('list_table');
+        } else {
+            return $this->page('list_table_default');
+        }
+    }
+
+    /**
+     * 自定义列表页面
+     *
+     * @return array
+     */
+    public function page_update()
+    {
+        return $this->page('update');
+    }
+
+    /**
+     * 载入自定义资源
+     *
+     * @return array
+     */
+    public function res()
+    {
+        $result = array
+        (
+            'js' => '',
+            'css' => '',
+        );
+
+        if (!$this->project) {
+            return $result;
+        }
+        $config = $this->config();
+
+        if (isset($config['manage']['res'])) {
+            foreach ($config['manage']['res'] as $k => $v) {
+                $result[$k] = $this->getRes($k, $v);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * getRes
+     *
+     * @return string
+     */
+    protected function getRes($path, $value)
+    {
+        if (is_array($value)) {
+            $res = '';
+            foreach ($value as $k => $v) {
+                $res .= $this->getRes($path, $v);
+            }
+            return $res;
+        } else {
+            if ($this->project != 'manage') {
+                $base = str_replace('assets/', 'assets/manage/', Dever::config('host', $this->project)->$path);
+            } else {
+                $base = Dever::config('host', $this->project)->$path;
+            }
+            
+            $file = $base . $value . '.' . $path;
+            if ($path == 'js') {
+                $res = '<script type="text/javascript" src="'.$file.'"></script>';
+            } else {
+                $res = '<link rel="stylesheet" type="text/css" href="'.$file.'">
+';
+            }
+            
+            return $res;
+        }
+    }
+
+    /**
+     * 头部banner
+     *
+     * @return array
+     */
+    public function banner()
+    {
+        if (!$this->project) {
+            return '';
+        }
+        $config = $this->config();
+
+        $result = '';
+
+        if (isset($config['manage']['banner'])) {
+            foreach ($config['manage']['banner'] as $k => $v) {
+                $config['manage']['banner'][$k] = $this->value($v, 'yes');
+            }
+            if (empty($config['manage']['banner']['link'])) {
+                $config['manage']['banner']['link'] = '#';
+                $config['manage']['banner']['target'] = '_self';
+            }
+            if (empty($config['manage']['banner']['target'])) {
+                $config['manage']['banner']['target'] = '_blank';
+            }
+            $result = '<a target="' . $config['manage']['banner']['target'] . '" href="' . $config['manage']['banner']['link'] . '"><img src="' . $config['manage']['banner']['img'] . '"></a>
+                    <span>' . $config['manage']['banner']['name'] . '</span>';
+        }
+
+        return $result;
+    }
+
+    /**
+     * 列表页搜索
+     *
+     * @return array
+     */
+    public function list_search_select(&$result, $search, $name, $lang, $option, $default = false, $bind = array(), $parent = '')
+    {
+        $value = array();
+        if (strpos($lang, '-')) {
+            $temp = explode('-', $lang);
+            $lang = $temp[0];
+        }
+        $value['name'] = $name;
+        $value['lang'] = $lang;
+        $value['option'] = $option;
+        if (isset($search[$name])) {
+            $value['value'] = $search[$name];
+        }
+        if ($default) {
+            //$value['default'] = $default;
+        }
+        if ($bind) {
+            $value['bind'] = $bind;
+        }
+        $value['parent'] = $parent;
+        $result .= Html::select($value, false);
+    }
+
+    /**
+     * 列表页搜索
+     *
+     * @return array
+     */
+    public function list_search_group(&$result, $search, $name, $lang, $option, $default = false)
+    {
+        $value = array();
+        $value['name'] = $name;
+        $value['lang'] = $lang;
+        $value['option'] = $option;
+        if (isset($search[$name])) {
+            $value['value'] = $search[$name];
+        }
+        if ($default) {
+            //$value['default'] = $default;
+        }
+        $result .= Html::group($value, false);
+    }
+
+    /**
+     * 列表页搜索
+     *
+     * @return array
+     */
+    public function list_search_linkage(&$result, $search, $name, $lang, $option, $default = false)
+    {
+        $value = array();
+        $value['name'] = $name;
+        $value['lang'] = $lang;
+        $value['option'] = $option;
+        $value['search_state'] = true;
+        if (isset($search[$name])) {
+            $value['value'] = $search[$name];
+        }
+        if ($default) {
+            //$value['default'] = $default;
+        }
+        $result .= Html::linkage($value, 'span');
+    }
+
+    /**
+     * 列表页搜索
+     *
+     * @return array
+     */
+    public function list_search_time(&$result, $search, $prefix, $key, $lang, $type = 'time')
+    {
+        $value['name'] = $prefix . 'option_start_' . $key;
+        $value['lang'] = '>=' . $lang;
+        if (isset($search[$value['name']])) {
+            $value['value'] = Dever::maketime($search[$value['name']]);
+            Dever::setInput($value['name'], $value['value'], 'search_');
+        }
+        $result .= Html::$type($value, false);
+
+        $value['name'] = $prefix . 'option_end_' . $key;
+        $value['lang'] = '<=' . $lang;
+        if (isset($search[$value['name']])) {
+            $value['value'] = Dever::maketime($search[$value['name']]);
+            Dever::setInput($value['name'], $value['value'], 'search_');
+        }
+        $result .= Html::$type($value, false);
+    }
+
+    /**
+     * 列表页头部按钮
+     *
+     * @return array
+     */
+    public function list_button()
+    {
+        if (Dever::load('manage/auth.oper', 2) == false) {
+            return '';
+        }
+
+        $config = $this->config();
+
+        $result = '';
+
+        # 增加主动统计按钮
+        if (isset($config['manage']['stat'])) {
+            $name = '数据统计';
+            if (is_string($config['manage']['stat'])) {
+                $name = $config['manage']['stat'];
+            }
+            $config['manage']['button'][$name] = $this->url('stat');
+        }
+
+        # 增加下载报表按钮
+        if (isset($config['manage']['excel'])) {
+            $name = '导出数据';
+            if (is_string($config['manage']['excel'])) {
+                $name = $config['manage']['excel'];
+            }
+            $config['manage']['button'][$name] = 'onclick="jump(\''.$this->url('excel').'\', \'#form1\')"';
+        }
+        # 增加回收站
+        if (isset($config['struct']['state']) && (!isset($config['manage']['delete']) || (isset($config['manage']['delete']) && $config['manage']['delete'] && isset($config['manage']['_list']['value']['delete'])))) {
+            if ($config['state'] == 2) {
+                $config['manage']['button']['返回数据列表'] = $this->url('list', 0, false, '&search_option_state=1');
+            } else {
+                $config['manage']['button']['回收站'] = $this->url('list', 0, false, '&search_option_state=2');
+            }
+        }
+
+        # 列表页按钮
+        if (isset($config['manage']['button'])) {
+            $result .= $this->button_list($config['manage']['button']);
+        }
+
+        return $result;
+    }
+
+    /**
+     * 更新页按钮
+     *
+     * @return array
+     */
+    public function update_button()
+    {
+        # 新增权限
+        if (Dever::load('manage/auth.oper', 2) == false) {
+            Dever::alert('你没有权限');
+        }
+
+        $info = $this->info();
+
+        $result = '<button type="button" class="btn btn-primary save-data layui-btn layuiadmin-btn-list"><i class="fa fa-save"></i> 提交保存</button>
+            <a href="' . $info['list'] . '" class="btn btn-danger layui-btn layuiadmin-btn-list layui-btn-danger" onclicks="msg({status:1,msg:\'yes\'})">放弃保存</a>';
+
+        $config = $this->config();
+
+        if (isset($config['manage']['update_button']) && $config['manage']['update_button']) {
+            $result = '';
+            foreach ($config['manage']['update_button'] as $k => $v) {
+                if ($v == 'save-data') {
+                    $result .= '<button type="button" class="btn btn-primary save-data layui-btn layuiadmin-btn-list"><i class="fa fa-save"></i> ' . $k . '</button>';
+                } elseif ($v == 'copy-data') {
+                    $result .= '<a href="javascript:;" class="btn btn-danger layui-btn layuiadmin-btn-list layui-btn-danger" onclick="set_update(\'#copy_num\', 1);set_update(\'#update_where_id\', 0);submit_action();">' . $k . '</a>';
+                } elseif ($v == 'copy-datas') {
+                    $result .= '<a href="javascript:;" class="btn btn-danger layui-btn layuiadmin-btn-list layui-btn-danger" onclick="copy_data($(this))">' . $k . '</a>';
+                } else {
+                    $result .= '<a href="javascript:;" class="btn btn-danger layui-btn layuiadmin-btn-list layui-btn-danger" onclick="' . $v . '">' . $k . '</a>';
+                }
+            }
+        }
+
+        return $result;
+    }
+
+    private function button_list($button)
+    {
+        $result = '';
+        foreach ($button as $k => $v) {
+            if (is_array($v)) {
+                if ($v[0] == 'location') {
+                    if ($v[1] == 'add') {
+                        $url = $this->url('add');
+                    } elseif ($v[1] == 'list') {
+                        $url = $this->url('list');
+                    } else {
+                        $url = Dever::url($v[1]);
+                    }
+                    $result .= '&nbsp;&nbsp;<a class="btn btn-default layui-btn layuiadmin-btn-list" onclick="location.href=\''.$url.'\'">' . $k . '</a>';
+                } elseif ($v[0] == 'show') {
+                    $url = Dever::url($v[1]);
+                    $submit = '';
+                    if (isset($v[2])) {
+                        $submit = Dever::url($v[2]);
+                    }
+                    
+                    $result .= '&nbsp;&nbsp;<a class="btn btn-default layui-btn layuiadmin-btn-list" onclick="loadPage(\''.$url.'\', \''.$k.'\',\''.$submit.'\')">' . $k . '</a>';
+                } elseif ($v[0] == 'fast') {
+                    if (isset($v[2]) && $v[2]) {
+                        $url = $this->url('add', $v[1], $v[2]);
+                    } elseif (isset($v[1]) && $v[1]) {
+                        $url = Dever::url($v[1]);
+                    } else {
+                        $url = $this->url('add');
+                    }
+                    $result .= '&nbsp;&nbsp;<a class="btn btn-default layui-btn layuiadmin-btn-list" href="javascript:;" onclick="fastEdit($(this),\''.$url.'\',\''.$k.'\', \'\')">' . $k . '</a>';
+                } elseif ($v[0] == 'fasts') {
+                    $result .= '&nbsp;&nbsp;<a class="btn btn-default layui-btn layuiadmin-btn-list" href="javascript:;" onclick="fastEdit($(this),\''.$this->url('add').'\',\''.$k.'\', \'\', 1)">' . $k . '</a>';
+                } else {
+                    $result .= '&nbsp;&nbsp;<a class="btn btn-default layui-btn layuiadmin-btn-list" href="' . $this->url($v[0], false, $v[1]) . '">' . $k . '</a>';
+                }
+                
+            } elseif (strpos($v, 'modal|') !== false) {
+                $t = explode('modal|', $v);
+                $result .= '&nbsp;&nbsp;<a href="javascript:;"  class="btn btn-default layui-btn layuiadmin-btn-list" onclick="showAlert(\'' . $t[1] . '\')">' . $k . '</a>';
+            } elseif (strpos($v, '|') !== false) {
+                $t = explode('|', $v);
+                $result .= $t[0] . '&nbsp;&nbsp;<a href="javascript:;" class="btn btn-warning layui-btn layuiadmin-btn-list layui-btn-warm" ' . $t[1] . '>' . $k . '</a>';
+            } elseif (strpos($v, 'onclick') !== false) {
+                $result .= '&nbsp;&nbsp;<a href="javascript:;" class="btn btn-warning layui-btn layuiadmin-btn-list layui-btn-warm" ' . $v . '>' . $k . '</a>';
+            } elseif (strpos($v, 'http://') !== false || strpos($v, 'https://') !== false) {
+                //$result .= '&nbsp;&nbsp;<a href="javascript:;" class="btn btn-default" onclick="jump(\''.Dever::url($v).'\')">'.$k.'</a>';
+                $result .= '&nbsp;&nbsp;<a class="btn btn-default layui-btn layuiadmin-btn-list" href="' . Dever::url($v) . '">' . $k . '</a>';
+            } else {
+                $result .= '&nbsp;&nbsp;<a href="javascript:;" class="btn btn-danger layui-btn layuiadmin-btn-list layui-btn-danger" onclick="load(\'' . Dever::url($v) . '\')">' . $k . '</a>';
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * 列表页搜索
+     *
+     * @return array
+     */
+    public function list_search()
+    {
+        # 新增权限
+        if (Dever::load('manage/auth.oper', 2) == false) {
+            return '';
+        }
+
+        $config = $this->config();
+
+        $result = '';
+
+        # 搜索
+        if (isset($config['struct']) && isset($config['manage']['search'])) {
+            $search = Dever::preInput('search_');
+
+            $node = Html::node(array(' style="margin-top:0px;"', ''));
+            $btn = '<div class="layui-inline"><input type="hidden" value="2" name="excel" id="excel"><button class="btn btn-primary layui-btn layuiadmin-btn-list" onclick="$(\'#form1\').attr(\'action\', \'' . $this->url('search') . '\');list_search($(this))" type="button" style="height: 38px;margin-left:0px;margin-top:-2px;">搜索</button></div>';
+
+            //$result .= '<form id="f1" action="'.$this->url('list').'" method="post">';
+
+            $prefix = 'search_';
+
+            $result .= $node[0];
+
+            if (isset($config['manage']['search']['linkage'])) {
+                foreach ($config['manage']['search']['linkage'] as $k => $v) {
+                    $this->list_search_linkage($result, $search, $prefix . 'linkage_' . $k, $v['lang'], $this->option($v['option']), $v['default']);
+                    if (!layadmin()) {
+                        $result .= '<br />';
+                    }
+                }
+            }
+
+            if (isset($config['manage']['search']['time'])) {
+                foreach ($config['manage']['search']['time'] as $k => $v) {
+                    $this->list_search_time($result, $search, $prefix, $k, $v);
+                }
+            }
+
+            if (isset($config['manage']['search']['date'])) {
+                foreach ($config['manage']['search']['date'] as $k => $v) {
+                    $this->list_search_time($result, $search, $prefix, $k, $v, 'date');
+                }
+            }
+
+            if (isset($config['manage']['search']['select'])) {
+                $this->list_search_br($result);
+                foreach ($config['manage']['search']['select'] as $k => $v) {
+                    $bind = array();
+                    $parent = '';
+                    $option = $this->option($v['option']);
+                    if (isset($config['manage']['search_parent'][$k])) {
+                        $bind = array
+                        (
+                            'onchange',
+                            'setOption',
+                            'search_option_' . $config['manage']['search_parent'][$k]
+                        );
+                    }
+                    elseif (isset($config['manage']['search_child'][$k])) {
+                        $parent = $config['manage']['search_child'][$k];
+                    }
+                    $this->list_search_select($result, $search, $prefix . 'option_' . $k, $v['lang'], $option, $v['default'], $bind, $parent);
+                }
+            }
+
+            if (isset($config['manage']['search']['exist'])) {
+                $this->list_search_br($result);
+                foreach ($config['manage']['search']['exist'] as $k => $v) {
+                    $this->list_search_select($result, $search, $prefix . 'exist_' . $k, $v['lang'], $this->option($v['option']), '');
+                }
+            }
+
+            if (isset($config['manage']['search']['group'])) {
+                $this->list_search_br($result);
+                foreach ($config['manage']['search']['group'] as $k => $v) {
+                    $this->list_search_group($result, $search, $prefix . 'option_' . $k, $v['lang'], $this->option($v['option']), $v['default']);
+                }
+            }
+
+            if (isset($config['manage']['search']['api'])) {
+                $this->list_search_br($result);
+                foreach ($config['manage']['search']['api'] as $k => $v) {
+                    $value = array();
+                    $value['name'] = $prefix . 'api_' . $k;
+                    $value['class'] = 'form-control';
+                    if (isset($search[$value['name']])) {
+                        $value['value'] = $search[$value['name']];
+                    }
+                    if (strpos($v['lang'], '-') !== false) {
+                        $t = explode('-', $v['lang']);
+                        $v['lang'] = $t[0];
+                    }
+                    $value['placeholder'] = $v['lang'];
+                    $result .= Html::text($value, false);
+                }
+            }
+
+            if (isset($config['manage']['search']['text'])) {
+                $this->list_search_br($result);
+                foreach ($config['manage']['search']['text'] as $k => $v) {
+                    $value = array();
+                    $value['name'] = $prefix . 'option_' . $k;
+                    $value['class'] = 'form-control';
+                    if (isset($search[$value['name']])) {
+                        $value['value'] = $search[$value['name']];
+                    }
+                    if (strpos($v, '-') !== false) {
+                        $t = explode('-', $v);
+                        $v = $t[0];
+                    }
+                    $value['placeholder'] = $v;
+                    $result .= Html::text($value, false);
+                }
+            }
+
+            if (isset($config['manage']['search']['fulltext'])) {
+                $this->list_search_br($result);
+                foreach ($config['manage']['search']['fulltext'] as $k => $v) {
+                    $value = array();
+                    $value['name'] = $prefix . 'fulltext_' . $k;
+                    $value['class'] = 'form-control';
+                    if (isset($search[$value['name']])) {
+                        $value['value'] = $search[$value['name']];
+                    }
+                    if (strpos($v, '-') !== false) {
+                        $t = explode('-', $v);
+                        $v = $t[0];
+                    }
+                    $value['placeholder'] = $v;
+                    $result .= Html::text($value, false);
+                }
+            }
+
+            if (isset($config['manage']['search']['exp'])) {
+                $result .= '<br />';
+
+                $this->list_search_select($result, $search, $prefix . 'exp_col', '选择检索项', $config['manage']['search']['exp']);
+
+                $this->list_search_select($result, $search, $prefix . 'exp_type', '', array
+                (
+                3 => '大于',
+                4 => '大于等于',
+                5 => '小于',
+                6 => '小于等于',
+                ), 1);
+
+                $value = array();
+                $value['name'] = $prefix . 'exp_value';
+                $value['class'] = 'form-control';
+                if (isset($search[$value['name']])) {
+                    $value['value'] = $search[$value['name']];
+                }
+                $value['placeholder'] = '填写值';
+                $result .= Html::text($value, false);
+            }
+
+            # 列表页按钮
+            if (isset($config['manage']['search_button'])) {
+                $btn .= $this->button_list($config['manage']['search_button']);
+            }
+
+            $result .= $btn . $node[1];
+
+            //$result .= '</form>';
+
+            # 增加每页显示条数
+            $config['manage']['num'] = $this->getNumConfig($config);
+            
+            if ($config['manage']['num']) {
+                $result = $this->num($result, $config['manage']['num']);
+            }
+        }
+
+        //print_r($result);die;
+
+        return $result;
+    }
+
+    private function list_search_br(&$result)
+    {
+        if (strpos($result, '&nbsp;&nbsp;') && !strpos($result, '<br />')) {
+            $result .= '<br />';
+        }
+    }
+
+    /**
+     * 获取条数配置
+     *
+     * @return array
+     */
+    private function getNumConfig($config)
+    {
+        if (isset($config['manage']['list_type'])) {
+            return false;
+        }
+        if (isset($config['manage']['num']) && $config['manage']['num'] == false) {
+            return false;
+        }
+        if (!isset($config['manage']['num'])) {
+            $config['manage']['num'] = array(20,50,100);
+        }
+        return $config['manage']['num'];
+    }
+
+    /**
+     * 生成条数的html
+     *
+     * @return string
+     */
+    private function num($result, $config)
+    {
+        $limit = '';
+        $cur = Dever::input('search_limit', 0);
+        foreach($config as $k => $v) {
+            if ($cur == $k) {
+                $btn = 'success';
+            } else {
+                $btn = 'default';
+            }
+            $url = $this->url('list', 0, false, '&search_limit=' . $k);
+            $limit .= '<a href="'.$url.'" style="width:60px;font-weight:bold;" class="btn btn-'.$btn.'">'.$v.'</a> ';
+        }
+         
+        $num = '<div class="form-group layui-inline"><div style="padding-top:20px;margin-bottom: -30px;"><label style="color:#bababa;margin-left:8px;margin-right:10px;font-size:14px;font-weight:bold;">每页显示条数:</label>'.$limit.'</div></div>';
+
+        if (layadmin()) {
+            $num = '';
+        }
+
+        $result .= $num;
+
+        return $result;
+    }
+
+    /**
+     * 列表页表格头
+     *
+     * @return array
+     */
+    public function list_thead($type = false)
+    {
+        # 新增权限
+        if (Dever::load('manage/auth.oper', 1) == false) {
+            Dever::alert('你没有权限');
+        }
+
+        $config = $this->config();
+
+        $result = array();
+
+        if (isset($config['struct'])) {
+            if (isset($config['manage']['list']) && $config['manage']['list'] == 'update') {
+                # 验证头部权限 这里如果是多个选择权限的话,暂时无法实现。。。
+                if (isset($config['top']) && is_string($config['top'])) {
+                    $top = Dever::load('manage/auth.getTop', array($config['top']));
+                    if ($top) {
+                        $url = $this->url('update', $top['value']);
+                    }
+                } else {
+                    $url = $this->url('update', 1);
+                }
+
+                return Dever::location($url);
+            } else {
+                if (isset($config['manage']['mul'])) {
+                    if ($type == 'layui') {
+                        $layui = array
+                        (
+                            'field' => 'checkbox',
+                            'title' => '<input type="checkbox" class="checkbox-checkall" name="checkall" id="checkall" value="list" lay-ignore/>',
+                            'fixed' => 'left',
+                        );
+                        $result[] = $layui;
+                    } else {
+                        $result[] = '<th><input type="checkbox" class="checkbox-checkall" name="checkall" id="checkall" value="list"/></th>';
+                    }
+                }
+                $data = array();
+                $data = $this->getAdminInfo($data);
+                foreach ($config['struct'] as $k => $v) {
+                    if (isset($v['list']) && $v['list']) {
+                        # 处理权限
+                        if (isset($v['auth'])) {
+                            $auth = $this->value($v['auth'], $data);
+                            if (!$auth) {
+                                continue;
+                            }
+                        }
+                        if (isset($v['list_name'])) {
+                            $v['name'] = $v['list_name'];
+                        } else {
+                            $temp = Html::cue(array('name' => $v['name']));
+                            $v['name'] = $temp['name'];
+                        }
+
+                        if (!isset($v['level'])) {
+                            $v['level'] = $config['level'];
+                        }
+
+                        if (isset($v['search']) && is_string($v['search']) && strpos($v['search'], 'order') !== false) {
+                            $link = Dever::url();
+                            $order = 'search_order_' . $k . '';
+                            if (strpos($link, $order) !== false) {
+                                $link = preg_replace('/[?|&]' . $order . '=(desc|asc)/i', '{order}', $link);
+                            } else {
+                                $link .= '{order}';
+                            }
+
+                            $search = Dever::input($order);
+
+                            $cancel = '';
+                            if ($search) {
+                                $asc = $search;
+                                $cancel = '&nbsp;<a class="glyphicon glyphicon-remove-sign" style="color:black;" href="' . str_replace('{order}', '', $link) . '" title="取消排序"></a>';
+                            } else {
+                                $asc = 'desc';
+                                if (!isset($v['order']) && $k != 'id') {
+                                    $cancel = '&nbsp;<a class="glyphicon glyphicon-circle-arrow-down" style="color:black;" href="' . str_replace('{order}', '&' . $order . '=desc', $link) . '" title="降序"></a>';
+                                }
+                            }
+
+                            if ($asc == 'asc') {
+                                $asc = 'desc';
+                                $icon = 'down';
+                                $text = '降序';
+                            } else {
+                                $asc = 'asc';
+                                $icon = 'up';
+                                $text = '升序';
+                            }
+
+                            $link = str_replace('{order}', '&' . $order . '=' . $asc, $link);
+
+
+                            if ($type == 'layui') {
+                                $layui = array
+                                (
+                                    'field' => $k,
+                                    'title' => '<a href="' . $link . '" title="' . $text . '" style="color:black;">' . $v['name'] . '&nbsp;<span class="layui-icon layui-icon-' . $icon . '"></span></a>',
+                                );
+                                $result[] = $layui;
+                                
+                            } else {
+                                $result[] = '<th data-priority="'.$v['level'].'"><a href="' . $link . '" title="' . $text . '" style="color:black;">' . $v['name'] . '&nbsp;<span class="glyphicon glyphicon-circle-arrow-' . $icon . '"></span></a>' . $cancel . '</th>';
+                            }
+                            
+                        } else {
+                            
+                            if ($type == 'layui') {
+                                if ($k == 'id' || isset($v['fixed'])) {
+                                    $layui = array
+                                    (
+                                        'field' => $k,
+                                        'title' => $v['name'],
+                                        //'fixed' => 'left',
+                                    );
+                                } else {
+                                    $layui = array
+                                    (
+                                        'field' => $k,
+                                        'title' => $v['name'],
+                                    );
+                                }
+                                $result[] = $layui;
+                            } else {
+                                $result[] = '<th data-priority="'.$v['level'].'">' . $v['name'] . '</th>';
+                            }
+                        }
+                    }
+                }
+                if ((Dever::load('manage/auth.oper', 3) != false || Dever::load('manage/auth.oper', 5) != false) && isset($config['manage']['_list']['value'])) {
+                    if ($type == 'layui') {
+                        $layui = array
+                        (
+                            'field' => $config['manage']['_list']['col'],
+                            'title' => $config['manage']['_list']['name'],
+                            //'fixed' => 'right',
+                        );
+                        $result[] = $layui;
+                    } else {
+                        $result[] = '<th data-priority="1" class="dever-manage">' . $config['manage']['_list']['name'] . '</th>';
+                    }
+                }
+            }
+        }
+
+        return $result;
+    }
+
+    # layui表头
+    public function list_thead_layui()
+    {
+        $html = 'config.table = {};config.table.cols = [];';
+
+        $data = array($this->list_thead('layui'));
+        $data = Dever::json_encode($data);
+        $html .= 'config.table.cols = ' . $data;
+        return $html;
+    }
+
+    # layui表的数据 没有使用其异步方式
+    public function list_tbody_layui()
+    {
+        $html = 'config.table.data = [];';
+
+        $data = $this->list_tbody(false, 'layui');
+        $data = Dever::json_encode($data);
+        $html .= 'config.table.data = ' . $data;
+        return $html;
+    }
+
+    /**
+     * 导出列表
+     *
+     * @return array
+     */
+    public function list_excel_api()
+    {
+        Dever::$global['base']['excel'] = 1;
+        $this->list_search();
+        $data = $this->list_tbody(true);
+        
+
+        if ($data) {
+            $config = $this->config();
+            if (isset($config['manage']['excel']) && $config['manage']['excel']) {
+                $method = 'excel';
+                $info = $this->info();
+                $data = $this->getAdminInfo($data);
+                $this->excel($info, $data, $config);
+            }
+        }
+
+        //print_r($data);die;
+    }
+
+    private function excel($info, $data, $config)
+    {
+        $file = $info['list_header'] . '的' . $info['list_desc'] . '-' . $info['project_name'];
+
+        $header = $body = array();
+        $i = 0;
+        foreach ($config['struct'] as $k => $v) {
+            if (isset($v['list']) && $v['list']) {
+                # 处理权限
+                if (isset($v['auth'])) {
+                    $auth = $this->value($v['auth'], $data);
+                    if (!$auth) {
+                        continue;
+                    }
+                }
+                //$v['name'] = mb_convert_encoding($v['name'],'gb2312','utf-8');
+                $header[$i] = $v['name'];
+                $i++;
+                $j = 0;
+                foreach ($data as $ki => $vi) {
+                    if (is_array($vi)) {
+                        $body[$j][$i] = '';
+                        //if (isset($vi[$k])) {
+                        if (true) {
+                            $value = $vi[$k];
+
+                            if (is_string($v['list'])) {
+                                $value = $this->value($v['list'], $data[$ki], $config['struct']);
+                            }
+                            if (isset($v['option'])) {
+                                $value = $this->getOptionValue($value, $v);
+                            }
+
+                            //$value = mb_convert_encoding($value,'gb2312','utf-8');
+
+                            $body[$j][$i] = $value;
+                            $j++;
+                        }
+                    }
+                }
+            }
+        }
+
+        Dever::excelExport($body, $header, $file);
+    }
+
+    private function getOptionValue($value, $v)
+    {
+        # 验证option是否是匿名函数
+        $v['option'] = $this->option($v['option']);
+        # 位运算
+        if (isset($v['bit'])) {
+            $ts = array();
+            foreach ($v['option'] as $tm => $tv) {
+                if (isset($v['bit'][$tm]) && ($value & $tm) > 0) {
+                    $ts[] = $tv;
+                }
+            }
+            $value = implode(',', $ts);
+        }
+        if ((isset($v['child_name']) || (isset($v['show']) && is_string($v['show'])))) {
+            if (isset($v['option'][$value]) && is_array($v['option'][$value])) {
+                $value = $v['option'][$value]['name'];
+            } else {
+                $value = isset($v['option'][$value]) ? $v['option'][$value] : $value;
+            }
+        } else {
+            if (strstr($value, ',')) {
+                $temp = explode(',', $value);
+                $t = array();
+                foreach ($temp as $vv) {
+                    if (isset($v['option'][$vv]) && is_array($v['option'][$vv])) {
+                        $t[] = $v['option'][$vv]['name'];
+                    } elseif(isset($v['option'][$vv])) {
+                        $t[] = $v['option'][$vv];
+                    } else {
+                        $t[] = $vv;
+                    }
+                }
+                $value = implode("\r\n", $t);
+            } elseif (isset($v['option'][$value]) && is_array($v['option'][$value])) {
+                $value = $v['option'][$value]['name'];
+            } else {
+                $value = isset($v['option'][$value]) ? $v['option'][$value] : $value;
+            }
+        }
+        return $value;
+    }
+
+    private function _getChr($start, $num)
+    {
+        $num = $start + $num;
+        $max = floor($num / 91);
+
+        if ($max > 0) {
+            $num = $num - (91 * $max) + $start;
+            $num = chr($start) . chr($num);
+        } else {
+            $num = chr($num);
+        }
+
+        return $num;
+    }
+
+    /**
+     * 列表页数据列表 检索
+     *
+     * @return array
+     */
+    private function list_tbody_search($config, $param, $high, $search)
+    {
+        # 根据api的数据检索到id
+        $api = Dever::preInput('search_api_');
+        if ($api) {
+            foreach ($api as $k => $v) {
+                if ($v) {
+                    unset($search[$k]);
+                    $k = str_replace('search_api_', '', $k);
+                    # 设定检索高亮
+                    $high[$k] = $v;
+                    if (isset($config['manage']['search']['api'][$k]['api'])) {
+                        $col = $config['manage']['search']['api'][$k]['col'];
+                        $option = array($col => $v);
+                        $v = Dever::load($config['manage']['search']['api'][$k]['api'], $option);
+                        $result = $config['manage']['search']['api'][$k]['result'];
+                        if ($v && is_array($v)) {
+                            if (isset($v[$result])) {
+                                $v = $v[$result];
+                            } else {
+                                if ($result == 'id') {
+                                    $v = array_keys($v);
+                                } else {
+                                    $t = array();
+                                    foreach ($v as $k1 => $v1) {
+                                        $t[] = $v1[$result];
+                                    }
+                                    $v = $t;
+                                }
+                                if (isset($config['manage']['search']['api'][$k]['search'])) {
+                                    $param['option'][$config['manage']['search']['api'][$k]['search']] = array('yes', 'in');
+                                } else {
+                                    $param['option'][$k] = array('yes', 'in');
+                                }
+                            }
+                        } else {
+                            $v = '-100';
+                        }
+                    }
+
+                    if (isset($config['manage']['search']['api'][$k]['search'])) {
+                        $param['option_' . $config['manage']['search']['api'][$k]['search']] = $v;
+                    } else {
+                        $param['option_' . $k] = $v;
+                    }
+                    
+                }
+            }
+        }
+
+        # 检索有无值
+        $exist = Dever::preInput('search_exist_');
+        if ($exist) {
+            foreach ($exist as $k => $v) {
+                if ($v) {
+                    unset($search[$k]);
+                    $k = str_replace('search_exist_', '', $k);
+                    if ($v == 'yes') {
+                        # 有值
+                        $param['option'][$k] = array('yes', '!=');
+                        $param['option_' . $k] = 'null';
+                    } elseif ($v == 'no') {
+                        # 无值
+                        $param['option'][$k] = array('yes', '=');
+                        $param['option_' . $k] = 'null';
+                    } elseif (strpos($v, '|')) {
+                        # 有无值或者自定义的值
+                        $temp = explode('|', $v);
+                        $param['option_' . $k] = $temp[1];
+                        if ($temp[0] == 'yes') {
+                            $param['option'][$k] = array('yes', '!=');
+                            $param['option'][$k . '_t1'] = array('yes-' . $k, '!=');
+                        } else {
+                            $param['option'][$k] = array('yes', '=', 'and(');
+                            $param['option'][$k . '_t1'] = array('yes-' . $k, '=', 'or)');
+                        }
+                        $param['option_' . $k . '_t1'] = 'null';
+                    } else {
+                        # 自定义的值
+                        $param['option_' . $k] = $v;
+                    }
+                }
+            }
+        }
+        $fulltext = Dever::preInput('search_fulltext_');
+        if ($fulltext) {
+            $fulltext_state = false;
+            foreach ($fulltext as $k => $v) {
+                if ($v) {
+                    unset($search[$k]);
+                    $k = str_replace('search_fulltext_', '', $k);
+                    $param['option_' . $k] = $v;
+
+                    # 设定检索高亮
+                    $high[$k] = $v;
+
+                    $fulltext_state = true;
+                }
+            }
+            $this->search = true;
+        }
+
+        $linkage = Dever::preInput('search_linkage_');
+
+        if ($linkage) {
+            foreach ($linkage as $k => $v) {
+                if ($v && $v != -1) {
+                    unset($search[$k]);
+                    $k = str_replace('search_linkage_', '', $k);
+                    if (isset($config['struct'][$k]['search_col'])) {
+                        $temp = explode(',', $config['struct'][$k]['search_col']);
+                        if (!is_array($v)) {
+                            $v = explode(',', $v);
+                        }
+                        foreach ($temp as $k1 => $v1) {
+                            if (isset($v[$k1]) && $v[$k1] != -1) {
+                                $param['option_' . $v1] = $v[$k1];
+                            }
+                        }
+                    } else {
+                        if (is_array($v)) {
+                            $v = implode(',', $v);
+                        }
+                        
+                        if ($v != -1) {
+                            $v = Dever::defaultValue($v);
+
+                            $param['option_' . $k] = $v;
+
+                            # 设定检索高亮
+                            $high[$k] = $v;
+                        }
+                    }
+                }
+            }
+            $this->search = true;
+        }
+
+        $exp = Dever::preInput('search_exp_');
+        if ($exp) {
+            $k = $search['search_exp_col'];
+            $v = $search['search_exp_value'];
+            $param['option_' . $k] = $v;
+            $param['search_type'] = $search['search_exp_type'];
+
+            $this->search = true;
+        }
+
+        $order = Dever::preInput('search_order_');
+        if ($order) {
+            foreach ($order as $k => $v) {
+                $k = str_replace('search_order_', '', $k);
+                $param['order'][0][$k] = $v;
+                unset($search[$k]);
+            }
+        }
+        foreach ($search as $k => $v) {
+            if ($v) {
+                if (strpos($k, 'option_') !== false) {
+                    //Dever::setInput(str_replace('search_', '', $k), $v);
+                    if (is_array($v)) {
+                        if ($v[0] == 0) {
+                            continue;
+                        }
+                        $v = str_replace(',0', '', implode(',', $v));
+                        $t = explode(',', $v);
+                        $parent = end($t);
+                        $v .= '%';
+                    }
+                    $param[str_replace('search_', '', $k)] = $v;
+                    $this->search = true;
+                } elseif ($k == 'search_limit') {
+                    $num = $this->getNumConfig($config);
+                    if ($num) {
+                        $param['page'][0] = $num[$v];
+                    }
+                }
+            }
+        }
+
+        return array($param, $high);
+    }
+
+    private function list_tbody_mul($param)
+    {
+        $mul = Dever::load('manage/auth.oper', 3) ? Dever::preInput('mul_') : false;
+
+        if (Dever::input('method') == 'mul' && $mul && $mul['mul_type'] > 0) {
+            if ($mul['mul_type'] == 1 && empty($mul['mul_where_id'])) {
+                Dever::alert('您还未选择任何数据条目');
+            }
+            Dever::config('base')->mul_type = $mul['mul_type'];
+            if (isset($param['page'])) {
+                unset($param['page']);
+            }
+            unset($mul['mul_type']);
+            foreach ($mul as $k => $v) {
+                if ($v) {
+                    if (is_array($v)) {
+                        $v = implode(',', $v);
+                    }
+                    $param[str_replace('mul_', '', $k)] = $v;
+                }
+            }
+
+            if (isset($param)) {
+                $method = $this->project . '/' . $this->table . '-updatemul';
+                $state = Dever::load($method, $param);
+
+            }
+
+            Dever::alert('reload');
+        }
+    }
+
+    /**
+     * 列表页数据列表:图片形式
+     *
+     * @return array
+     */
+    public function list_photo()
+    {
+        $config = $this->config();
+        $result = array();
+        if (isset($config['manage']['photo'])) {
+
+            $high = array();
+        
+            $search = Dever::load('manage/auth.oper', 2) ? Dever::preInput('search_') : false;
+
+            $param = array();
+
+            $parent = 0;
+            if ($search) {
+                list($param, $high) = $this->list_tbody_search($config, $param, $high, $search);
+            }
+
+            if (empty($param['page'])) {
+                $num = $this->getNumConfig($config);
+                if ($num) {
+                    $param['page'][0] = $num[0];
+                }
+            }
+
+            $method = $this->project . '/' . $this->table . '-list';
+            $result = Dever::load($method, $param);
+            if ($result) {
+                foreach ($result as $k => $v) {
+                    $result[$k] = Dever::load($config['manage']['photo'], $v);
+                    $result[$k]['button'] = $this->list_tbody_button($config, $v, 'div');
+                }
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * 列表页数据列表:表格形式
+     *
+     * @return array
+     */
+    public function list_tbody($excel = false, $type = false)
+    {
+        # 新增权限
+        if (Dever::load('manage/auth.oper', 1) == false) {
+            Dever::alert('你没有权限');
+        }
+
+        if (Dever::input('page_content') == 1) {
+            return;
+        }
+
+        $config = $this->config();
+
+        $high = array();
+        
+        $search = Dever::load('manage/auth.oper', 2) ? Dever::preInput('search_') : false;
+
+        $param = array();
+
+        $parent = 0;
+        if ($search) {
+            list($param, $high) = $this->list_tbody_search($config, $param, $high, $search);
+        }
+
+        if (empty($param['page'])) {
+            $num = $this->getNumConfig($config);
+            if ($num) {
+                $param['page'][0] = $num[0];
+            }
+        }
+
+        # 批量更新
+        $this->list_tbody_mul($param);
+
+        $result = $return = array();
+
+        if (isset($config['top_option']) && $config['top_option']) {
+            if (isset($config['top_option'][0])) {
+                foreach ($config['top_option'] as $k => $v) {
+                    $param['option'][$v['col']] = array($v['value'], 'in');
+                }
+            } else {
+                $param['option'][$config['top_option']['col']] = array($config['top_option']['value'], 'in');
+            }
+        }
+
+        if ($excel == true) {
+            $method = $this->project . '/' . $this->table . '-all';
+        } else {
+            $method = $this->project . '/' . $this->table . '-list';
+        }
+
+        //print_r($param);die;
+        $data = Dever::load($method, $param);
+
+        if (isset($config['manage']['list_type']) && $config['manage']['list_type'] == 'parent') {
+            $parent = array();
+            $child = array();
+            foreach ($data as $k => $v) {
+                if ($v[$config['name'] . '_id'] <= 0) {
+                    $parent[$k] = $v;
+                } else {
+                    $v['name'] = '|-----' . $v['name'];
+                    $child[$v[$config['name'] . '_id']][$k] = $v;
+                }
+            }
+
+            if ($parent) {
+                $data = array();
+                foreach ($parent as $k => $v) {
+                    $data[$v['id']] = $v;
+                    if (isset($child[$v['id']])) {
+                        foreach ($child[$v['id']] as $i => $j) {
+                            $data[$j['id']] = $j;
+                        }
+                    }
+                }
+            }
+        } elseif (isset($config['manage']['list_type']) && $config['manage']['list_type'] == 'tree') {
+            $data = $this->tree($data, $config, -1);
+        }
+
+        if ($excel == true) {
+            return $data;
+        }
+
+        if (Dever::input('page_type') == 1) {
+            Dever::$global['manage']['list_data'] = $data;
+            return;
+        }
+
+        //print_r($data);die;
+        //print_r(Helper::page("current"));die;
+
+        if ($data && isset($config['struct'])) {
+            $i = 0;
+            $pg = Dever::input('pg', 1);
+            $cur = Dever::input('search_limit', 0);
+            $num = $this->getNumConfig($config);
+            foreach ($data as $k => $v) {
+                $data[$k] = $this->getAdminInfo($data[$k]);
+                $data[$k]['i'] = $i;
+                $ii = intval($num[$cur])*($pg-1);
+                $data[$k]['r'] = $i+1+$ii;
+                $result[$k] = '<tr>';
+                $return[$i] = array();
+
+                if (isset($config['manage']['mul'])) {
+                    $mul_state = false;
+                    if ($config['manage']['mul'] && is_string($config['manage']['mul'])) {
+                        $mul_state = $this->value($config['manage']['mul'], $data[$k]);
+                    } else {
+                        $mul_state = true;
+                    }
+                    if ($mul_state) {
+                        $checkbox = '<input type="checkbox" name="mul_where_id[]" class="checkbox-checkall-list" lay-ignore value="' . $v['id'] . '"/>';
+                    } else {
+                        $checkbox = '<input type="checkbox" name="mul_where_id[]" class="checkbox-checkall-list" lay-ignore value="-1" disabled/>';
+                    }
+
+                    $result[$k] .= '<td>'.$checkbox.'</td>';
+                    $return[$i]['checkbox'] = $checkbox;
+                }
+
+                foreach ($config['struct'] as $ki => $vi) {
+                    # 处理同步
+                    if (isset($vi['sync']) && strpos($ki, '-')) {
+                        $temp = explode('-', $ki);
+                        $load = Dever::load($temp[0] . '/' . $temp[1] . '-one', array('option_' . $vi['sync'][1] => $v[$vi['sync'][0]]));
+                        $v[$ki] = isset($load[$temp[2]]) ? $load[$temp[2]] : $vi['default'];
+                    }
+
+                    if (isset($vi['list']) && $vi['list']) {
+                        if (empty($v[$ki])) {
+                            $v[$ki] = $vi['default'];
+                        }
+                        # 处理权限
+                        if (isset($vi['auth'])) {
+                            $auth = $this->value($vi['auth'], $data[$k]);
+                            if (!$auth) {
+                                continue;
+                            }
+                        }
+
+                        $show = $v[$ki];
+
+                        if (is_string($vi['list'])) {
+                            $show = $this->value($vi['list'], $data[$k], $config['struct']);
+                        }
+                        if (isset($vi['key']) && $vi['update'] != 'editor') {
+                            $show = Dever::upload($show);
+                        }
+                        if (isset($vi['modal'])) {
+                            $show = Html::modal($this->value($vi['modal'], $data[$k], $config['struct']), $show);
+                        } elseif (isset($vi['option'])) {
+                            # 验证option是否是匿名函数
+                            if ((isset($vi['edit']) && $vi['edit'])) {
+                                $vi['option'] = $this->option($vi['option'], $vi['edit']);
+                            } else {
+                                $vi['option'] = $this->option($vi['option']);
+                            }
+                            # 位运算
+                            if (isset($vi['bit'])) {
+                                $ts = array();
+                                foreach ($vi['option'] as $tm => $tv) {
+                                    if (isset($vi['bit'][$tm]) && ($show & $tm) > 0) {
+                                        $ts[] = $tv;
+                                    }
+                                }
+                                $show = implode(',', $ts);
+                            }
+                            if ((isset($vi['child_name']) || (isset($vi['show']) && is_string($vi['show'])))) {
+                                if (isset($vi['option'][$show]) && is_array($vi['option'][$show])) {
+                                    $show = $vi['option'][$show]['name'];
+                                } else {
+                                    $show = isset($vi['option'][$show]) ? $vi['option'][$show] : $show;
+                                }
+                            }
+                            //elseif ($config['state'] == 1 && (isset($vi['edit']) && $vi['edit']) || $ki == 'status')
+                            elseif ($config['state'] == 1 && (isset($vi['edit']) && $vi['edit']))
+                            {
+                                $vi['name'] = 'up_col_' . $ki;
+                                $vi['value'] = $v[$ki];
+                                $m = 'select';
+                                if (isset($vi['update']) && $vi['update'] == 'group') {
+                                    $m = 'group';
+                                }
+
+                                $show = Html::$m($vi, 'form-list', '', 'style="min-width: 100px;" data-old="'.$show.'" onchange="update($(this), \'' . $v['id'] . '\', \'' . $this->project . '\', \'' . $this->table . '\')"');
+                            } else {
+                                if (strstr($show, ',')) {
+                                    $temp = explode(',', $show);
+                                    $t = array();
+                                    foreach ($temp as $vv) {
+                                        if (isset($vi['option'][$vv]) && is_array($vi['option'][$vv])) {
+                                            $t[] = $vi['option'][$vv]['name'];
+                                        } elseif(isset($vi['option'][$vv])) {
+                                            $t[] = $vi['option'][$vv];
+                                        } else {
+                                            $t[] = $vv;
+                                        }
+                                    }
+                                    $show = implode('<br />', $t);
+                                } elseif (isset($vi['option'][$show]) && is_array($vi['option'][$show])) {
+                                    $show = $vi['option'][$show]['name'];
+                                } else {
+                                    $show = isset($vi['option'][$show]) ? $vi['option'][$show] : $show;
+                                }
+                            }
+                        }
+
+                        $text = $show;
+                        if ($high && isset($high[$ki])) {
+                            if (isset($v['s_' . $ki])) {
+                                $text = $v['s_' . $ki];
+                                $text = str_replace('<em class="dever_highlight">', '<font color="red" class="dever_highlight">', $text);
+                                $text = str_replace('</em>', '</font>', $text);
+                            } else {
+                                $text = preg_replace('/('.$high[$ki].')/i', '<font color="red" class="dever_highlight">${1}</font>', $text);
+                            }
+                        }
+
+                        if (!isset($vi['option']) && isset($vi['edit']) && $vi['edit']) {
+                            //$url = Dever::url($vi['edit'] . '?where_id=' . $v['id'] . '&col=' . $vi['col']. '&key=' . $this->project . '&table=' . $this->table);
+
+                            $url = $this->url('updateAction');
+
+                            $vi['edit'] = $vi['edit'] == 'textarea' ? $vi['edit'] : 'text';
+
+                            $text = '<span class="edit" data-col="' . $ki . '" data-url="' . $url . '" data-id="' . $v['id'] . '" data-project="' . $this->project . '" data-table="' . $this->table . '" data-content="' . $show . '" data-type="' . $vi['edit'] . '">'.$text.'</span>';
+
+                            $result[$k] .= '<td >' . $text . '</td>';
+
+                            if (isset($return[$i][$ki])) {
+                                $text = $return[$i][$ki] . $text;
+                            }
+                            $return[$i][$ki] = $text;
+                        } else {
+                            $result[$k] .= '<td>' . $text . '</td>';
+
+                            if (isset($return[$i][$ki])) {
+                                $text = $return[$i][$ki] . $text;
+                            }
+                            $return[$i][$ki] = $text;
+
+                        }
+                    }
+                }
+
+                $button = $this->list_tbody_button($config, $data[$k]);
+                $result[$k] .= $button;
+
+                $return[$i]['manage'] = str_replace(array('<td>', '</td>'), '', $button);
+
+                $result[$k] .= '</tr>';
+
+                $i++;
+            }
+        }
+
+        /*
+        if ($result) { 
+            $thead = $this->list_thead();
+            if ($thead) {
+                $k = $k + 1;
+                $result[$k] = '<tr>';
+                foreach ($thead as $k => $v) {
+                    $result[$k] .= $v;
+                }
+                $result[$k] .= '</tr>';
+            }
+        }
+        */
+
+        if ($type) {
+            return $return;
+        }
+        return $result;
+    }
+
+    private function list_tbody_button($config, $data, $type = 'td')
+    {
+        $result = '';
+        if (isset($config['manage']['_list']['value'])) {
+            $result = '<'.$type.'>';
+            if ($config['state'] == 2) {
+                if (isset($config['manage']['_list']['value']['update'])) {
+                    unset($config['manage']['_list']['value']['update']);
+                }
+                if (isset($config['manage']['_list']['value']['delete'])) {
+                    $config['manage']['_list']['value']['delete'] = '恢复';
+                }
+            }
+
+            foreach ($config['manage']['_list']['value'] as $kj => $vj) {
+                $pj = false;
+
+                $h = '<span class="am-icon-pencil-square-o"></span>';
+                $oper = true;
+                if ($kj == 'update') {
+                    $oper = Dever::load('manage/auth.oper', 3);
+                } elseif ($kj == 'delete') {
+                    $oper = Dever::load('manage/auth.oper', 5);
+
+                    $h = '<span class="am-icon-trash-o"></span>';
+                }
+
+                if (is_array($vj) && isset($vj[1])) {
+                    if (isset($vj[2])) {
+                        $oper = $this->value($vj[2], $data);
+                    }
+                    if ($oper && strpos($vj[1], 'modal|') === false) {
+                        $pj = $this->value($vj[1], $data);
+                        $vjn = $vj[0];
+                    }
+                } else {
+                    $vjn = $vj;
+                }
+
+                if ($oper == true) {
+                    if ($kj == 'delete') {
+                        $class = 'layui-btn layui-btn-danger';
+                    } else {
+                        $class = 'layui-btn';
+                    }
+                    if (layadmin()) {
+                        $class .= ' layui-btn-xs';
+                    }
+                    if (strpos($kj, 'edits') !== false) {
+                        if (!isset($vj[1])) {
+                            $vj[1] = '';
+                        }
+                        $result .= '<a href="javascript:;" onclick="fastEdit($(this), \'' . $this->url($kj, $data['id']) . '\', \''.$vj[0].'\', \''.$vj[1].'\', 1)"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'">' . $vj[0] . '</button></a>&nbsp;&nbsp;';
+                    } elseif (strpos($kj, 'edit') !== false) {
+                        if (!isset($vj[1])) {
+                            $vj[1] = '';
+                        }
+                        if (strstr($vj[1], 'http')) {
+                            $url = $vj[1] . '&id=' . $data['id'];
+                        } else {
+                            $url = $this->url($kj, $data['id']);
+                        }
+                        $result .= '<a href="javascript:;" onclick="fastEdit($(this), \'' . $url . '\', \''.$vj[0].'\', \''.$vj[1].'\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'">' . $vj[0] . '</button></a>&nbsp;&nbsp;';
+                    } elseif (strpos($kj, 'oper') !== false) {
+                        $result .= '<a href="javascript:;" onclick="load(\'' . Dever::url($pj) . '\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'">' . $vj[0] . '</button></a>&nbsp;&nbsp;';
+                    } elseif (isset($vj[1]) && strpos($vj[1], 'modal|') !== false) {
+                        $t = explode('|', $vj[1]);
+                        $result .= '<a href="#dever_modal" data-toggle="modal"  class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'" onclick=' . $t[1] . ' msg-send="' . $this->value($t[2], $data) . '">' . $vj[0] . '</a>&nbsp;&nbsp;';
+                    } elseif (isset($vj[1])) {
+                        $result .= '<a href="' . $this->url($kj, $data['id'], $pj) . '" class="oper_' . $kj . '"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'">' . $h . $vjn . '</button></a>&nbsp;&nbsp;';
+                    } else {
+                        $result .= '<span style="margin-left:5px;margin-right:10px;">' . $vj[0] . '</span>';
+                    }
+                }
+            }
+            $result .= '</'.$type.'>';
+        }
+
+        return $result;
+    }
+
+    /**
+     * 多级分类
+     *
+     * @return array
+     */
+    private function tree($data, $config, $parent = 0)
+    {
+        $key = $config['name'] . '_id';
+        $result = array();
+        $this->treeData($data, $result, $key, $parent);
+
+        return $result;
+    }
+
+    private function treeData($array, &$result, $key, $parent_id = 0, $level = 0)
+    {
+        if (empty($array)) {
+            return;
+        }
+
+        $level++;
+
+        foreach ($array as $k => $v) {
+            if (isset($v[$key]) && $v[$key] == $parent_id) {
+                $v['level'] = $level;
+                $v['name'] = $this->treeName($v['name'], $level);
+                $result[] = $v;
+                unset($array[$k]);
+                $this->treeData($array, $result, $key, $v['id'], $level);
+            }
+        }
+    }
+
+    private function treeName($name, $level = 1)
+    {
+        $string = '';
+
+        if ($level > 1) {
+            /*
+            $num = 4;
+            $string = '-';
+            //STR_PAD_LEFT
+            $string = str_pad('|', $level * $num, $string);
+            */
+            $string = str_repeat(' ',$level-1);
+
+            $string .= '|—';
+        }
+
+        return $string . $name;
+    }
+
+    /**
+     * 列表页批量管理
+     *
+     * @return array
+     */
+    public function list_mul()
+    {
+        # 新增权限:更新权限
+        if (Dever::load('manage/auth.oper', 3) == false) {
+            return '';
+        }
+
+        $config = $this->config();
+
+        $result = '';
+
+        if (isset($config['struct']) && isset($config['manage']['mul'])) {
+            $mul = Dever::preInput('mul_');
+
+            $node = Html::node(array('class="am-u-sm-12" style="margin-top:10px;"', 'class="am-form-group am-input-group-sm"'));
+            $btn = '<button class="btn btn-danger layui-btn layui-btn-danger" onclick="$(\'#form1\').attr(\'action\', \'' . $this->url('list') . '\');list_mul($(this))" type="button" style="height: 38px;margin-left:10px;">更新</button>';
+
+            $prefix = 'mul_';
+
+            $result .= $node[0];
+
+            $default = 0;
+
+            $option = array
+            (
+                1 => '本页选中的数据',
+            );
+
+            # 只有当有搜索条件时才会出现
+            if (Dever::load('manage/auth.oper', 2) && $this->search == true) {
+                $option[2] = '所有页面的数据';
+                $default = 2;
+            }
+
+            $this->list_search_select($result, $mul, $prefix . 'type' . '" id="' . $prefix . 'type', '请选择要更新的数据', $option, $default);
+
+            foreach ($config['struct'] as $k => $v) {
+                if ($k == 'state' && (!isset($config['manage']['delete']) || (isset($config['manage']['delete']) && $config['manage']['delete']))) {
+                    $v['option'] = Dever::config('base')->state;
+                    if ($this->getState() == 2) {
+                        unset($v['option'][2]);
+                    } else {
+                        unset($v['option'][1]);
+                    }
+                    
+                    $v['edit'] = true;
+                }
+                $select = false;
+                if (isset($v['mul'])) {
+                    $select = $v['mul'];
+                } elseif (isset($v['edit'])) {
+                    $select = $v['edit'];
+                }
+                if ($select && isset($v['option']) && (is_array($v['option']) || is_object($v['option']))) {
+                    $result .= '&nbsp;&nbsp;';
+                    $this->list_search_select($result, $mul, $prefix . 'set_' . $k, $v['name'], $this->option($v['option'], $select), $v['default']);
+                }
+            }
+
+            $result .= $btn . $node[1];
+        }
+
+        //print_r($result);die;
+
+        return $result;
+    }
+
+    private function value($value, $data, $struct = array())
+    {
+        if (!$data) {
+            return $value;
+        }
+        if (strstr($value, '={') && !strstr($value, '"')) {
+            $value = '"' . $value . '"';
+        }
+        if (is_string($data)) {
+            $eval = '$value = ' . $value . ';';
+            eval($eval);
+
+            return $value;
+        }
+        if ($value == 'table' && $struct) {
+            $result = $this->struct_data($struct, $data);
+            $value = Dever::table($result);
+        } elseif (strpos($value, '{') !== false) {
+            # 这里用到了/e,注意这里无论如何不能传入$_GET之类的用户参数 2015/7/21更新为callback方式
+            //$eval = '$value = ' . preg_replace('/{(.*?)}/e', "\$data['$1']", $value) . ';';
+            $func = function ($r) use ($data) {
+                if (isset($data[$r[1]])) {
+                    return $data[$r[1]];
+                }
+                return false;
+            };
+
+            $value = preg_replace_callback('/{(.*?)}/', $func, $value);
+            if (strstr($value, '<script>')) {
+                $value = str_replace('<script>', '<script>$(document).ready(function(){', $value);
+                $value = str_replace('</script>', '});</script>', $value);
+            }
+            $eval = '$value = ' . $value . ';';
+
+            eval($eval);
+        }
+
+        return $value;
+
+    }
+
+    /**
+     * update
+     *
+     * @return array
+     */
+    public function update()
+    {
+        $config = $this->config();
+
+        $result = array();
+
+        $prefix = 'update';
+
+        $data = array();
+
+        if ($this->id) {
+            # 新增权限
+            if (Dever::load('manage/auth.oper', 3) == false) {
+                Dever::alert('你没有权限');
+            }
+
+            $data = $this->load('one', $this->id);
+
+            if ($data) {
+                //$prefix = 'set';
+            }
+        } else {
+            # 新增权限
+            if (Dever::load('manage/auth.oper', 4) == false) {
+                Dever::alert('你没有权限');
+            }
+        }
+
+        //print_r($config['manage']['update']);die;
+        $data = $this->getAdminInfo($data);
+        $col = Dever::input('col');
+
+        foreach ($config['struct'] as $k => $v) {
+            if (isset($v['update'])) {
+                if ($col && !strstr(',' . $col . ',', ',' . $k . ',')) {
+                    continue;
+                }
+                //处理权限
+                if (isset($v['auth'])) {
+                    $auth = $this->value($v['auth'], $data);
+                    if (!$auth) {
+                        continue;
+                    }
+                }
+                # 处理show模式下的class
+                $class = $this->update_class($k, $v, '', $data);
+
+                $result[$k] = '<div class="form-group ' . $class . '"><div class="margin-top">';
+
+                if (layadmin()) {
+                    $result[$k] = '<div class="layui-form-item ' . $class . '"><div classs="layui-col-lg6">';
+
+                    if (isset($v['update']) && is_array($v['update'])) {
+                        $result[$k] = '<div class="layui-form-item ' . $class . '"><div class="layui-tab-card">';
+                    }
+                }
+
+                $result[$k] .= $this->create_update_html($k, $v, $data);
+
+                $result[$k] .= '</div></div>';
+
+            } elseif (!$col && isset($v['class'])) {
+                # 分割线
+                $v['name'] = $this->value($v['name'], array('test' => 1));
+                if (isset($v['right'])) {
+                    $this->card_right = true;
+                }
+                $this->card = true;
+                $result[$k] = Html::hr($v);
+            }
+        }
+
+        if (Dever::input('ajax') == 1) {
+            return implode('', $result);
+        }
+
+        //print_r($result);die;
+
+        return $result;
+    }
+
+    public function card()
+    {
+        if (isset($this->card_right)) {
+            return 'layui-col-md6';
+        }
+        return 'layui-col-md12';
+    }
+
+    public function layui_card()
+    {
+        if (isset($this->card)) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * update_class
+     *
+     * @return string
+     */
+    public function update_class($name, $param, $prefix = '', $data = array())
+    {
+        $class = '';
+        $key = 'show';
+        if (isset($param[$key]) && $param[$key]) {
+            $parent = array();
+            $child = array();
+            if (is_string($param[$key])) {
+                parse_str($param[$key], $param[$key]);
+            }
+            if (is_array($param[$key])) {
+                foreach ($param[$key] as $k => $v) {
+                    if ($k == 'no') {
+                        $child[$k . '_' . $v] = $key . '_no';
+                    } elseif (strpos($v, '/')) {
+                        $parent[$k] = $key . '_' . $k;
+                        $k = $k . '_ajax';
+                        $value = '';
+                        if (isset($data[$name])) {
+                            $value = $data[$name];
+                        }
+                        $v = str_replace('?', '?key='.$name.'&value='.$value.'&source='.$this->name.'&', $v);
+                        $child[$k] = $key . '_' . $k .'" dever-ajax="'.Dever::url($v).'"';
+                    } else {
+                        if (strpos($v, ',')) {
+                            $temp = explode(',', $v);
+                            foreach ($temp as $v1) {
+                                $show = $k . '_' . $v1;
+                                if ($prefix) {
+                                    $k = str_replace($name, $k, $prefix);
+                                    $show = str_replace($name, $show, $prefix);
+                                }
+                                $parent[$k] = $key . '_' . $k;
+                                $child[$show] = $key . '_' . $show;
+                            }
+                        } else {
+                            $show = $k . '_' . $v;
+                            if ($prefix) {
+                                $k = str_replace($name, $k, $prefix);
+                                $show = str_replace($name, $show, $prefix);
+                            }
+                            $parent[$k] = $key . '_' . $k;
+                            $child[$show] = $key . '_' . $show;
+                        }
+                    }
+                }
+            }
+
+            $class = implode(' ', $parent) . ' ' . implode(' ', $child);
+        } 
+        if (isset($param['control'])) {
+            $class .= ' ' . $key . '_input';
+        }
+
+        return $class;
+    }
+
+    /**
+     * update_html
+     *
+     * @return string
+     */
+    public function create_update_html($key, $value, $data = array())
+    {
+        $result = '';
+
+        $value['ext'] = $value['col'] = $key;
+
+        $value['update'] = $value['update'] ? $value['update'] : 'text';
+
+        if (isset($value['match']) && $value['match'] != 'option') {
+            if (is_string($value['match']) && strpos($value['match'], '/') !== false) {
+                if (strstr($value['match'], 'option||')) {
+                    $value['valid'] = 'validate[custom[' . $key . ']]';
+                } else {
+                    $value['valid'] = 'validate[required,custom[' . $key . ']]';
+                }
+            } else {
+                $value['valid'] = 'validate[required]';
+            }
+        }
+
+        if (is_string($value['update']) && strpos($value['update'], 'copy.') !== false) {
+            $value['value'] = $value['update'];
+            $value['update'] = 'hidden';
+        }
+
+        $this->update_html($value, $key, $key, $data, $result);
+
+        return $result;
+    }
+
+    /**
+     * update_html
+     *
+     * @return string
+     */
+    public function update_html($param, $key, $index, $data, &$result)
+    {
+        if (isset($param['name']) && $param['update'] != 'hidden' && isset($param['update'])) {
+            $result .= Html::pageLeft($param);
+        }
+
+        if ($param['update']) {
+            # 名称带前缀
+            $param['name'] = 'update_' . $param['ext'];
+            $param['index'] = $index;
+
+            //$param['value'] = '';
+
+            # 得到当前的值
+            if (isset($data[$index]) && !isset($param['value'])) {
+                $param['value'] = $data[$index];
+            }
+
+            # 得到下级的值
+            if (isset($param['child_value']) && isset($data['id'])) {
+                $param['child_value'] = $this->value($param['child_value'], $data);
+            }
+
+            # 验证option是否是匿名函数
+            if (isset($param['option'])) {
+                $param['option'] = $this->option($param['option']);
+            }
+
+            if (isset($data[$index]) && !isset($param['value']) && isset($param['key']) && $param['update'] != 'editor') {
+                $param['value'] = Dever::upload($data[$index]);
+            }
+
+            # 处理下级字段
+            if (isset($param['child'])) {
+                $param['child'] = $this->option($param['child']);
+                if (isset($data[$key . '_parent'])) {
+                    $param['parent_value'] = $data[$key . '_parent'];
+                }
+            }
+
+            # 设置默认值
+            if (isset($param['default'])) {
+                $param['default'] = $this->option($param['default']);
+            }
+
+            # 处理同步
+            if (isset($param['sync']) && isset($data[$param['sync'][0]]) && strpos($key, '-')) {
+                $temp = explode('-', $key);
+                $load = Dever::load($temp[0] . '/' . $temp[1] . '-one', array('option_' . $param['sync'][1] => $data[$param['sync'][0]]));
+                $param['value'] = isset($load[$temp[2]]) ? $load[$temp[2]] : $param['default'];
+            }
+
+            $method = $param['update'];
+
+            if (is_array($method)) {
+                $c = '';
+                if (layadmin()) {
+                    $c = 'layui-tab-title';
+                }
+
+                $delete = true;
+                if (isset($param['option'])) {
+                    $delete = false;
+                    $result .= '<ul class="nav nav-tabs '.$c.'">{tab}</ul>';
+
+                    $order = array
+                    (
+                        'col'       => $key,
+                        'name'      => $param['desc'],
+                        'default'   => '1',
+                        'desc'      => $param['desc'],
+                        'match'     => 'is_string',
+                        'update'    => 'hidden',
+                        'option'    => $param['option']
+                    );
+                    array_unshift($method, $order);
+
+                    if (isset($param['value']) && $param['value']) {
+                        $value = json_decode(base64_decode($param['value']), true);
+                        $param['value'] = array();
+                        foreach ($param['option'] as $k => $v) {
+                            foreach ($value[$k-1] as $k1 => $v1) {
+                                $param['value'][$v][$k1] = $v1;
+                            }
+                        }
+                    } else {
+                        $param['value'] = array();
+                        foreach ($param['option'] as $k => $v) {
+                            $param['value'][$v][$key] = $k;
+                        }
+                    }
+
+                } else {
+                    $result .= '<ul class="nav nav-tabs '.$c.'">{tab}<li><a href="javascript:;" class="dever_form_add" toggle_key="' . $key . '">增加一条</a></li></ul>';
+
+                    $order = array
+                    (
+                        'col'       => 'order',
+                        'name'      => '排序-按照数字正序排列',
+                        'default'   => '1',
+                        'desc'      => '排序',
+                        'match'     => 'is_string',
+                        'update'    => 'text',
+                    );
+                    array_unshift($method, $order);
+                }
+
+                $tab = '';
+
+                $this->update_child(array(), $method, $key, $result, -1, $delete);
+
+                if (isset($param['value']) && $param['value']) {
+
+                    if (!is_array($param['value'])) {
+                        $param['value'] = json_decode(base64_decode($param['value']), true);
+                    }
+
+                    if (is_array($param['value'])) {
+                        $i = 0;
+                        foreach ($param['value'] as $k => $v) {
+                            $n = $k;
+                            if (is_string($k)) {
+                                $k = $i;
+                            }
+                            $this->update_child($v, $method, $key, $result, $k, $delete);
+
+                            $active = '';
+                            if ($k == 0) {
+                                $active = 'active';
+                            }
+                            if (layadmin() && $active) {
+                                $active .= ' layui-this';
+                            }
+                            $k = $k + 1;
+                            if (!is_string($n)) {
+                                $n = '第' . $k . '条';
+                            }
+                            $tab .= '<li class="' . $active . '"><a href="javascript:;" id="tab-' . $key . '-child-' . $k . '" toggle_key="' . $key . '" toggle_id="' . $k . '" toggle_child=".dever_' . $key . '_child" toggle="#' . $key . '-child-' . $k . '" onclick="showToggle($(this))">'.$n.'</a></li>';
+                            $i++;
+                        }
+                    }
+                    
+                } else {
+                    $this->update_child(array(), $method, $key, $result, 0, $delete);
+
+                    $tab = '<li class="active layui-this"><a href="javascript:;" id="tab-' . $key . '-child-1" toggle_key="' . $key . '" toggle_id="1" toggle_child=".dever_' . $param['col'] . '_child" toggle="#' . $key . '-child-1" onclick="showToggle($(this))">第1条</a></li>';
+                }
+
+                $result = str_replace('{tab}', $tab, $result);
+            } else {
+                if (isset($param['update_input']) && isset($data[$index . '_input'])) {
+                    $param['update_input_data'] = explode(',', $data[$index . '_input']);
+                }
+                $result .= Html::$method($param);
+            }
+
+            if (isset($param['desc']) && ($param['update'] == 'text' || $param['update'] == 'password')) {
+                $result .= Html::desc($param['desc']);
+            }
+        }
+    }
+
+    /**
+     * update_action
+     *
+     * @return array
+     */
+    private function update_child($data, $param, $key, &$result, $index, $delete = true)
+    {
+        $style = '';
+        if ($index != 0) {
+            $style = 'style="display:none;"';
+        }
+        $result .= '<div id="' . $key . '-child-' . ($index + 1) . '" class="dever_' . $key . '_child dever_form_add_child" ' . $style . '>';
+
+        if ($delete) {
+            $result .= '<div class="dever_form_delete">[删除]</div>';
+        }
+
+        foreach ($param as $k => $v) {
+            $v['type'] = $v['update'];
+
+            $prefix = '';
+            if ($index < 0) {
+                $v['ext'] = $key . '_c_' . $v['col'];
+                $prefix = $v['ext'];
+            } else {
+                $v['ext'] = $key . '_c_' . $index . '_i_' . $v['col'];
+                $prefix = $v['ext'];
+            }
+
+            if ($v['col'] == 'order') {
+                $v['default'] = $index+1;
+            }
+
+            
+            $class = $this->update_class($v['col'], $v, $prefix);
+
+            $result .= '<div class="form-group ' . $class . '">';
+
+            $this->update_html($v, $key, $v['col'], $data, $result);
+
+            $result .= '</div>';
+        }
+
+        $result .= '</div>';
+    }
+
+    /**
+     * update_action
+     *
+     * @return array
+     */
+    public function update_action_api()
+    {
+        $method = false;
+
+        $config = $this->config();
+
+        $input = Dever::preInput('update_');
+
+        if ($this->id) {
+            # 新增权限
+            if (Dever::load('manage/auth.oper', 3) == false) {
+                Dever::alert('你没有权限');
+            }
+
+            Dever::setInput('where_id', $this->id);
+            //Dever::setInput('update_where_id', $this->id);
+
+            $info = $this->load('one', $this->id);
+            if ($info) {
+
+                $method = 'update';
+
+                $col = Dever::input('col');
+                $value = Dever::input('value');
+
+                if ($col && $value) {
+                    $method = 'update_' . $col;
+                    //Dever::setInput('set_' . $col, $value);
+                    //Dever::setInput('update_' . $col, $value);
+
+                    $param['where_id'] = $this->id;
+                    $param['set_' . $col] = $value;
+                    $this->load($method, $param);
+
+                    $struct = $this->struct_data($config['struct'], array($col => $value));
+                    Log::add($this->project, $this->table, array('method' => $method, 'input' => $struct, 'struct' => $config['struct']), $this->id);
+
+                    Dever::out('yes');
+
+                    return;
+                }
+
+                $prefix = 'set';
+            } else {
+                $method = 'insert';
+                $prefix = 'add';
+            }
+        }
+        if (!$method) {
+            # 新增权限
+            if (Dever::load('manage/auth.oper', 4) == false) {
+                Dever::alert('你没有权限');
+            }
+
+            $method = 'insert';
+            $prefix = 'add';
+        }
+        if ($method && $input) {
+            $update = $order = array();
+            $i = 0;
+            $c = array();
+            foreach ($input as $k => $v) {
+                if ($v === '') {
+                    $v = 'null';
+                }
+                if ($v && is_string($v) && strpos($v, 'copy.') !== false) {
+                    $temp = str_replace('copy.', '', $v);
+                    if (isset($input['update_' . $temp])) {
+                        $v = $input['update_' . $temp];
+                    }
+                }
+                if (strpos($k, '_c_') !== false) {
+                    if ($v == 'null') {
+                        $v = '';
+                    }
+                    $temp = explode('_c_', $k);
+                    $k = str_replace('update_', $prefix . '_', $temp[0]);
+                    if (!isset($c[$k])) {
+                        $c[$k] = array();
+                    }
+                    if (strpos($temp[1], '_i_') !== false) {
+                        $temp = explode('_i_', $temp[1]);
+
+                        if (!isset($c[$k][$temp[1]])) {
+                            $c[$k][$temp[1]] = 0;
+                        } else {
+                            $c[$k][$temp[1]]++;
+                        }
+
+                        $num = $c[$k][$temp[1]];
+
+                        $update[$i][$k][$num][$temp[1]] = $v;
+                        if ($temp[1] == 'order') {
+                            $order[$i][$k][$num] = $v;
+                        }
+                    } else {
+                        //$update[$i][$k][$c][$temp[1]] = $v;
+                    }
+                } elseif (strpos($k, '__') !== false) {
+                    $temp1 = explode('__', $k);
+                    $temp2 = explode('_', $temp1[0]);
+                    $i = $temp2[1] - 1;
+
+                    if (strpos($k, 'where_id') !== false) {
+                        //$update[$i]['where_id'] = $v;
+                    } else {
+                        $update[$i]['add_' . $temp1[1]] = $v;
+                    }
+                } else {
+                    $ki = str_replace('update_', $prefix . '_', $k);
+
+                    if (strpos($ki, 'where_id') !== false) {
+                        if ($method != 'insert') {
+                            $update[$i]['where_id'] = $v;
+                        }
+                    } else {
+                        if (strpos($k, '-')) {
+                            $k = str_replace('update_', '', $k);
+                            if (isset($config['struct'][$k]) && isset($config['struct'][$k]['sync'])) {
+                                $s_col = $config['struct'][$k]['sync'][0];
+                                $m_col = $config['struct'][$k]['sync'][1];
+                                if ($s_col == 'id') {
+                                    $s_value = $this->id;
+                                } else {
+                                    $s_one = $this->load('one', $this->id);
+                                    $s_value = $s_one[$s_col];
+                                }
+                                $temp = explode('-', $k);
+                                $index = $temp[0] . '/' . $temp[1];
+
+                                $update_other_set[$index]['set_' . $temp[2]] = $v;
+                                //$update_other_set[$index]['set_' . $m_col] = $s_value;
+
+                                $update_other_add[$index]['add_' . $temp[2]] = $v;
+                                $update_other_add[$index]['add_' . $m_col] = $s_value;
+
+                                $update_other_id[$index]['option_' . $m_col] = $s_value;
+                            }
+                        } else {
+                            if (is_array($v)) {
+                                $k = str_replace('update_', '', $k);
+                                $kd = $k . '_id';
+                                if (isset($config['struct'][$kd])) {
+                                    foreach ($v as $vk => $vt) {
+                                        if ($vt == -1) {
+                                            if ($vk != 0) {
+                                                unset($v[$vk]);
+                                            }
+                                        }
+                                    }
+                                    if ($v) {
+                                        $vd = end($v);
+                                        $kdi = $prefix . '_' . $kd;
+                                        $update[$i][$kdi] = $vd;
+                                    }
+                                }
+                                if (isset($config['struct'][$k]) && strpos($config['struct'][$k]['type'], 'int') !== false) {
+                                    $v = end($v);
+                                }
+                            }
+                            $update[$i][$ki] = $v;
+                        }
+                    }
+                }
+            }
+
+            //print_r($update_other_set);die;
+            //print_r($input);
+            //print_r($update_other);die;
+            //print_r($config['struct']);die;
+            # 增加复制的数量
+            $copy_num = Dever::input('copy_num');
+            if ($copy_num > 0) {
+                $update[0]['where_id'] = 0;
+                for ($i = 1; $i < $copy_num; $i++) {
+                    $update[$i] = $update[0];
+                    # 缓存处理
+                    $update[$i]['rank'] = $i;
+                }
+            }
+
+            if ($this->id && !$info) {
+                $update[0]['add_id'] = $this->id;
+            }
+            //print_r($update);die;
+            foreach ($update as $k => $v) {
+                $method = 'insert';
+                $old = array();
+                if (isset($v['where_id']) && $v['where_id']) {
+                    $method = 'update';
+                    $old = $this->load('one', $v['where_id']);
+                }
+                if (isset($order[$k])) {
+                    foreach ($order[$k] as $i => $j) {
+                        array_multisort($j, SORT_ASC, $v[$i]);
+                    }
+                }
+                if (isset($v['set_password']) && (!$v['set_password'] || $v['set_password'] == 'null')) {
+                    unset($v['set_password']);
+                }
+                $id = $this->load($method, $v);
+
+                if ($id) {
+                    $struct = $this->struct_data($config['struct'], $v, $old);
+                    Log::add($this->project, $this->table, array('method' => $method, 'input' => $struct), $this->id ? $this->id : $id);
+                }
+
+                if (isset($update_other_id) && $update_other_id) {
+                    foreach ($update_other_set as $k => $v) {
+                        $check = Dever::load($k . '-one', $update_other_id[$k]);
+                        //print_r($check);die;
+                        if ($check) {
+                            $v['where_id'] = $check['id'];
+                            Dever::load($k . '-update', $v);
+                        } else {
+                            Dever::load($k . '-insert', $update_other_add[$k]);
+                        }
+                    }
+                }
+            }
+        }
+
+        Dever::out('yes');
+    }
+
+    private function struct_data($struct, $data, $old = array())
+    {
+        $log = $tlog = array();
+        foreach ($struct as $i => $j) {
+            if (isset($j['list_name'])) {
+                $j['name'] = $j['list_name'];
+            } elseif (strpos($j['name'], '-')) {
+                $temp = explode('-', $j['name']);
+                $j['name'] = $temp[0];
+            }
+
+            if (isset($j['list_table'])) {
+                $j['list'] = $j['list_table'];
+                if ($j['list'] == false) {
+                    $data[$i] = false;
+                }
+            }
+
+            $list = (isset($j['list']) && is_string($j['list']) && $j['list'] != 'table');
+
+            if (isset($data['where_' . $i]) && $data['where_' . $i]) {
+                $log[$j['name']] = $data['where_' . $i];
+            } elseif (isset($data['set_' . $i]) && $data['set_' . $i]) {
+                $log[$j['name']] = $data['set_' . $i];
+            } elseif (isset($data['add_' . $i]) && $data['add_' . $i]) {
+                $log[$j['name']] = $data['add_' . $i];
+            } elseif (isset($data[$i]) && $data[$i]) {
+                $log[$j['name']] = $list ? $this->value($j['list'], $data) : $data[$i];
+            }
+
+            if (isset($log[$j['name']])) {
+                $tlog[$j['name']] = $log[$j['name']];
+                if (is_array($tlog[$j['name']])) {
+                    if (isset($tlog[$j['name']][0]) && is_array($tlog[$j['name']][0])) {
+                        $tlog[$j['name']] = json_encode($tlog[$j['name']]);
+
+                        if (isset($old[$i]) && is_array($old[$i])) {
+                            $old[$i] = json_encode($old[$i]);
+                        }
+
+                    } elseif (isset($tlog[$j['name']][0])) {
+                        $tlog[$j['name']] = implode(',', $tlog[$j['name']]);
+
+                        if (isset($old[$i]) && is_array($old[$i])) {
+                            $old[$i] = implode(',', $old[$i]);
+                        }
+                    }
+                } elseif (strpos($log[$j['name']], 'http://wx.qlogo.cn/') !== false || strpos($log[$j['name']], '.jpg') !== false || strpos($log[$j['name']], '.gif') !== false || strpos($log[$j['name']], '.png') !== false) {
+                    $log[$j['name']] = '<img layer-src="' . $log[$j['name']] . '" src="' . $log[$j['name']] . '" width="150">';
+
+                    if (isset($old[$i]) && $old[$i]) {
+                        $old[$i] = '<img layer-src="' . $old[$i] . '" src="' . $old[$i] . '" width="150">';
+                    }
+
+                } elseif (is_numeric($log[$j['name']]) && (strpos($i, 'time') !== false || strpos($i, 'date') !== false)) {
+                    $log[$j['name']] = date("Y-m-d H:i:s", $log[$j['name']]);
+                    if (isset($old[$i]) && $old[$i]) {
+                        $old[$i] = date("Y-m-d H:i:s", $old[$i]);
+                    }
+                } elseif (isset($j['decode'])) {
+                    $log[$j['name']] = json_decode(base64_decode($log[$j['name']]), true);
+
+                    if (isset($old[$i]) && $old[$i]) {
+                        $old[$i] = json_decode(base64_decode($old[$i]), true);
+                    }
+                }
+
+                if (isset($j['option']) && !$list) {
+                    $name = array();
+                    $option = $this->option($j['option']);
+
+                    if (is_array($option)) {
+                       foreach ($option as $a => $b) {
+                            if (!is_array($log[$j['name']])) {
+                                if ($a == $log[$j['name']]) {
+                                    $name[] = (is_array($b) && isset($b['name'])) ? $b['name'] : $b;
+                                }
+                            } elseif (in_array($a, $log[$j['name']])) {
+                                $name[] = (is_array($b) && isset($b['name'])) ? $b['name'] : $b;
+                            }
+                        }
+                    }
+                    
+
+                    $log[$j['name']] = implode(',', $name);
+                }
+
+                if (isset($old[$i]) && $old[$i] != $tlog[$j['name']]) {
+                    $log[$j['name']] = array('old' => $old[$i], 'new' => $log[$j['name']]);
+                }
+            }
+        }
+
+        return $log;
+    }
+
+    /**
+     * delete_action
+     *
+     * @return array
+     */
+    public function delete_action_api()
+    {
+        if (Dever::load('manage/auth.oper', 5) == false) {
+            Dever::alert('您没有权限');
+        }
+
+        $config = $this->config();
+        if (isset($config['manage']['delete']) && $config['manage']['delete'] === 2) {
+            $this->load('delete', array('where_id' => $this->id));
+        } elseif (isset($config['struct']['state']) && (!isset($config['manage']['delete']) || (isset($config['manage']['delete']) && $config['manage']['delete']))) {
+            $this->load('update', array('where_id' => $this->id, 'state' => 2));
+        }
+        return 'reload';
+        return 'reloaderror';
+    }
+
+    /**
+     * recovery_action
+     *
+     * @return array
+     */
+    public function recovery_action_api()
+    {
+        if (Dever::load('manage/auth.oper', 5) == false) {
+            Dever::alert('您没有权限');
+        }
+
+        $this->load('update', array('where_id' => $this->id, 'state' => 1));
+
+        return 'reload';
+    }
+
+    /**
+     * stat 为主动统计提供相关数据
+     *
+     * @return array
+     */
+    public function stat()
+    {
+        //bundle 包依赖工具
+        $config = $this->config();
+
+        if (empty($config['manage']['stat'])) {
+            Dever::alert('该项目主动统计功能未开放');
+        }
+
+        $data = $config['manage'];
+
+        $data['table'] = '';
+
+        $method = $this->project . '/' . $this->table . '-all';
+
+        $gp = Dever::input('gp', 'month,day');
+
+        $col = is_string($gp) ? explode(',', $gp) : $gp;
+
+        $data['search'] = $this->stat_search($config['struct'], $gp, $config['manage']['stat'], $config['manage']['search']);
+
+        foreach ($col as $k => $v) {
+            $this->stat_data($data, $config['struct'], $v, $method);
+        }
+
+        return $data;
+    }
+
+    /**
+     * stat 为主动统计提供导出数据 后续优化
+     *
+     * @return array
+     */
+    public function stat_excel()
+    {
+        Dever::$global['base']['excel'] = 1;
+        //print_r($data['thead']);die;
+        $data = $this->stat();
+        if ($data && isset($data['list'])) {
+            $xls = new \PHPExcel();
+
+            $xls->getProperties()->setCreator("Maze Stat Excel")
+                ->setLastModifiedBy("Maze Stat Excel")
+                ->setTitle("Office 2007 XLSX Maze Document")
+                ->setSubject("Office 2007 XLSX Maze Document")
+                ->setDescription("Mazephp Stat Excel")
+                ->setKeywords("Mazephp Stat Excel")
+                ->setCategory("Mazephp Stat Excel");
+
+            $info = $this->info();
+
+            $name = $info['list_header'] . '的' . $info['stat_desc'] . '-' . $info['project_name'];
+
+            $start = 65;
+
+            $s = 0;
+            foreach ($data['thead'] as $k => $v) {
+                if ($s > 0) {
+                    $xls->createSheet();
+                }
+
+                $act = $xls->setActiveSheetIndex($s);
+                $act->setTitle($v[0]);
+
+                $s++;
+                $i = 0;
+                foreach ($v as $kj => $vj) {
+                    $num = 1;
+                    $cell = $this->_getChr($start, $i);
+                    $act->setCellValue($cell . '' . $num, $vj);
+                    $act->getColumnDimension($cell)->setWidth(20);
+                    $i++;
+
+                    if (isset($data['list'][$k])) {
+                        foreach ($data['list'][$k] as $ki => $vi) {
+                            if (isset($vi[$kj])) {
+                                $num += 1;
+                                $act->setCellValue($cell . $num, $vi[$kj]);
+                            }
+                        }
+                    }
+                }
+            }
+
+            //$act->getStyle('A1:'.$k.'20')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);   // 垂直居中
+            //$act->getStyle('A1:'.$k.'20')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);// 水平居中
+            $xls->setActiveSheetIndex(0);
+
+            $filename = $name . '.xlsx';
+            header('Pragma: public');
+            header('Expires: 0');
+            header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
+            header('Content-Type:application/force-download');
+            header('Content-Type:application/vnd.ms-execl');
+            header('Content-Type:application/octet-stream');
+            header('Content-Type:application/download');
+            header("Content-Disposition:attachment;filename='" . $filename . "'");
+            header('Content-Transfer-Encoding:binary');
+
+            $write = \PHPExcel_IOFactory::createWriter($xls, 'Excel2007');
+            $write->save('php://output');
+        }
+    }
+
+    /**
+     * stat_search
+     *
+     * @return mixed
+     */
+    private function stat_search($struct, $col, $stat, $search)
+    {
+        unset($struct['id']);
+        unset($struct['cdate']);
+
+        if ($stat) {
+            $stat = explode(',', $stat);
+            foreach ($stat as $k => $v) {
+                if (isset($struct[$v])) {
+                    unset($struct[$v]);
+                }
+            }
+        }
+
+        $struct['day']['name'] = '天';
+        $struct['month']['name'] = '月';
+        $struct['year']['name'] = '年';
+        $param['update'] = 'checkbox';
+        $param['name'] = 'gp';
+        $param['value'] = $col;
+        $param['option'] = $struct;
+
+        $html = '<form action="' . $this->url('stat') . '" method="post" id="f1">';
+        $html .= '<div class="form-group">';
+        $html .= Html::pageLeft(array('name' => '统计项', 'col' => 'col'));
+        $html .= Html::radio($param);
+        $html .= '</div>';
+
+        $input = Dever::preInput('search_');
+
+        if (isset($search['date'])) {
+            foreach ($search['date'] as $k => $v) {
+                $html .= '<div class="form-group">';
+                $this->list_search_time($html, $input, 'search_', $k, $v, 'date');
+                $html .= '</div>';
+            }
+
+            $input = Dever::preInput('search_');
+
+            if ($input) {
+                foreach ($input as $k => $v) {
+                    if ($v && strpos($k, 'option_') !== false) {
+                        Dever::setInput(str_replace('search_', '', $k), $v);
+                    }
+                }
+            }
+        }
+
+        if (isset($search['fulltext'])) {
+            $html .= '<div class="form-group">';
+            $this->list_search_select($html, $input, 'search_fulltext', '选择检索项', $search['fulltext']);
+
+            $this->list_search_select($html, $input, 'search_fulltext_type', '', array
+                (
+                    1 => '精确匹配',
+                    2 => '模糊匹配',
+                    3 => '大于',
+                    4 => '大于等于',
+                    5 => '小于',
+                    6 => '小于等于',
+                ), 1);
+
+            $value = array();
+            $value['name'] = 'search_fulltext_value';
+            $value['class'] = 'form-control';
+            if (isset($input[$value['name']])) {
+                $value['value'] = $input[$value['name']];
+
+                $fix = '';
+                if ($input['search_fulltext_type'] == 2) {
+                    $fix = '%';
+                }
+
+                Dever::setInput('option_' . $input['search_fulltext'], $fix . $value['value'] . $fix);
+
+                //print_r(Dever::input('option_name'));die;
+            }
+            $html .= Html::text($value, false);
+            $html .= '</div>';
+        }
+
+        $html .= '<input type="hidden" name="excel" id="excel"  value="2"><a href="javascript:;" class="btn btn-primary" onclick="$(\'#f1\').attr(\'action\', \'' . $this->url('stat') . '\').submit();">确定</a>';
+
+        $html .= '&nbsp;&nbsp;<a href="javascript:;" class="btn btn-warning" onclick="$(\'#f1\').attr(\'action\', \'' . $this->url('stat_excel') . '\').submit();">下载报表</a>';
+
+        $html .= '</form>';
+
+        return $html;
+    }
+
+    /**
+     * stat_data
+     *
+     * @return mixed
+     */
+    private function stat_data(&$data, $struct, $col, $method)
+    {
+        Dever::setInput('group', $col);
+        switch ($col) {
+            case 'year':
+                $name = '按年统计';
+                break;
+            case 'month':
+                $name = '按月统计';
+                break;
+            case 'day':
+                $name = '按天统计';
+                break;
+            default:
+                $name = $struct[$col]['name'];
+                break;
+        }
+        $list = Dever::load($method, array('group' => $col, 'col' => 'count(1) as total,id'));
+
+        $data['table'] .= '<div style="overflow-y:auto;width:100%;max-height:600px;"><table class="table table-bordered table-striped">';
+
+        $data['table'] .= '<thead><tr><th>' . $name . '</th><th>统计数字</th></tr></thead>';
+
+        $data['thead'][$col] = array($name, '统计数字');
+
+        if ($list) {
+            $data['table'] .= '<tbody>';
+            $total = 0;
+            foreach ($list as $k => $v) {
+                if (isset($v[$col])) {
+                    if (isset($struct[$col]['option'])) {
+                        $option = $this->option($struct[$col]['option']);
+                        if (isset($option[$v[$col]])) {
+                            $v[$col] = $option[$v[$col]];
+                            if (is_array($v[$col])) {
+                                $v[$col] = $v[$col]['name'];
+                            }
+                        }
+                    }
+
+                    $data['table'] .= '<tr><td width="60%" style="word-break:break-all;word-wrap:break-word;">' . $v[$col] . '</td><td>' . $v['total'] . '</td></tr>';
+                    $total += $v['total'];
+
+                    $data['list'][$col][] = array($v[$col], $v['total']);
+                }
+
+            }
+
+            $data['table'] .= '</tbody>';
+
+            if ($total > 0 && $k > 0) {
+                $data['table'] .= '<tr><td style="font-weight:bold">汇总</td><td style="font-weight:bold">' . $total . '</td></tr>';
+                $data['list'][$col][] = array('汇总', $total);
+            }
+
+        }
+
+        $data['table'] .= '</table></div>';
+    }
+
+    /**
+     * load
+     *
+     * @return mixed
+     */
+    private function load($method = 'one', $param = array())
+    {
+        return Dever::load($this->project . '/' . $this->table . '-' . $method, $param);
+    }
+
+    /**
+     * __call
+     *
+     * @return object
+     */
+    public function __call($method, $param)
+    {
+        if (strpos($method, 'html_') !== false) {
+            return Html::text($param);
+        }
+
+        return $this;
+    }
+
+    /**
+     * option
+     *
+     * @return string
+     */
+    private function option($option, $value = false)
+    {
+        if (is_object($option)) {
+            $function = $option;
+            $option = $function();
+        }
+
+        if ($value && is_array($value)) {
+            $state = false;
+            foreach ($value as $k => $v) {
+                if ($v === true) {
+                    $state = true;
+                    break;
+                }
+            }
+            if ($state) {
+                $option = array_intersect_key($option, $value);
+            } else {
+                $option = $value;
+            }
+        }
+
+        return $option;
+    }
+
+    /**
+     * option
+     *
+     * @return string
+     */
+    public function manage()
+    {
+        $config = $this->config();
+
+        return $config;
+    }
+
+    /**
+     * valid
+     *
+     * @return string
+     */
+    public function valid()
+    {
+        //http://placehold.it/350x150
+        $config = $this->config();
+        if (isset($config['struct'])) {
+            $rule = array();
+            $rule['required']['regex'] = 'none';
+            $rule['required']['alertText'] = '此项不能为空';
+            $rule['required']['alertTextCheckboxMultiple'] = '请选择一个选项';
+            $rule['required']['alertTextCheckboxe'] = '请选择一个选项';
+            $rule['required']['alertTextDateRange'] = '日期范围不可空白';
+
+            foreach ($config['struct'] as $k => $v) {
+                if (isset($v['match']) && $v['match'] != 'option' && is_string($v['match']) && strpos($v['match'], '/') !== false) {
+                    if (strstr($v['match'], 'option||')) {
+                        $v['match'] = str_replace('option||', '', $v['match']);
+                    }
+                    $rule[$k]['regex'] = $v['match'];
+                    $rule[$k]['alertText'] = $v['desc'];
+                }
+            }
+        }
+
+        $script = '<script>';
+
+        //参考https://blog.csdn.net/wangzl1163/article/details/51071826
+        //http://code.ciaoca.com/jquery/validation-engine/demo/demoOnForm
+        $script .= '(function($){
+        $.fn.validationEngineLanguage = function(){
+        };
+        $.validationEngineLanguage = {
+            newLang: function(){
+                $.validationEngineLanguage.allRules = ';
+        //此处进行了转义过滤,其实也可以使用json_encode的第二个参数,不过只支持5.4以上版本,考虑到虚拟主机就放弃了
+        $script .= str_replace(array('\\\\', '\\/', '"/', '/"', '/u"', '/g"', '/i"', '\x{4e00}-\x{9fa5}', '\x'), array('\\', '/', '/', '/', '/u', '/g', '/i', '\u4e00-\u9fa5', '\u'), json_encode($rule)) . ';';
+        $script .= '}
+            };
+            $.validationEngineLanguage.newLang();
+        })(jQuery);';
+        $script .= '$(document).ready(function(){
+        $(".form1").validationEngine("attach",{onSuccess:function(){submit();},onFailure:function(){submit();}});
+        });';
+        $script .= '</script>';
+
+        //print_r($script);die;
+
+        return $script;
+    }
+
+    /**
+     * save
+     *
+     * @return string
+     */
+    public function save()
+    {
+        $config = $this->config();
+
+        if (isset($config['manage']['save'])) {
+            return 'yes';
+        }
+
+        return 'no';
+    }
+}

+ 358 - 0
src/Doc.php

@@ -0,0 +1,358 @@
+<?php
+namespace Manage\Src;
+
+use Dever;
+
+class Doc
+{
+    private $data;
+
+    public function __construct()
+    {
+        $this->load();
+    }
+
+    public function nav()
+    {
+        return $this->data['nav'];
+    }
+
+    public function info()
+    {
+        return $this->data['nav'][$this->db];
+    }
+
+    public function doc()
+    {
+        return $this->doc;
+    }
+
+    public function menu()
+    {
+        return $this->data['data'];
+    }
+
+    private function load()
+    {
+        $this->type = Dever::input('type', 'db');
+
+        $this->db = Dever::input('db');
+
+        $type = 'load_' . $this->type;
+
+        $this->$type();
+    }
+
+    private function create_nav($list, $num = 0)
+    {
+        $this->data['nav'] = array();
+
+        $i = 0;
+        foreach ($list as $k => $v) {
+            if ($v['order'] > $num) {
+                if (!$this->db && $i == 0) {
+                    $this->db = $k;
+                }
+                $this->data['nav'][$k] = array
+                (
+                    'name' => $v['lang'],
+                    'link' => Dever::url('doc/view?type=' . $this->type . '&db=' . $k, 'manage'),
+                    'class' => $this->db == $k ? 'active' : '',
+                );
+                $i++;
+            }
+        }
+        if (!$this->data['nav']) {
+            Dever::alert('没有该数据项');
+        }
+    }
+
+    private function load_db()
+    {
+        $list = Dever::load('manage/project.get');
+
+        $this->create_nav($list);
+
+        if (isset($this->data['nav'][$this->db])) {
+            $this->doc = '介绍' . $this->data['nav'][$this->db]['name'] . '项目下的数据结构与对外的数据接口';
+
+            $database = Dever::load('manage/database');
+            $data = $database->config($this->db);
+            $this->data['data'] = array();
+
+            $table = array
+            (
+                '方法名' => '参数',
+                '查询表中所有数据(all)' => array
+                (
+                    'option_col' => '可选参数,col换成表的字段',
+                ),
+                '查询表中一条数据(one)' => array
+                (
+                    'where_id' => '必填参数,表主键',
+                ),
+                '插入数据(insert)' => array
+                (
+                    'add_col' => '必填参数,col换成表的字段',
+                ),
+                '删除数据(delete)' => array
+                (
+                    'where_id' => '必填参数,表主键',
+                ),
+                '更新数据(update)' => array
+                (
+                    'where_id' => '必填参数,表主键',
+                    'set_col' => '必填参数,col换成表的字段',
+                ),
+            );
+
+            $this->data['data']['api']['name'] = '通用数据接口';
+            $this->data['data']['api']['content'] = '<pre>所有数据接口,均使用:Dever::db("项目名/表名")->方法名(参数)调取<br />例如:Dever::db("manage/role")->all(array("option_name" => "超级管理员"))</pre>';
+
+            $this->data['data']['api']['content'] .= Dever::table($table);
+
+            foreach ($data as $k => $v) {
+                $this->data['data'][$k]['content'] = '<h3>数据结构:</h3>';
+                $this->data['data'][$k]['content'] .= $v['manage']['struct'];
+                //$this->data['data'][$k]['name'] = $v['lang'];
+                //$this->data['data'][$k]['name'] = $this->db . '_' . $v['name'] . '('.$v['lang'].'表)';
+                $this->data['data'][$k]['name'] = $v['name'] . '(' . $v['lang'] . '表)';
+
+                unset($v['request']['list']);
+
+                if (isset($v['request']) && $v['request']) {
+                    $this->data['data'][$k]['content'] .= '<h3>数据接口:</h3>';
+                    $this->data['data'][$k]['content'] .= Dever::table($v['request']);
+                }
+            }
+
+            return $this->data['data'];
+        }
+
+        return array();
+    }
+
+    private function load_mysql()
+    {
+        $list = array
+            (
+            'guifan' => array
+            (
+                'lang' => '规范',
+                'order' => 1,
+            ),
+
+            'sql' => array
+            (
+                'lang' => '优化',
+                'order' => 1,
+            ),
+
+            'example' => array
+            (
+                'lang' => '样例',
+                'order' => 1,
+            ),
+
+            'function' => array
+            (
+                'lang' => '常用函数',
+                'order' => 1,
+            ),
+        );
+
+        $this->create_nav($list);
+
+        if (isset($this->data['nav'][$this->db])) {
+            $this->doc = '介绍Mysql' . $this->data['nav'][$this->db]['name'] . '里的一些常见问题';
+
+            $this->data['data'] = array();
+
+            $data['guifan'] = array
+            (
+                'mm' => array
+                (
+                    'name' => '命名和编码',
+                    'content' => '<pre>
+库名、表名、字段名必须使用小写字母,多个单词用“_”分割(例如表名:user_comment)
+
+库名、表名、字段名称禁止使用mysql保留字命名 ,比如:select,insert,order,group,delete,limit等等
+
+建库和建表的编码和字符集分别是utf8和utf8_general_ci
+
+使用dever建立表时,请遵守dever框架规范
+					</pre>',
+                ),
+
+                'sql' => array
+                (
+                    'name' => '建库建表',
+                    'content' => "<pre>
+表类型如果读多写极少(比如文章)可以用myisam;读写都较多或者需要用到事物的情况用innodb;
+
+其它情况两个都可以选择
+
+字段必须有详细注释,并且有多值的字段要列出所有值的含义(比如状态status字段)
+
+字段必须为NOT NULL和设置default
+
+字段固定长度的短字符用char(例如md5后的密码),长度不固定的用varchar,char或者varchar能满足的不要使用text
+
+大字段类型要慎用(TEXT、BLOB等等)
+
+字段能用int类型都使用int型存储
+
+<pre>例如:
+IP可转换成int后存储
+日期和时间可用int存储
+enum类型可使用tinyint存储</pre>
+密码字段不能明文存储
+
+建表就得考虑索引,而不是发现sql慢了才加索引
+
+单个表字段一般情况下最多不能超过30个字段(可将大字段和不常用的字段拆分到新表中)
+
+建表Demo:
+					<pre>
+CREATE TABLE `user_base` (
+`id`  int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户 ID' ,
+`username`  char(50) NOT NULL DEFAULT ' ' COMMENT '用户名' ,
+`password`  char(32) NOT NULL DEFAULT ' ' COMMENT '密码' ,
+`email`  char(50) NOT NULL DEFAULT ' ' COMMENT '电子邮件' ,
+`regdate`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '注册日期' ,
+`last_login_ip`  int(11) NOT NULL DEFAULT 0 COMMENT '最后登录IP' ,
+`status`  tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态:1正常;2已删除;' ,
+PRIMARY KEY (`id`),
+UNIQUE INDEX `uniq_username` (`username`) USING BTREE
+)
+ENGINE=MyISAM
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='用户基本表'
+AUTO_INCREMENT=1
+					</pre>
+					</pre>",
+                ),
+            );
+
+            if (!isset($data[$this->db])) {
+                Dever::alert('没有该数据项');
+            }
+            $this->data['data'] = $data[$this->db];
+
+            return $this->data['data'];
+        }
+
+        return array();
+    }
+
+    private function load_api()
+    {
+        $data = Dever::load('manage/api-getAll');
+
+        if (isset($data['manage'])) {
+            unset($data['manage']);
+        }
+
+        $keys = array_keys($data);
+
+        $list = array();
+
+        $project = Dever::load('manage/project.get');
+
+        foreach ($keys as $k => $v) {
+            if (isset($project[$v])) {
+                $list[$v] = $project[$v];
+            }
+        }
+
+        $this->create_nav($list, -50);
+
+        if (isset($this->data['nav'][$this->db]) && isset($data[$this->db])) {
+            $this->doc = '介绍' . $this->data['nav'][$this->db]['name'] . '项目下的对外接口';
+            $config = Dever::db('manage/api')->config;
+            $type = $config['gettype'];
+            $doc = $config['doc'];
+            $html = $config['html'];
+
+            $this->data['data'] = array();
+
+            $this->data['data']['api']['name'] = '公共参数说明';
+            $this->data['data']['api']['content'] = '<pre>加密共有两种方式:<br />1、请求加密:所有传输参数均要进行加密,通过token加密,加密方法如下:<br />' . $doc . '<br /><br />2、登录加密:由服务端生成signature,然后客户端保存此signature,每次客户端向服务端请求,均需要传输signature,本方式适用移动端登录状态。signature中自带uid。</pre>';
+
+            $this->data['data']['api']['content'] .= $html;
+            $this->class = Dever::load('manage/api');
+            $url = Dever::url('manage/api.update_col');
+            foreach ($data[$this->db] as $k => $v) {
+
+                $one = array
+                (
+                    'option_api_id' => $v['id'],
+                    'option_parent_id' => -1,
+                );
+                $requestData = Dever::db('manage/api_request')->all($one);
+                $responseData = Dever::db('manage/api_response')->all($one);
+                $request = $this->class->showTable($requestData, $url, 'api_request');
+                $response = $this->class->showTable($responseData, $url, 'api_response');
+                $this->data['data'][$k]['content'] = '<h3>接口类型:</h3>';
+                $this->data['data'][$k]['content'] .= '<pre>' . ($v['type'] == 1 ? 'get' : 'post') . '</pre>';
+                $this->data['data'][$k]['content'] .= '<h3>接口地址:</h3>';
+
+                $this->data['data'][$k]['content'] .= '<pre>' . Dever::url($v['site'], $v['project']) . '</pre>';
+
+                $this->data['data'][$k]['content'] .= '<h3>请求参数:</h3>';
+                $this->data['data'][$k]['content'] .= (strip_tags($request) ? $request : '空');
+
+                //$this->data['data'][$k]['content'] .= $this->loadApiData($url, 'request', $requestData));
+
+                $this->data['data'][$k]['content'] .= '<h3>返回参数:</h3>';
+                $this->data['data'][$k]['content'] .= $response;
+
+                $this->data['data'][$k]['content'] .= $this->loadApiData($url, 'response', $responseData);
+
+                $v['name'] = '<span class="edit" data-col="name" data-url="'.$url.'" data-id="'.$v['id'].'" data-type="api" >' . $v['name'] . '</span>';
+
+                $this->data['data'][$k]['name'] = $v['name'];
+            }
+
+            return $this->data['data'];
+        }
+
+        return array();
+    }
+
+    private function loadApiData($url, $key, $data, $num = 3, $name = '')
+    {
+        $num = $num-1;
+        return $this->loadApiDataOne($key, $url, $data, $num, $name);
+    }
+
+    private function loadApiDataOne($key, $url, $data, $num, $name = '')
+    {
+        $result = '';
+        foreach ($data as $k => $v) {
+            if (strpos($v['desc'], 'array') !== false) {
+                $one = array
+                (
+                    'option_parent_id' => $v['id'],
+                );
+                $all = Dever::db('manage/api_' . $key)->all($one);
+                if ($all) {
+                    $table = $this->class->showTable($all, $url, 'api_' . $key);
+
+                    if ($name) {
+                        $name .= '.';
+                        $name = str_replace('..', '.', $name);
+                    }
+                    $result .= '<h3>'. $name . $v['name'].':</h3>';
+                    $result .= $table;
+
+                    if ($num > 0) {
+                        $result .= $this->loadApiData($url, $key, $all, $num, $name . $v['name']);
+                    }
+                }
+            }
+        }
+
+        return $result;
+    }
+}

+ 100 - 0
src/Filter.php

@@ -0,0 +1,100 @@
+<?php
+namespace Manage\Src;
+
+use Dever;
+
+class Filter
+{
+    /**
+     * tool 过滤工具包,可以同时有多个过滤工具包,如保10洁等,系统自带了一个自定义的过滤工具
+     *
+     * @var array
+     */
+    private $tool = array();
+
+    /**
+     * setTool
+     *
+     * @return mixed
+     */
+    public function setTool($tool)
+    {
+        $this->tool = $tool;
+    }
+
+    /**
+     * init
+     *
+     * @return mixed
+     */
+    private function init()
+    {
+        if (!$this->tool) {
+            $this->tool = Dever::config('base')->filter ? Dever::config('base')->filter : false;
+        }
+    }
+
+    /**
+     * __call
+     *
+     * @return mixed
+     */
+    public function handle($param)
+    {
+        $this->init();
+
+        $table_id = $param[2]['project'] . '.' . $param[2]['table'] . '.' . $param[0];
+
+        $content = base64_encode(json_encode($param));
+        Dever::load('manage/filter_task-insert', array('add_name' => $table_id, 'add_content' => $content));
+    }
+
+    /**
+     * cron
+     *
+     * @return mixed
+     */
+    public function cron()
+    {
+        $this->init();
+
+        if (!$this->tool) {
+            return;
+        }
+
+        $data = Dever::load('manage/filter_task-data');
+
+        if ($data) {
+            $keys = implode(',', array_keys($data));
+            Dever::load('manage/filter_task-dels', $keys);
+
+            foreach ($this->tool as $k => $v) {
+                $class = 'DeverApp\\Manage\\Filter\\' . $k;
+                foreach ($data as $i => $j) {
+                    list($project, $table, $id) = explode('.', $j['name']);
+                    $content = json_decode(base64_decode($j['content']));
+                    $class::cron($v, $content[1], $project, $table, $id, $j['name']);
+                }
+            }
+        }
+    }
+
+    /**
+     * callback
+     *
+     * @return mixed
+     */
+    public function callback()
+    {
+        $this->init();
+
+        if (!$this->tool) {
+            return;
+        }
+
+        foreach ($this->tool as $k => $v) {
+            $class = 'DeverApp\\Manage\\Filter\\' . $k;
+            $class::callback($v);
+        }
+    }
+}

+ 82 - 0
src/Filter/Bao10jie.php

@@ -0,0 +1,82 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| log.php 后台操作日志
+|--------------------------------------------------------------------------
+*/
+namespace DeverApp\Manage\Filter;
+
+use Dever;
+
+require_once(dirname(__FILE__).'/bao10jie/BCPurifyClient.php');
+require_once(dirname(__FILE__).'/bao10jie/BCPurifyItem.php');
+require_once(dirname(__FILE__).'/bao10jie/BCPurifyResult.php');
+
+class Bao10jie
+{
+	static public function cron($config, $content, $project, $table, $id, $ids)
+	{
+		$data = parse_str($content);
+		$param[0]['isBatch'] = 1;
+		$param[0]['appType'] = $project;
+		$param[0]['textId'] = $ids;
+		$param[0]['threadId'] = '';
+		$param[0]['class'] = '';
+		$param[0]['ip'] = Dever::ip();
+		$param[0]['userId'] = '';
+		$param[0]['author'] = '';
+		$param[0]['title']= isset($data['dever_name']) ? $data['dever_name'] : '';
+		$param[0]['text'] = $content;
+		$param[0]['url'] = '';
+		$param[0]['pubDate'] = date('Y-m-d H:i:s');
+		$param[0]['authorEx'] = '';
+		$param[0]['contentEx'] = '';
+		$param[0]['structureEx'] = '';
+		$param[0]['rules'] = '';
+
+		$state = self::run($param, 'Purify');
+
+		if($state == 1)
+		{
+			self::delete($project, $table, $id);
+		}
+	}
+
+	static public function delete($project, $table, $id)
+	{
+		Dever::load($project . '/' . $table . '-update', array('where_id' => $id, 'set_state' => 2));
+	}
+
+	static private function run($param, $task)
+	{
+		// TODO Auto-generated method stub
+		$item = new BCPurifyItem();
+		$item->m_hlParmas = $param;	
+		$client = new BCPurifyClient();
+		//	Purify/Feedback/getNotify/getIndexResult
+		$result = $client->{$task}($item);		
+		if (!$result) {
+			//客户端内部错误,返回字段校验错误(例:appType cannot be empty)或网络请求错误(例:http code:404)
+			$error .= $client->getError();
+			//ErrorLog::addLog($error, 'systemError');
+			return -1;
+			
+		}elseif ($result->isBusinessSuccess()){
+			//成功时取结果集,返回数组对象
+			if ($result->getMarkResult() != null) {
+				$status = $result->getMarkResult();
+				return (int)$status->flag;
+			}else {
+				$error .= var_export($param, true);
+				//ErrorLog::addLog($error, 'unknowError');
+				return -2;
+			}
+		}else {
+			//失败时取结果集
+			$status = (array)$result->getMarkResult();
+			$error .= var_export($status, true);
+			//ErrorLog::addLog($error, 'verifyError');
+			return -3;
+		}
+	}
+}

+ 40 - 0
src/Filter/Manage.php

@@ -0,0 +1,40 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| log.php 后台操作日志
+|--------------------------------------------------------------------------
+*/
+namespace DeverApp\Manage\Filter;
+
+use Dever;
+
+class Manage
+{
+	static public function cron($config, $content, $project, $table, $id, $ids)
+	{
+		$data = Dever::load('manage/filter-all');
+		if($data)
+		{
+			foreach($data as $k => $v)
+			{
+				/*
+				if(strpos($v['name'], ','))
+				{
+					$temp = explode(',', $v['name']);
+				}
+				*/
+				if(strpos($content, $v['name']) !== false)
+				{
+					self::delete($project, $table, $id);
+
+					Dever::load('manage/filter-up', array('where_id' => $v['id']));
+				}
+			}
+		}
+	}
+
+	static public function delete($project, $table, $id)
+	{
+		Dever::load($project . '/' . $table . '-update', array('where_id' => $id, 'set_state' => 2));
+	}
+}

+ 462 - 0
src/Filter/bao10jie/BCPurifyClient.php

@@ -0,0 +1,462 @@
+<?php
+/**
+ * BCPurifyClient——用于调用净化服务接口
+ */
+require_once("config/Cfg.php");
+require_once("BCPurifyItem.php");
+require_once("BCPurifyResult.php");
+require_once("lib/BCLogger.php");
+require_once("lib/BCClientProxy.php");
+date_default_timezone_set("PRC");
+
+class BCPurifyClient
+{
+	function __construct()
+	{
+		$this->m_params['appid'] = HL_APPID;
+		$this->m_params['format'] = "json";
+		$this->m_params['v'] = HL_VERSION;
+		$this->m_params['sdkversion'] = 'BCSPHPCLIENT1.0.20110823';
+		$this->m_errCode = "";
+		$this->m_errMsg = "";
+	}
+	function  __destruct(){}
+
+	/**
+	 * 调用净化服务内容净化接口
+	 *
+	 * @param BCPurifyItem item
+	 * @return BCPurifyResult result
+	 */
+	public function Purify($item)
+	{
+		$time_start = $this->MicrotimeFloat();
+		$task = "purify";
+		$log = new BCLogger();
+		$paramsAry = (array)$item->m_hlParmas;
+		if ($paramsAry[0]['isBatch'] == 1) {
+			$this->m_params['transId'] = $this->GenerateTransID($paramsAry[0]['appType'].$paramsAry[0]['textId']);
+			$isBatch = $paramsAry[0]['isBatch'];
+			$appType = $paramsAry[0]['appType'];
+
+		}else{
+			$this->m_params['transId'] = $this->GenerateTransID($paramsAry['appType'].$paramsAry['textId']);
+			//合法性校验
+			$rc = $this->CheckParam($task,$paramsAry);
+			if ($rc != null) {
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,0,100,100,$rc);
+				$this->SetError(100,$rc);
+				return false;
+			}
+			$isBatch = $paramsAry['isBatch'];
+			$appType = $paramsAry['appType'];
+		}
+
+
+		$this->m_params['time'] = time();
+		if ($isBatch != 1) {
+			unset($paramsAry['isBatch']);
+			unset($paramsAry['appType']);
+			$this->m_params['param'] =  $this->GenerateXmlData($paramsAry);
+		}else {
+			foreach ($paramsAry as $key=>$value) {
+				unset($paramsAry[$key]['isBatch']);
+				unset($paramsAry[$key]['appType']);
+			}
+			$this->m_params['param'] =  $this->GenerateXmlData($paramsAry,true);
+		}
+
+		$this->m_params['appType'] = $appType;
+		$this->m_params['isBatch'] = $isBatch;
+		$this->m_params['sig'] = $this->GetSig($this->m_params);
+		$this->m_params['param'] = urlencode($this->m_params['param']);
+
+		$paramsTmp = array();
+		foreach ($this->m_params as $k => $v)
+		{
+			$paramsTmp[] = "$k=$v";
+		}
+
+		$strJson = "";
+		$retries = -1;
+		$proxy = new BCClientProxy();
+		do {
+			++$retries;
+			$strJson = $proxy->HttpPostData(implode("&", $paramsTmp),HL_URLPRE);
+			if ($strJson) {
+				break;
+			}
+		}while ($retries < HL_RETRIES);
+
+		$paramsAry['appType'] = $appType;
+		if (!$strJson) {
+			$error = $proxy->getError();
+			$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,400,400,"http code:".$error['netcode']);
+			$this->SetError(400,"http code:".$error['netcode']);
+			return false;
+		}else
+		{
+			$ret = $this->ParseParam($strJson);
+			$result = $this->GetRet($ret,$task);
+			if ($result->isBusinessSuccess()) {
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,0,$retries,1000,0,$strJson);
+			}else {
+				$record = $result->getMarkResult();
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,500,$record->errorCode,$record->errorMsg);
+			}
+			return $result;
+		}
+	}
+
+	/**
+	 * 调用净化服务训练(反馈)接口
+	 *
+	 * @param BCPurifyItem item
+	 * @return BCPurifyResult result
+	 */
+	public function Feedback($item)
+	{
+		$time_start = $this->MicrotimeFloat();
+		$task = "feedback";
+		$log = new BCLogger();
+		$paramsAry = (array)$item->m_hlParmas;
+		$this->m_params['transId'] = $this->GenerateTransID($paramsAry['appType'].$paramsAry['textId']);
+
+		//合法性校验
+		$rc = $this->CheckParam($task,$paramsAry);
+		if ($rc != null) {
+			$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,0,100,100,$rc);
+			$this->SetError(100,$rc);
+			return false;
+		}
+		$appType = $paramsAry['appType'];
+		unset($paramsAry['appType']);
+
+		$this->m_params['time'] = time();
+		$this->m_params['param'] =  $this->GenerateXmlData($paramsAry);
+		$this->m_params['appType'] = $appType;
+		$this->m_params['sig'] = $this->GetSig($this->m_params);
+		$this->m_params['param'] = urlencode($this->m_params['param']);
+
+		$paramsTmp = array();
+		foreach ($this->m_params as $k => $v)
+		{
+			$paramsTmp[] = "$k=$v";
+		}
+
+		$strJson = "";
+		$retries = -1;
+		$proxy = new BCClientProxy();
+		do {
+			++$retries;
+			$strJson = $proxy->HttpPostData(implode("&", $paramsTmp),HL_URLTRA);
+			if ($strJson) {
+				break;
+			}
+		}while ($retries < HL_RETRIES);
+
+		$paramsAry['appType'] = $appType;
+		if (!$strJson) {
+			$error = $proxy->getError();
+			$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,400,400,"http code:".$error['netcode']);
+			$this->SetError(400,"http code:".$error['netcode']);
+			return false;
+		}else
+		{
+			$ret = $this->ParseParam($strJson);
+			$result = $this->GetRet($ret,$task);
+			if ($result->isBusinessSuccess()) {
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,0,$retries,1000,0,$strJson);
+			}else {
+				$record = $result->getMarkResult();
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,500,$record->errorCode,$record->errorMsg);
+			}
+			return $result;
+		}
+	}
+	/**
+	 * 调用净化服务通知接口
+	 *
+	 * @param BCPurifyItem item
+	 * @return BCPurifyResult result
+	 */
+	public function getNotify($item)
+	{
+		$time_start = $this->MicrotimeFloat();
+		$task = "notify";
+		$log = new BCLogger();
+		$paramsAry = (array)$item->m_hlParmas;
+		$this->m_params['transId'] = $this->GenerateTransID($paramsAry['appType']);
+
+		//合法性校验
+		$rc = $this->CheckParam($task,$paramsAry);
+		if ($rc != null) {
+			$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,0,100,100,$rc);
+			$this->SetError(100,$rc);
+			return false;
+		}
+
+		$appType = $paramsAry['appType'];
+		unset($paramsAry);
+
+		$this->m_params['time'] = time();
+		$this->m_params['appType'] = $appType;
+		$this->m_params['sig'] = $this->GetSig($this->m_params);
+
+		$paramsTmp = array();
+		foreach ($this->m_params as $k => $v)
+		{
+			$paramsTmp[] = "$k=$v";
+		}
+
+		$strJson = "";
+		$retries = -1;
+		$proxy = new BCClientProxy();
+		do {
+			++$retries;
+			$strJson = $proxy->HttpPostData(implode("&", $paramsTmp),HL_URLNTC);
+			if ($strJson) {
+				break;
+			}
+		}while ($retries < HL_RETRIES);
+
+		$paramsAry['appType'] = $appType;
+		if (!$strJson) {
+			$error = $proxy->getError();
+			$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,400,400,"http code:".$error['netcode']);
+			$this->SetError(400,"http code:".$error['netcode']);
+			return false;
+		}else
+		{
+			$ret = $this->ParseParam($strJson);
+			$result = $this->GetRet($ret,$task);
+			if ($result->isBusinessSuccess()) {
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,0,$retries,1000,0,$strJson);
+			}else {
+				$record = $result->getMarkResult();
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,500,$record->errorCode,$record->errorMsg);
+			}
+			return $result;
+		}
+	}
+
+	/**
+	 * 调用净化服务批量标引通知接口
+	 *
+	 * @param BCPurifyItem item
+	 * @return BCPurifyResult result
+	 */
+	public function getIndexResult($item)
+	{
+		$time_start = $this->MicrotimeFloat();
+		$task = "getIndexResult";
+		$log = new BCLogger();
+		$paramsAry = (array)$item->m_hlParmas;
+		$this->m_params['transId'] = $this->GenerateTransID($paramsAry['appType']);
+
+		//合法性校验
+		$rc = $this->CheckParam($task,$paramsAry);
+		if ($rc != null) {
+			$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,0,100,100,$rc);
+			$this->SetError(100,$rc);
+			return false;
+		}
+
+		$appType = $paramsAry['appType'];
+		unset($paramsAry);
+
+		$this->m_params['time'] = time();
+		$this->m_params['appType'] = $appType;
+		$this->m_params['sig'] = $this->GetSig($this->m_params);
+
+		$paramsTmp = array();
+		foreach ($this->m_params as $k => $v)
+		{
+			$paramsTmp[] = "$k=$v";
+		}
+
+		$strJson = "";
+		$retries = -1;
+		$proxy = new BCClientProxy();
+		do {
+			++$retries;
+			$strJson = $proxy->HttpPostData(implode("&", $paramsTmp),HL_URLGIR);
+			if ($strJson) {
+				break;
+			}
+		}while ($retries < HL_RETRIES);
+
+		$paramsAry['appType'] = $appType;
+		if (!$strJson) {
+			$error = $proxy->getError();
+			$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,400,400,"http code:".$error['netcode']);
+			$this->SetError(400,"http code:".$error['netcode']);
+			return false;
+		}else
+		{
+			$ret = $this->ParseParam($strJson);
+			$result = $this->GetRet($ret,$task);
+			if ($result->isBusinessSuccess()) {
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,0,$retries,1000,0,$strJson);
+			}else {
+				$record = $result->getMarkResult();
+				$log->LogBusiness($time_start,$task,$this->m_params['transId'],$paramsAry,-1,$retries,500,$record->errorCode,$record->errorMsg);
+			}
+			return $result;
+		}
+	}
+
+	/**
+	 * 计算加密字段sig
+	 *
+	 * @param array $paramAry
+	 * @return string $sig
+	 */
+	private function GetSig($paramAry)
+	{
+		ksort($paramAry);
+		$paramsTmp=array();
+		foreach ($paramAry as $k => $v) {
+			$paramsTmp[] = "$k=$v";
+		}
+		return md5(implode("&", $paramsTmp).HL_UKEY);
+
+	}
+
+	/**
+	 * 生成XML
+	 *
+	 * @param array $paramsAry
+	 * @return string $strXml
+	 */
+	private function GenerateXmlData($paramsAry, $isBatch=false)
+	{
+		$strXml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
+		$strXml .= "<contents>\r\n";
+		if ($isBatch) {
+			foreach ($paramsAry as $arrays) {
+				$strXml .= "<content>\r\n";
+				foreach ($arrays as $key=>$value) {
+                    $value = str_replace(array("<![CDATA","]]>"),array("&lt;![CDATA","]]&gt;"),$value);
+					$strXml .= "<$key><![CDATA[".trim($value)."]]></$key>\r\n";
+				}
+				$strXml .= "</content>\r\n";
+			}
+		}else {
+			$strXml .= "<content>\r\n";
+			foreach ($paramsAry as $key=>$value) {
+                $value = str_replace(array("<![CDATA","]]>"),array("&lt;![CDATA","]]&gt;"),$value);
+				$strXml .= "<$key><![CDATA[".trim($value)."]]></$key>\r\n";
+			}
+			$strXml .= "</content>\r\n";
+		}
+		$strXml .= "</contents>\r\n";
+		return $strXml;
+	}
+
+	/**
+	 * 解析XML
+	 *
+	 * @param string $strJson
+	 * @return array $resultArr
+	 */
+	private function ParseParam($strJson)
+	{
+		return json_decode(str_replace("\n", "", $strJson));
+
+	}
+
+	private  function GenerateTransID($param)
+	{
+		 if (function_exists('com_create_guid')){
+	       return str_replace('-','0',com_create_guid());
+   		}else{
+	       //mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
+	       $charid = strtoupper(md5(uniqid(rand().'param'.$param, true)));
+	       //$hyphen = chr(45);// "-"
+	       $hyphen = 0;
+	       $uuid = chr(123)// "{"
+	               .substr($charid, 0, 8).$hyphen
+	               .substr($charid, 8, 4).$hyphen
+	               .substr($charid,12, 4).$hyphen
+	               .substr($charid,16, 4).$hyphen
+	               .substr($charid,20,12)
+	               .chr(125);// "}"
+	       return $uuid;
+	   }
+	}
+
+	private  function GetRet($ret,$method)
+	{
+		//print_r($ret);
+		$result = new BCPurifyResult();
+		if (isset($ret->error_purifyPredictResponse) || isset($ret->error_purifyTrainResponse) || isset($ret->error_purifyNoticeResponse) || isset($ret->error_purifyGetIndexResultResponse))
+		{
+			$result->setBusinessSuccess(false);
+			if ($method =='purify') {
+				$result->setMarkresults($ret->error_purifyPredictResponse);
+			}elseif ($method =='feedback'){
+				$result->setMarkresults($ret->error_purifyTrainResponse);
+			}elseif ($method =='notify'){
+				$result->setMarkresults($ret->error_purifyNoticeResponse);
+			}
+
+		}else {
+			$result->setBusinessSuccess(true);
+			if ($method =='purify') {
+				$result->setMarkresults($ret->purifyPredictResponse->contents->content);
+			}elseif ($method =='feedback'){
+				$result->setMarkresults($ret->purifyTrainResponse->contents->content);
+			}elseif ($method =='notify'){
+				$result->setMarkresults(@$ret->purifyNoticeResponse->contents->content);
+			}elseif ($method =='getIndexResult'){
+				$result->setMarkresults(@$ret->purifyGetIndexResultResponse->contents->content);
+			}
+		}
+		return $result;
+	}
+
+	private  function CheckParam($task, $param)
+	{
+		$ret = null;
+		$paramCheck = array();
+		//$paramCheck['appType'] = $param['appType'];
+		if ($task != 'notify' && $task != 'getIndexResult') {
+			$paramCheck['class'] = $param['class'];
+			$paramCheck['textId'] = $param['textId'];
+			//$paramCheck['ip'] = $param['ip'];
+			$paramCheck['pubDate'] = $param['pubDate'];
+		}
+		if ($task == 'feedback') {
+			$paramCheck['status'] = $param['status'];
+		}
+		$item = new BCPurifyItem();
+		foreach ($paramCheck as $key=>$value) {
+			$ret = $item->{'check'.$key}($task, $value);
+			if ($ret != null) {
+				return $ret;
+			}
+		}
+		return $ret;
+	}
+
+	private function MicrotimeFloat()
+	{
+	    list($usec, $sec) = explode(" ", microtime());
+	    return ((float)$usec + (float)$sec);
+	}
+
+	private function SetError($errCode,$errMsg)
+	{
+	   $this->m_errCode = $errCode;
+	   $this->m_errMsg = $errMsg;
+	}
+	public function getError()
+	{
+	  return  $this->m_errMsg;
+	}
+
+	private $m_params = array();
+	private $m_errCode;
+	private $m_errMsg;
+}

+ 99 - 0
src/Filter/bao10jie/BCPurifyItem.php

@@ -0,0 +1,99 @@
+<?php
+/*
+ * this template use File | Settings | File Templates.
+ * 要求1: PurreifyItem 自己提供方法检查字段
+ * 要求2: PurreifyItem检查字段的方法名称为check+字段名, 参数为purify, feedback, notify之一
+ * 要求3: PurreifyItem检查字段的方法检查方法返回空表示成功, 否则返回错误描述字符串
+ * 要求4: PurreifyItem 字段对应的方法不存在表示不需要检查该字段
+ */
+class BCPurifyItem
+{
+	function __construct(){}
+	function __destruct(){}
+	
+	public function checkstatus($task,$status) 
+	{
+		if ($task != "feedback")
+			return null;
+		return ($status == null) ? "status cannot be empty"
+				: null;
+	}
+
+
+	public function checktextId($task,$textId) 
+	{
+		if ($task == "notify" || $task == "getIndexResult")
+			return null;
+
+		return ($textId == null) ? "textId cannot be empty"
+				: null;
+	}
+	
+	public function checkclass($task,$class) 
+	{
+		if ($task == "notify" || $task == "getIndexResult")
+			return null;
+
+		return ($class == null) ? "class cannot be empty"
+				: null;
+	}
+	
+	public function checkpubDate($task,$pubDate) 
+	{
+		if ($task == "notify" || $task == "getIndexResult")
+			return null;
+		if($pubDate == null)
+			return "pubDate cannot be empty";
+		if (!$this->is_date($pubDate)) 
+		{
+			return "pubDate must be format";
+		}
+		return null;
+	}
+
+	/**
+	 * 公有参数,不能放到xml中
+	 * @param name
+	 * @return
+	 */
+	private function isPublicField($name) 
+	{
+		return $name == "appType";
+
+	}
+	
+	private function strlen_utf8($str) 
+	{   
+		$i = 0;   
+		$count = 0;   
+		$len = strlen ($str);   
+		while ($i < $len) {   
+			$chr = ord ($str[$i]);   
+			$count++;   
+			$i++;   
+			if($i >= $len) break;   
+			if($chr & 0x80) {   
+				$chr <<= 1;   
+				while ($chr & 0x80) {   
+					$i++;   
+					$chr <<= 1;   
+				}   
+			}   
+		}   
+		return $count;   
+	}
+	
+	private function is_date($str,$format="Y-m-d H:i:s")
+	{
+        $str = trim($str);
+        $unixTime = strtotime($str);
+        $checkDate = date($format,$unixTime);
+        if(strcmp($checkDate,$str) == 0){ 
+                return true;
+        }else{
+                return false;
+        }
+	}  
+	
+	public $m_hlParmas;	//将所有参数放置到数组中去
+}

+ 40 - 0
src/Filter/bao10jie/BCPurifyResult.php

@@ -0,0 +1,40 @@
+<?php
+
+class BCPurifyResult
+{
+	function __construct(){}
+	function __destruct(){}
+
+	public function isBusinessSuccess() 
+	{
+		return $this->m_businessSuccess;
+	}
+
+	public function setBusinessSuccess($businessSuccess) 
+	{
+		$this->m_businessSuccess = $businessSuccess;
+	}
+	
+	public function setMarkresults($markresults) 
+	{
+		$this->m_markresults = $markresults != null ? $markresults :$markresults;
+	}
+	
+	public function getMarkResult()
+	{
+		return $this->m_markresults;
+
+	}
+	
+	public function getMarkCount()
+	{
+		return $this->m_markresults == null ? 0 : count($this->m_markresults);
+	}
+	
+	public function getMarkError() {}
+	
+	protected $m_businessSuccess ;
+	protected $m_markresults ;
+
+	
+}

+ 13 - 0
src/Filter/bao10jie/config/Cfg.php

@@ -0,0 +1,13 @@
+<?php
+define('HL_APPID','0');//客户标识appid,需要根据客户帐号信息配置
+define('HL_UKEY','');//客户私钥ukey,需要根据客户帐号信息配置
+define('HL_VERSION','2.0');//请求版本v
+define('HL_URLPRE','http://apitest.bao10jie.net/rest/purify/predict');//净化服务内容识别接口地址
+define('HL_URLTRA','http://apitest.bao10jie.net/rest/purify/train');//净化服务训练(反馈)接口地址
+define('HL_URLNTC','http://apitest.bao10jie.net/rest/purify/notice');//净化服务通知接口地址
+define('HL_URLGIR','http://apitest.bao10jie.net/rest/purify/getIndexResult');//净化服务批量标引通知接口地址
+define('HL_TIMEOUT','10');//在请求时的执行的超时时间
+define('HL_RETRIES','3');//post请求失败(网络)时,重试的阀值
+//define('HL_RTOUT','10');//readtimeout,在请求时的发送超时时间
+define('HL_LPATH','c:\\Log\\');//logpath,日志存放的路径设定
+define('HL_DEBUG','0');//配置调试日志开关,鉴于影响效率,默认为关闭(非0-开 0-关)

+ 56 - 0
src/Filter/bao10jie/lib/BCClientProxy.php

@@ -0,0 +1,56 @@
+<?php
+/**
+ * 发送请求的类, 目前采用HTTP POST
+ */
+class BCClientProxy
+{
+	
+	function __construct()
+	{
+		$this->m_netcode = 0;
+		$this->m_errorcode = 0;
+		$this->m_errormsg = "";
+	}
+	/**
+	 * 向http服务以pos方式提交数据
+	 *
+	 * @param string $sCmd	 数据字段,示例: key1=value1&key2=value2
+	 * @param string $sUrl	 请求服务器地址
+	 * @return http服务返回的结果数据
+	 */
+	private function SetError($netcode, $errorcode, $errormsg)
+	{
+		$this->m_netcode = $netcode;
+		$this->m_errorcode = $errorcode;
+		$this->m_errormsg = $errormsg;
+	}
+	
+	public function HttpPostData($sCmd, $sUrl)
+	{		
+		$ch = curl_init();
+		curl_setopt($ch, CURLOPT_URL, $sUrl);
+		curl_setopt( $ch, CURLOPT_TIMEOUT, HL_TIMEOUT);
+		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+		curl_setopt($ch, CURLOPT_POST, true);
+		curl_setopt($ch, CURLOPT_POSTFIELDS, $sCmd);
+		$retContent = curl_exec($ch);
+		if (!$retContent) {
+			$this->SetError(curl_getinfo($ch,CURLINFO_HTTP_CODE), curl_errno($ch), curl_error($ch));
+		}
+		curl_close($ch);
+		return $retContent;
+	}
+	
+	public function getError()
+	{
+		$ret = array();
+		$ret['netcode'] = $this->m_netcode!='0'?$this->m_netcode:$this->m_errormsg;
+		$ret['errorcode'] = $this->m_errorcode;
+		$ret['errormsg'] = $this->m_errormsg;
+		return $ret;
+	} 
+	private $m_netcode;  // HTTP 网络返回的状态码
+	private $m_errorcode; //程序的错误码
+	private $m_errormsg; //错误原因描述 
+		
+}

+ 55 - 0
src/Filter/bao10jie/lib/BCLogger.php

@@ -0,0 +1,55 @@
+<?php
+class BCLogger
+{
+	function __construct(){}
+	function __destruct(){}
+	
+	public function LogBusiness($time_start, $task, $serialNo, $param, $result, $retries, $step, $errcode, $msg)
+	{
+		$usetime = round(($this->MicrotimeFloat() - $time_start)*1000,2); 
+		
+		if ($task != 'notify' && $task != 'getIndexResult') {
+			$in = implode('	',array(date('Y-m-d H:i:s'),$serialNo,$param['appType'],$param['class'],$param['textId'],$result,$retries,$usetime,$step,$errcode,($result != '0')?$msg:'ok'));
+		}else {
+			$in = implode('	',array(date('Y-m-d H:i:s'),$serialNo,$param['appType'],$result,$retries,$usetime,$step,$errcode,($result != '0')?$msg:'ok'));
+		}
+		$this->createFolders(HL_LPATH);
+		$fp = fopen(HL_LPATH.$task.date('Ymd').'.txt','a+b');
+		fwrite($fp,$in."\n");
+		fclose($fp);
+		
+		if (HL_DEBUG) {
+			$this->LogDEBUG($time_start, $task, $serialNo, $param, $result, $retries, $step, $errcode, $msg);
+		}
+	}
+	
+	public function LogDEBUG($time_start, $task, $serialNo, $param, $result, $retries, $step, $errcode, $msg)
+	{
+		$usetime = round(($this->MicrotimeFloat() - $time_start)*1000,2); 
+		if ($task != 'notify' && $task != 'getIndexResult') {
+			$in = implode('	',array(date('Y-m-d H:i:s'),$serialNo,$task,$param['appType'],$param['class'],$param['textId'],$result,$retries,$usetime,$step,$errcode,$msg));
+		}else {
+			$in = implode('	',array(date('Y-m-d H:i:s'),$serialNo,$task,$param['appType'],'ignore','ignore',$result,$retries,$usetime,$step,$errcode,$msg));
+		}
+		$this->createFolders(HL_LPATH);
+		$fp = fopen(HL_LPATH.'debug'.date('Ymd').'.txt','a+b');
+		fwrite($fp,$in."\n");
+		fclose($fp);
+	}
+	
+	private function MicrotimeFloat()
+	{
+	    list($usec, $sec) = explode(" ", microtime());
+	    return ((float)$usec + (float)$sec);
+	}
+	
+	private function createFolders($path)   
+  	{   
+    //递归创建   
+	    if (!file_exists($path)&&$path!='')//如果文件夹不存在   
+	    {   
+	        $this->createFolders(dirname($path));//取得最后一个文件夹的全路径返回开始的地方   
+	        mkdir($path, 0777);   
+	    }   
+	}  
+}

+ 8 - 0
src/Filter/bao10jie/readme.txt

@@ -0,0 +1,8 @@
+关于此次送测版本build20120320
+主要更新:
+1、修改针对参数里边带有]]>进行转化保证在调用标引接口对xml解析不正确
+升级步骤:
+1、文件全部覆盖
+
+******************************************************************************************
+

+ 122 - 0
src/Filter/bao10jie/testDemo.php

@@ -0,0 +1,122 @@
+<?php
+require_once("BCPurifyClient.php");
+require_once("BCPurifyItem.php");
+require_once("BCPurifyResult.php");
+
+class Demo {
+	public function run($param, $task) {
+		// TODO Auto-generated method stub
+		$item = new BCPurifyItem();
+		$item->m_hlParmas = $param;	
+		$client = new BCPurifyClient();
+		$result = $client->{$task}($item);		//	Purify/Feedback/getNotify/getIndexResult
+		if (!$result) {
+			//客户端内部错误,返回字段校验错误(例:appType cannot be empty)或网络请求错误(例:http code:404)
+			print_r($client->getError());
+			
+		}elseif ($result->isBusinessSuccess()){
+			//成功时取结果集,返回数组对象
+			if ($result->getMarkResult() != null) {
+				print_r($result->getMarkResult());
+			}else {
+				echo '通知接口返回为空';
+			}
+		}else {
+			//失败时取结果集
+			print_r($result->getMarkResult());
+		}
+	}	
+}
+
+$param = array();
+$task = 'Purify';	//用户自定义,Purify/Feedback/getNotify/getIndexResult
+if ($task == 'Purify') {
+	//标引接口
+
+	//单条请求
+	/*
+	$param['isBatch'] = 0;
+	$param['appType'] = "bbs";
+	$param['textId'] = "12323".rand();
+	$param['threadId'] = "123456";
+	$param['class'] = "11";
+	$param['ip'] ="23.23.3.3";
+	$param['userId'] ="abcd";
+	$param['author'] ="";
+	$param['title']="01010101010101";
+	$param['text'] ="01010101010101 qq 号 123457";
+	$param['url'] ="http://test";
+	$param['pubDate'] = "2010-12-01 00:00:00";
+	$param['authorEx'] = "作者扩展";
+	$param['contentEx'] = "内容扩展";
+	$param['structureEx'] = "structureEx";
+	$param['rules'] = "规则";	
+*/
+	//批量请求
+	
+	$param[0]['isBatch'] = 1;
+	$param[0]['appType'] = "bbs";
+	$param[0]['textId'] = "12323".rand();
+	$param[0]['threadId'] = "123456";
+	$param[0]['class'] = "11";
+	$param[0]['ip'] ="23.23.3.3";
+	$param[0]['userId'] ="abcd";
+	$param[0]['author'] ="";
+	$param[0]['title']="01010101010101";
+	$param[0]['text'] ="01010101010101 qq 号 123457";
+	$param[0]['url'] ="http://test";
+	$param[0]['pubDate'] = "2010-12-01 00:00:00";
+	$param[0]['authorEx'] = "作者扩展";
+	$param[0]['contentEx'] = "内容扩展";
+	$param[0]['structureEx'] = "structureEx";
+	$param[0]['rules'] = "规则";
+	$param[1]['isBatch'] = 1;
+	$param[1]['appType'] = "bbs";
+	$param[1]['textId'] = "123231".rand();
+	$param[1]['threadId'] = "123456";
+	$param[1]['class'] = "11";
+	$param[1]['ip'] ="23.23.3.3";
+	$param[1]['userId'] ="abcd";
+	$param[1]['author'] ="";
+	$param[1]['title']="01010101010101";
+	$param[1]['text'] ="01010101010101 qq 号 123457";
+	$param[1]['url'] ="http://test";
+	$param[1]['pubDate'] = "2010-12-01 00:00:00";
+	$param[1]['authorEx'] = "作者扩展";
+	$param[1]['contentEx'] = "内容扩展";
+	$param[1]['structureEx'] = "structureEx";
+	$param[1]['rules'] = "规则";
+	
+}elseif ($task == 'Feedback'){
+	//反馈接口
+	$param['appType'] = "bbs";
+	$param['textId'] = "12323".rand();
+	$param['threadId'] = "123456";
+	$param['class'] = "11wee0";
+	$param['ip'] ="23.23.3.3";
+	$param['userId'] ="abcd";
+	$param['author'] ="wwww";
+	$param['title']="12 ab";
+	$param['text'] ="12";
+	$param['url'] ="http://test.html";
+	$param['pubDate'] = "2010-12-01 00:00:00";
+	$param['authorEx'] = "作者扩展";
+	$param['contentEx'] = "内容扩展";
+	$param['structureEx'] = "structureEx";
+	$param['rules'] = "规则";
+
+	$param['status'] = "1"; 
+	$param['reason'] = "reason";
+}else {
+	//通知接口、批量标引通知接口
+	$param['appType'] = "bbs";
+}
+
+$demo = new Demo();
+for($i=0; $i<1; $i++ )
+{
+	
+	$demo->run($param, $task);
+	
+}
+unset($demo);

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott