rabin 8 年之前
當前提交
7e3a637d23
共有 100 個文件被更改,包括 3071 次插入0 次删除
  1. 14 0
      LICENSE
  2. 2 0
      README.md
  3. 160 0
      boot.php
  4. 二進制
      build/.DS_Store
  5. 2 0
      build/boot.php
  6. 二進制
      build/dever.phar
  7. 二進制
      config/.DS_Store
  8. 98 0
      config/base.php
  9. 87 0
      config/collect.sql
  10. 二進制
      config/env/.DS_Store
  11. 二進制
      config/env/localhost/.DS_Store
  12. 36 0
      config/env/localhost/cache.php
  13. 63 0
      config/env/localhost/database.php
  14. 21 0
      config/env/localhost/debug.php
  15. 61 0
      config/env/localhost/host.php
  16. 34 0
      config/env/online/cache.php
  17. 27 0
      config/env/online/database.php
  18. 21 0
      config/env/online/debug.php
  19. 53 0
      config/env/online/host.php
  20. 62 0
      config/html/index.html
  21. 0 0
      config/index.html
  22. 38 0
      config/lang/zh-cn.php
  23. 6 0
      config/route.php
  24. 92 0
      config/web/plant.nginx.conf
  25. 二進制
      web/.DS_Store
  26. 二進制
      web/application/.DS_Store
  27. 5 0
      web/application/boot.php
  28. 二進制
      web/application/collect/.DS_Store
  29. 71 0
      web/application/collect/.svn/entries
  30. 5 0
      web/application/collect/.svn/prop-base/index.php.svn-base
  31. 43 0
      web/application/collect/.svn/text-base/index.php.svn-base
  32. 二進制
      web/application/collect/assets/default/css/.DS_Store
  33. 224 0
      web/application/collect/assets/default/css/style.css
  34. 131 0
      web/application/collect/assets/default/detail.html
  35. 94 0
      web/application/collect/assets/default/home.html
  36. 二進制
      web/application/collect/assets/default/img/.DS_Store
  37. 二進制
      web/application/collect/assets/default/img/bottom.jpg
  38. 二進制
      web/application/collect/assets/default/img/btn-bg.png
  39. 二進制
      web/application/collect/assets/default/img/cbhl-icon.png
  40. 二進制
      web/application/collect/assets/default/img/dz-icon.png
  41. 二進制
      web/application/collect/assets/default/img/fs-icon.png
  42. 二進制
      web/application/collect/assets/default/img/hfy-icon.png
  43. 二進制
      web/application/collect/assets/default/img/hzs-icon.png
  44. 二進制
      web/application/collect/assets/default/img/jh-icon.png
  45. 二進制
      web/application/collect/assets/default/img/jm-icon.png
  46. 二進制
      web/application/collect/assets/default/img/kh-icon.png
  47. 二進制
      web/application/collect/assets/default/img/logo.jpg
  48. 二進制
      web/application/collect/assets/default/img/meimao-icon.png
  49. 二進制
      web/application/collect/assets/default/img/mm-icon.png
  50. 二進制
      web/application/collect/assets/default/img/mry-icon.png
  51. 二進制
      web/application/collect/assets/default/img/ms-icon.png
  52. 二進制
      web/application/collect/assets/default/img/nf-icon.png
  53. 二進制
      web/application/collect/assets/default/img/qj-icon.png
  54. 二進制
      web/application/collect/assets/default/img/ry-icon.png
  55. 二進制
      web/application/collect/assets/default/img/sh-icon.png
  56. 二進制
      web/application/collect/assets/default/img/top.jpg
  57. 二進制
      web/application/collect/assets/default/img/txt0.png
  58. 二進制
      web/application/collect/assets/default/img/txt1.png
  59. 二進制
      web/application/collect/assets/default/img/txt10.png
  60. 二進制
      web/application/collect/assets/default/img/txt11.png
  61. 二進制
      web/application/collect/assets/default/img/txt12.png
  62. 二進制
      web/application/collect/assets/default/img/txt13.png
  63. 二進制
      web/application/collect/assets/default/img/txt14.png
  64. 二進制
      web/application/collect/assets/default/img/txt15.png
  65. 二進制
      web/application/collect/assets/default/img/txt16.png
  66. 二進制
      web/application/collect/assets/default/img/txt17.png
  67. 二進制
      web/application/collect/assets/default/img/txt18.png
  68. 二進制
      web/application/collect/assets/default/img/txt19.png
  69. 二進制
      web/application/collect/assets/default/img/txt2.png
  70. 二進制
      web/application/collect/assets/default/img/txt20.png
  71. 二進制
      web/application/collect/assets/default/img/txt21.png
  72. 二進制
      web/application/collect/assets/default/img/txt22.png
  73. 二進制
      web/application/collect/assets/default/img/txt23.png
  74. 二進制
      web/application/collect/assets/default/img/txt3.png
  75. 二進制
      web/application/collect/assets/default/img/txt4.png
  76. 二進制
      web/application/collect/assets/default/img/txt5.png
  77. 二進制
      web/application/collect/assets/default/img/txt6.png
  78. 二進制
      web/application/collect/assets/default/img/txt7.png
  79. 二進制
      web/application/collect/assets/default/img/txt8.png
  80. 二進制
      web/application/collect/assets/default/img/txt9.png
  81. 二進制
      web/application/collect/assets/default/img/xf-icon.png
  82. 二進制
      web/application/collect/assets/default/img/xs-icon.png
  83. 二進制
      web/application/collect/assets/default/img/xz-icon.png
  84. 二進制
      web/application/collect/assets/default/img/yq-icon.png
  85. 二進制
      web/application/collect/assets/default/img/yx-icon.png
  86. 二進制
      web/application/collect/assets/default/img/yy-icon.png
  87. 二進制
      web/application/collect/assets/default/img/zj-icon.png
  88. 二進制
      web/application/collect/assets/default/img/zjy-icon.png
  89. 0 0
      web/application/collect/assets/default/js/zepto.min.js
  90. 二進制
      web/application/collect/database/.DS_Store
  91. 130 0
      web/application/collect/database/.svn/entries
  92. 5 0
      web/application/collect/database/.svn/prop-base/cate.php.svn-base
  93. 5 0
      web/application/collect/database/.svn/prop-base/config.php.svn-base
  94. 5 0
      web/application/collect/database/.svn/prop-base/data.php.svn-base
  95. 150 0
      web/application/collect/database/.svn/text-base/cate.php.svn-base
  96. 398 0
      web/application/collect/database/.svn/text-base/config.php.svn-base
  97. 190 0
      web/application/collect/database/.svn/text-base/data.php.svn-base
  98. 150 0
      web/application/collect/database/cate.php
  99. 398 0
      web/application/collect/database/config.php
  100. 190 0
      web/application/collect/database/data.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 @@
+# collect
+

+ 160 - 0
boot.php

@@ -0,0 +1,160 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| utf-8
+|--------------------------------------------------------------------------
+*/
+header('Content-Type: text/html; charset=utf-8');
+
+if(!defined('DEVER_PROJECT'))
+{
+	define('DEVER_PROJECT', 'default');
+}
+
+/*
+|--------------------------------------------------------------------------
+| date rpc
+|--------------------------------------------------------------------------
+*/
+date_default_timezone_set("PRC");
+
+/*
+|--------------------------------------------------------------------------
+| start time
+|--------------------------------------------------------------------------
+*/
+define('DEVER_START', microtime());
+
+/*
+|--------------------------------------------------------------------------
+| DEVER time
+|--------------------------------------------------------------------------
+*/
+define('DEVER_TIME', $_SERVER['REQUEST_TIME']);
+
+/*
+|--------------------------------------------------------------------------
+| DEVER path
+|--------------------------------------------------------------------------
+*/
+define('DEVER_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+
+//require DEVER_PATH . 'include.php';
+
+/*
+|--------------------------------------------------------------------------
+| DEVER project host
+|--------------------------------------------------------------------------
+*/
+if(isset($_SERVER['HTTP_HOST']))
+{
+	define('DEVER_APP_HOST', 'http://' . $_SERVER['HTTP_HOST'] . ($_SERVER['SCRIPT_NAME'] ? substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], 'index.php')) : DIRECTORY_SEPARATOR));
+}
+else
+{
+	define('DEVER_APP_HOST', '');
+}
+
+/*
+|--------------------------------------------------------------------------
+| autoload
+|--------------------------------------------------------------------------
+*/
+if(is_file(DEVER_PATH . 'build/dever.phar'))
+{
+	require DEVER_PATH . 'build/dever.phar';
+
+	if(is_file(DEVER_PATH . 'composer.json'))
+	{
+		require DEVER_PATH . 'vendor/autoload.php';
+	}
+}
+else
+{
+	require DEVER_PATH . 'vendor/autoload.php';
+}
+
+/*
+|--------------------------------------------------------------------------
+| init input
+|--------------------------------------------------------------------------
+*/
+Dever\Http\Input::init();
+
+/*
+|--------------------------------------------------------------------------
+| load base config
+|--------------------------------------------------------------------------
+*/
+Dever\Config\Load::get('base');
+
+/*
+|--------------------------------------------------------------------------
+| load debug config
+|--------------------------------------------------------------------------
+*/
+Dever\Config\Load::get('debug');
+
+if(Dever\Config\Load::$global['debug']['error'])
+{
+    /*
+    |----------------------------------------------------------------------
+    | error
+    |----------------------------------------------------------------------
+    */
+  	Dever\Debug\Process::report();
+}
+
+/*
+|--------------------------------------------------------------------------
+| DEVER app name
+|--------------------------------------------------------------------------
+*/
+if(!defined('DEVER_APP_NAME'))
+{
+	$temp = explode(Dever\Config\Load::$global['base']['path'], DEVER_APP_PATH);
+	define('DEVER_APP_NAME', chop(str_replace(DIRECTORY_SEPARATOR, '_', end($temp)), '_'));
+}
+
+/*
+|--------------------------------------------------------------------------
+| DEVER header cache
+|--------------------------------------------------------------------------
+*/
+if(isset(Dever\Config\Load::$global['base']['header-cache']) && Dever\Config\Load::$global['base']['header-cache'] == true)
+{
+	header("Expires: -1");
+	header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
+	header("Pragma: no-cache");
+}
+
+/*
+|--------------------------------------------------------------------------
+| load host config
+|--------------------------------------------------------------------------
+*/
+Dever\Config\Load::get('host');
+
+/*
+|--------------------------------------------------------------------------
+| project register
+|--------------------------------------------------------------------------
+*/
+Dever\Config\Project::register();
+
+/*
+|--------------------------------------------------------------------------
+| route
+|--------------------------------------------------------------------------
+*/
+$route = new Dever\Routing\Route;
+
+/*
+|--------------------------------------------------------------------------
+| route run and out
+|--------------------------------------------------------------------------
+*/
+if(!defined('DEVER_DAEMON'))
+{
+	$route->runing()->output();
+}

二進制
build/.DS_Store


+ 2 - 0
build/boot.php

@@ -0,0 +1,2 @@
+<?php
+require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'vendor/autoload.php';

二進制
build/dever.phar


二進制
config/.DS_Store


+ 98 - 0
config/base.php

@@ -0,0 +1,98 @@
+<?php
+
+return array
+(
+	# 项目部署的相对路径(部署在服务器的根目录,如果不定义DEVER_PROJECT_NAME,则本项必须启用并有效)
+	'path' => DIRECTORY_SEPARATOR . 'collect' . DIRECTORY_SEPARATOR,
+	//'path' => DIRECTORY_SEPARATOR,
+	
+	# 名称
+	'name' => '采集系统',
+	# 基本描述
+	'desc' => '专注编程与开发的架构',
+	# copyright
+	'copyright' => '© 2015-2020 dever.cc,Inc. Licensed under MIT license.',
+	# github
+	'github' => 'https://github.com/dever-main',
+	# web
+	'web' => 'http://www.dever.cc/',
+	
+	
+	# 语言包设置
+	'lang' => 'zh-cn',
+	# api是否开启,默认关闭,如果开启,则所有数据接口必须接入api
+	'api' => false,
+	# 版本配置
+	'version' => '1.0.0 Beta',
+	
+	# 模板(assets)的所在目录,默认为html
+	'html' => 'html',
+	
+	# 使用的模板 注意:定义这个之后,将会强制将本项目模板变成这个 定义成数组的话则为pc和手机版
+	//'template' => array('pc', 'm'),
+	
+	# 定义这个之后,将强制将template的目录改为这个,不定义或不填写,则强制使用为template定义
+	//'service' => 'pc',
+	
+	# 访问assets的物理路径 这个是使用公共的路径
+	//'assets'=> DEVER_PATH . '../assets/',
+	
+	# 访问assets目录的物理路径
+	'assets' => DEVER_APP_PATH . 'assets' . DIRECTORY_SEPARATOR,
+
+	# 访问data目录的物理路径
+	'data' 	=> DEVER_PATH . 'web' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR,
+
+	# 访问当前项目目录的物理路径,如果项目和dever类库在一个目录中,则为DEVER_PATH,如果不在,则为DEVER_APP_PATH,当然也可随意更改,这里目前只影响合并操作
+	'workspace' 	=> DEVER_PATH,
+
+	# 替换设置 一般用于替换资源,将模板中的(html中的)js等相对url换成绝对url,如果不定义,则默认为../js这样的
+	'replace' => array
+	(
+		'css' => '../css/',
+		'js' => '../js/',
+		'img' => '../images/',
+		'core' => '../../lib/',
+	),
+
+	# 是否启用静态资源域名动态化,启用之后,静态资源的域名将动态加载,适合使用多个域名或publish启用
+	'assets_domain' => true,
+	
+	# 定义api的token明文,如果和其他业务有合作,建议使用系统自带的接口api,自带加密解密程序。
+	'token' => 'dever_api_2016',
+	
+	# 是否启用nocache,如果是互动类的项目且主域增加了cdn,建议开启
+	'header-cache' => false,
+
+	# 关闭自助建表,生产环境建议开启,开启之后无法对数据表进行更新操作
+	//'create' => true,
+	
+	# 是否开启强制刷新页面缓存,值为$_GET的key值
+	'template-cache' => 'dever_template_cache',
+	
+	# 是否开启手动更改模板,允许通过$_GET的方式来更改当前模板,值为$_GET的key值,默认关闭
+	//'template' => 'dever_template',
+	
+	# 开启用户触发cron,主要用于无法加到系统计划任务的虚拟主机,必须安装manage组件,谨慎开启,会稍微影响程序执行效率
+	//'cron' => true,
+	
+	# 是否开启mysql自助优化功能,开启后,会记录所有where条件和order的字段,可以方便的在后台进行分析、增加索引,必须安装manage组件
+	'opt' => true,
+	
+	# 是否开启sql自动优化,将sql中的select * 转换为 select a,b形式,将sql中的where条件按照索引从左到右自动排序,必须打开上述的opt选项,数据量大时建议打开。
+	//'sql' => true,
+
+	# publish 是否发布,此项开启后,系统不会检测service(意味着不用将service打包上线),适合生产环境,并能对代码起到一定的加密保护。
+	//'publish' => true,
+
+	# url默认参数,所有Maze::url生成的链接都会加上这个参数
+	//'url' => 'loading=content',
+	//
+	# 是否启用layout 如启用,填写要替换的class或者id即可,具体效果可参考youtube,只加载部分内容,前端请加载pjax.js
+	//'layout' => '.content',
+	
+	# 是否启用自动过滤功能,必须加载manage包,目前可选的值为:manage(自带的过滤功能,非常简单,小型站点可以开启),bao10jie(必须申请账号)
+	//'filter' => array('manage' => 1,'bao10jie' => '账号'),
+	'filter' => array('manage' => 1),
+);
+

文件差異過大導致無法顯示
+ 87 - 0
config/collect.sql


二進制
config/env/.DS_Store


二進制
config/env/localhost/.DS_Store


+ 36 - 0
config/env/localhost/cache.php

@@ -0,0 +1,36 @@
+<?php
+
+return array
+(
+	# 启用mysql数据库缓存
+	'mysql' => 0,
+	# 启用页面缓存 会根据当前的url来生成缓存,相当于页面静态化。
+	'html' => 0,
+	# 启用数据级别缓存 这个缓存是程序员自定义的:Dever::cache('name', 'value');
+	'data' => 3600,
+	# 启用路由缓存 暂时不支持
+	//'route' => 3600,
+
+	# 缓存类型
+	'type' => 'memcache',//file、memcache、redis 目前仅有memcache实现,其余后续加上
+
+	# 缓存保存方式,支持多个数据源、多台缓存服务器
+	'store' => array
+	(
+		array
+		(
+			'host' => '127.0.0.1',
+			'port' => '11211',
+			'weight' => 100,
+		),
+
+		/*
+		array
+		(
+			'host' => '127.0.0.1',
+			'port' => '11212',
+			'weight' => 100,
+		),
+		*/
+	),
+);

+ 63 - 0
config/env/localhost/database.php

@@ -0,0 +1,63 @@
+<?php
+
+return array
+(
+	# default database config
+	'default' => array
+	(
+		'type' => 'pdo',
+		'host' => array
+		(
+			'read' => 'web_mysql:3306',
+			'update' => 'web_mysql:3306',
+		),
+		'database' => 'dever',
+		'username' => 'root',
+		'password' => '123456',
+		'charset' => 'utf8',
+		# 持久化服务器,只负责保存数据,跟读写分离差不多,但可以更换不同的数据库类型
+		/*
+		'save' => array
+		(
+			'type' => 'pdo',
+			'host' => 'localhost:3306',
+			'database' => 'dever_test',
+			'username' => 'root',
+			'password' => '123456',
+			'charset' => 'utf8',
+		),
+
+		# 迁移旧的数据库服务器,具体迁移规则请到old目录中定义
+		'old' => array
+		(
+			'type' => 'pdo',
+			'host' => 'localhost:3306',
+			'database' => 'mazephp',
+			'username' => 'root',
+			'password' => '123456',
+			'charset' => 'utf8',
+		)
+		*/
+	),
+
+
+/*
+	'manage' => array
+	(
+		'type' => 'mysql',
+		'host' => 'localhost:3306,localhost:3306',//read,update
+		'database' => 'dever',
+		'username' => 'root',
+		'password' => '123456',
+		'charset' => 'utf8'
+	)
+
+	array
+	(
+		'type' => 'mongo',
+		'host' => '127.0.0.1:27017',
+		'database' => 'farm',
+	),
+*/
+	
+);

+ 21 - 0
config/env/localhost/debug.php

@@ -0,0 +1,21 @@
+<?php
+
+return array
+(
+	# 开启错误提示 生产环境建议禁止
+	'error' => true,
+	
+	# 开始日志记录 暂时无效
+	'log' => true,
+
+	# 开始访问报告
+	# 生产环境建议禁止或添加ip限制,多个ip用逗号隔开
+	# 如禁止,值为false,下述shell也将失效
+	# 值为2,则开启强制模式,任何输出都将打印debug
+	'request' => Dever::ip(),
+
+	# 设定打印访问报告的指令,值为request
+	'shell' => 'dever_debug',
+	# 以上指令,请通过&dever_debug=request来执行,如果你想设置断点或者打印当前业务逻辑下的sql,请直接用Dever::debug();打印数据
+
+);

+ 61 - 0
config/env/localhost/host.php

@@ -0,0 +1,61 @@
+<?php
+
+# 本配置文件会根据部署位置的不同而修改,此处请自行修改
+
+$local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
+
+# 本地可用这个
+$host = 'http://'.$local . Dever::$global['base']['path'];
+
+# 定义assets的域名
+$assets = DEVER_APP_HOST . 'assets/';
+if(DEVER_APP_NAME == 'manage')
+{
+	$assets = $host . 'web/package/manage/assets/';
+}
+
+# 跨域设置
+header('Access-Control-Allow-Origin:*');
+return array
+(
+	# 项目跟域名
+	'base' 	=> DEVER_APP_HOST,
+	# 跟域名
+	'workspace'	=> $host,
+
+	# cookie 域名
+	'cookie' => '',
+	
+	# assets 核心库访问地址 一般用不到,如果想把所有资源都放到这里,就要启用
+	'core' 	=> $host . 'assets/lib/',
+	
+	# assets网络路径
+	'assets' => $assets,
+	'css' => $assets . 'css/',
+	'js' => $assets . 'js/',
+	'lib' => $assets . 'lib/',
+	'img' => $assets . 'img/',
+	'images' => $assets . 'images/',
+	'font' => $assets . 'fonts/',
+	'public' => $assets . 'public/',
+
+	# 后台管理系统的assets路径
+	'manage' => $host . 'web/package/manage/assets/default/',
+	
+	# 合并之后的网络路径,填写之后自动合并资源,不填写则不合并,适合把资源放到云端
+	//'merge' => $host . 'web/data/assets/' . DEVER_PROJECT . '/',
+	
+	# 上传系统的上传路径的域名(不带action)
+	'upload'=> $host . 'web/package/upload/?save',
+	# 上传系统的访问域名
+	'image'	=> $host . 'web/data/upload/',
+	
+	# 是否启用代理功能
+	'proxy' => $host . 'web/application/plant/main/?data.proxy?',
+
+	# 内部接口定义,manage为当前使用的系统
+	'manage_api' => array
+	(
+		//'module' => 'http://192.168.33.10/workspace/web/application/earth/module/?',
+	),
+);

+ 34 - 0
config/env/online/cache.php

@@ -0,0 +1,34 @@
+<?php
+
+return array
+(
+	# 启用mysql数据库缓存
+	'mysql' => 0,
+	# 启用页面缓存 会根据当前的url来生成缓存,相当于页面静态化。
+	'html' => 0,
+	# 启用路由缓存 暂时不支持
+	//'route' => 3600,
+
+	# 缓存类型
+	'type' => 'memcache',//file、memcache、redis 目前仅有memcache实现,其余后续加上
+
+	# 缓存保存方式,支持多个数据源、多台缓存服务器
+	'store' => array
+	(
+		array
+		(
+			'host' => '127.0.0.1',
+			'port' => '11211',
+			'weight' => 100,
+		),
+
+		/*
+		array
+		(
+			'host' => '127.0.0.1',
+			'port' => '11212',
+			'weight' => 100,
+		),
+		*/
+	),
+);

+ 27 - 0
config/env/online/database.php

@@ -0,0 +1,27 @@
+<?php
+
+return array
+(
+	# default database config
+	'default' => array
+	(
+		'type' => 'mysql',
+		'host' => 'localhost:3306,localhost:3306',//read,update
+		'database' => 'dever',
+		'username' => 'root',
+		'password' => '123456',
+		'charset' => 'utf8'
+	),
+/*
+	'manage' => array
+	(
+		'type' => 'mysql',
+		'host' => 'localhost:3306,localhost:3306',//read,update
+		'database' => 'dever',
+		'username' => 'root',
+		'password' => '123456',
+		'charset' => 'utf8'
+	)
+*/
+	
+);

+ 21 - 0
config/env/online/debug.php

@@ -0,0 +1,21 @@
+<?php
+
+return array
+(
+	# 开启错误提示 生产环境建议禁止
+	'error' => false,
+	
+	# 开始日志记录 暂时无效
+	'log' => true,
+
+	# 开始访问报告
+	# 生产环境建议禁止或添加ip限制,多个ip用逗号隔开
+	# 如禁止,值为false,下述shell也将失效
+	# 值为2,则开启强制模式,任何输出都将打印debug
+	'request' => false,
+
+	# 设定打印访问报告的指令,值为request
+	'shell' => 'dever_debug',
+	# 以上指令,请通过&dever_debug=request来执行,如果你想设置断点或者打印当前业务逻辑下的sql,请直接用Dever::debug();打印数据
+
+);

+ 53 - 0
config/env/online/host.php

@@ -0,0 +1,53 @@
+<?php
+
+# 本配置文件会根据部署位置的不同而修改,此处请自行修改
+
+$local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
+
+# 域名后缀,可以随意修改
+$domain = $_SERVER['SERVER_NAME'];
+
+# 当前项目的主域名
+$host = 'http://'.$local . '/';
+
+# 定义当前项目assets的域名
+$assets = $host . 'assets/';
+
+# 跨域设置
+header('Access-Control-Allow-Origin:http://'.$local);
+
+return array
+(
+	# 项目跟域名
+	'base' 	=> DEVER_APP_HOST,
+	# 跟域名
+	'workspace'	=> $host,
+
+	# cookie 域名
+	'cookie' => $domain,
+	
+	# assets 核心库访问地址 一般用不到,如果想把所有资源都放到这里,就要启用
+	'core' 	=> $host . 'assets/lib/',
+	
+	# assets网络路径
+	'assets' => $assets,
+	'css' => $assets . 'css/',
+	'js' => $assets . 'js/',
+	'lib' => $assets . 'lib/',
+	'img' => $assets . 'img/',
+	'font' => $assets . 'fonts/',
+
+	# 后台管理系统的assets路径
+	'manage' => 'http://manage.'.$domain.'/assets/default/',
+	
+	# 合并之后的网络路径,填写之后自动合并资源,不填写则不合并,适合把资源放到云端
+	'merge' => 'http://assets.'.$domain.'/' . DEVER_PROJECT . '/',
+	
+	# 上传系统的上传路径的域名(不带action)
+	'upload' => 'http://upload.'.$domain.'/save',
+	# 上传系统的访问域名
+	'image' => 'http://file.'.$domain.'/',
+	
+	# 是否启用代理功能,代理接口
+	'proxy' => $host . 'data.proxy?',
+);

+ 62 - 0
config/html/index.html

@@ -0,0 +1,62 @@
+
+<!DOCTYPE html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+<title>无法打开页面-Dever</title>
+
+<style type="text/css">
+body,code,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0}
+body{font:14px/1.5 'Microsoft YaHei','微软雅黑',Helvetica,Sans-serif;min-width:1200px;background:#f0f1f3;}
+:focus{outline:0}
+h1,h2,h3,h4,h5,h6,strong{font-weight:700}
+a{color:#428bca;text-decoration:none}
+a:hover{text-decoration:underline}
+.error-page{background:#f0f1f3;padding:80px 0 180px}
+.error-page-container{position:relative;z-index:1}
+.error-page-main{position:relative;background:#f9f9f9;margin:0 auto;width:617px;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:50px 50px 70px}
+.error-page-main:before{content:'';display:block;height:7px;position:absolute;top:-7px;width:100%;left:0}
+.error-page-main h3{font-size:24px;font-weight:400;border-bottom:1px solid #d0d0d0}
+.error-page-main h3 strong{font-size:54px;font-weight:400;margin-right:20px}
+.error-page-main h4{font-size:20px;font-weight:400;color:#333}
+.error-page-actions{font-size:0;z-index:100}
+.error-page-actions div{font-size:14px;display:inline-block;padding:30px 0 0 10px;width:50%;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#838383}
+.error-page-actions ol{list-style:decimal;padding-left:20px}
+.error-page-actions li{line-height:2.5em}
+.error-page-actions:before{content:'';display:block;position:absolute;z-index:-1;bottom:17px;left:50px;width:200px;height:10px;-moz-box-shadow:4px 5px 31px 11px #999;-webkit-box-shadow:4px 5px 31px 11px #999;box-shadow:4px 5px 31px 11px #999;-moz-transform:rotate(-4deg);-webkit-transform:rotate(-4deg);-ms-transform:rotate(-4deg);-o-transform:rotate(-4deg);transform:rotate(-4deg)}
+.error-page-actions:after{content:'';display:block;position:absolute;z-index:-1;bottom:17px;right:50px;width:200px;height:10px;-moz-box-shadow:4px 5px 31px 11px #999;-webkit-box-shadow:4px 5px 31px 11px #999;box-shadow:4px 5px 31px 11px #999;-moz-transform:rotate(4deg);-webkit-transform:rotate(4deg);-ms-transform:rotate(4deg);-o-transform:rotate(4deg);transform:rotate(4deg)}
+</style>
+
+</head>
+<body>
+
+<div class="error-page">
+    <div class="error-page-container">
+        <div class="error-page-main" error="<?php echo $html?>">
+            <h3>
+                <strong>404</strong>无法打开页面
+            </h3>
+            <div class="error-page-actions">
+                <div>
+                    <h4>可能原因:</h4>
+                    <ol>
+                        <li>网络信号差</li>
+                        <li>找不到请求的页面</li>
+                        <li>输入的网址不正确</li>
+                    </ol>
+                </div>
+                <div>
+                    <h4>可以尝试:</h4>
+                    <ul>
+                        <li><a href="<?php echo $host?>">返回首页</a></li>
+                        <li><a href="javascript:history.back(-1)">返回上一页</a></li>
+                        <li><a href="http://www.dever.cc/" target="_blank">到官网提出您的问题</a></li>
+                    </ul>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

+ 0 - 0
config/index.html


+ 38 - 0
config/lang/zh-cn.php

@@ -0,0 +1,38 @@
+<?php
+
+return array
+(
+	# 核心相关
+	# 数据不存在
+	'core_database_exists' => '数据库{0}不存在',
+	# 请求不匹配
+	'core_database_request' => '参数{0}为空,或者不匹配该规则:{1}',
+	# dom不存在
+	'dom_exists' => 'dom"{0}"不存在',
+	# 文件不存在
+	'file_exists' => '文件"{0}"不存在',
+	# 目录不存在
+	'path_exists' => '目录"{0}"不存在',
+	# 目录不存在
+	'path_exists_array' => '目录"{0}"不存在',
+	# 类中的方法不存在
+	'method_exists' => '{0}中的方法{1}不存在',
+	# api配置不存在
+	'api_exists' => 'api"{0}"不存在',
+	# api配置不存在
+	'api_key_exists' => 'api中的配置{0}不存在',
+	# api参数不存在
+	'api_param_exists' => '参数{0}不存在',
+	# api参数signature校验错误
+	'api_signature_exists' => 'signature校验错误',
+	# 错误的页面
+	'error_page' => '无法打开页面',
+	# xss请求
+	'request_tainting' => 'request_tainting',
+	# 项目不存在
+	'project_exists' => '项目"{0}"不存在',
+	# 项目已存在
+	'project_already_exists' => '项目"{0}"已存在',
+	
+	# 后台相关
+);

+ 6 - 0
config/route.php

@@ -0,0 +1,6 @@
+<?php
+
+return array
+(
+	'' => 'home',
+);

+ 92 - 0
config/web/plant.nginx.conf

@@ -0,0 +1,92 @@
+server {
+    server_name yubin.bid www.yubin.bid manage.yubin.bid forum.yubin.bid passport.yubin.bid upload.yubin.bid;
+
+    listen 80;
+
+    autoindex on;
+
+    set $charset utf-8;
+
+    charset $charset;
+
+    set $rootdir /data/web/yubin.bid/web/application/plant;
+    set $project www;
+
+    if ( $host ~* "^([^\.]+)\.yubin\.bid" ) {
+        set $project $1;
+    }
+
+    if ( $project ~* www ) {
+        set $project main;
+    }
+
+    set $rewrite yes;
+
+    if ( $request_uri ~* (assets\/|crossdomain\.xml) ) {
+        set $rewrite no;
+        set $rootdir /data/web/yubin.bid/web/package;
+    }
+
+    set $rootdir $rootdir/$project;
+    root $rootdir;
+    index index.php index.html;
+
+
+    if ($rewrite ~* yes) {
+        rewrite ^/(.*) /index.php/$1 last;
+    }
+
+    location ~ /(assets\/|crossdomain\.xml)
+    {
+        try_files $uri $uri/ /index.html;
+    }
+
+
+    location / {
+        fastcgi_split_path_info ^(.+\.php)(/.+)$;
+        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
+
+        # With php5-cgi alone:
+        #fastcgi_pass 127.0.0.1:9000;
+        # With php5-fpm:
+        fastcgi_pass unix:/var/run/php5-fpm.sock;
+        fastcgi_index index.php;
+        include fastcgi_params;
+    }
+}
+
+
+server {
+    server_name file.yubin.bid assets.yubin.bid;
+
+    listen 80;
+
+    autoindex on;
+
+    set $charset utf-8;
+
+    charset $charset;
+
+    set $rootdir /data/web/yubin.bid/web/data;
+    set $project upload;
+
+    if ( $host ~* "^([^\.]+)\.yubin\.bid" ) {
+        set $project $1;
+    }
+
+    if ( $project ~* file ) {
+        set $project upload;
+    }
+
+    set $rootdir $rootdir/$project;
+    root $rootdir;
+    index index.html;
+    location / {
+                # First attempt to serve request as file, then
+                # as directory, then fall back to displaying a 404.
+                try_files $uri $uri/ =404;
+                # Uncomment to enable naxsi on this location
+                # include /etc/nginx/naxsi.rules
+    }
+
+}

二進制
web/.DS_Store


二進制
web/application/.DS_Store


+ 5 - 0
web/application/boot.php

@@ -0,0 +1,5 @@
+<?php
+# 载入project的配置
+include('project.php');
+# 载入核心类库
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

二進制
web/application/collect/.DS_Store


+ 71 - 0
web/application/collect/.svn/entries

@@ -0,0 +1,71 @@
+10
+
+dir
+924
+svn://182.92.3.30/project/collect
+svn://182.92.3.30/project
+
+
+
+2016-04-11T06:08:12.257517Z
+734
+yubin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+140960d9-11d8-4647-83e1-275f326d1242
+
+database
+dir
+
+src
+dir
+
+manage
+dir
+
+index.php
+file
+
+
+
+
+2016-03-21T13:58:02.000000Z
+3632884f7102d3a616507f506080fbb6
+2016-03-21T14:12:19.183235Z
+385
+yubin
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1832
+

+ 5 - 0
web/application/collect/.svn/prop-base/index.php.svn-base

@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END

+ 43 - 0
web/application/collect/.svn/text-base/index.php.svn-base

@@ -0,0 +1,43 @@
+<?php
+/*
+|--------------------------------------------------------------------------
+| project project 写入到哪个project里,属于哪个项目,不填则为默认项目
+|--------------------------------------------------------------------------
+*/
+define('MAZE_PROJECT', 'collect');
+/*
+|--------------------------------------------------------------------------
+| project name 项目名,一般为当前目录名,不定义则系统自动读取,如本项目为可复制且随意改名项目,则无需定义本常量
+|--------------------------------------------------------------------------
+*/
+define('MAZE_PROJECT_NAME', 'collect');
+/*
+|--------------------------------------------------------------------------
+| project lang 项目中文名/描述
+|--------------------------------------------------------------------------
+*/
+define('MAZE_PROJECT_LANG', '采集工具');
+/*
+|--------------------------------------------------------------------------
+| project order 只为后台菜单排序用
+|--------------------------------------------------------------------------
+*/
+define('MAZE_PROJECT_ORDER', 10);
+/*
+|--------------------------------------------------------------------------
+| project lib 开放载入的类库名
+|--------------------------------------------------------------------------
+*/
+define('MAZE_PROJECT_LIB', 'collect');
+/*
+|--------------------------------------------------------------------------
+| project path
+|--------------------------------------------------------------------------
+*/
+define('MAZE_PROJECT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+/*
+|--------------------------------------------------------------------------
+| entry
+|--------------------------------------------------------------------------
+*/
+include(MAZE_PROJECT_PATH . '../../mazephp/boot.php');

二進制
web/application/collect/assets/default/css/.DS_Store


+ 224 - 0
web/application/collect/assets/default/css/style.css

@@ -0,0 +1,224 @@
+@charset 'UTF-8';
+html {
+  color: #000;
+  background: #fff;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%;
+}
+article,
+aside,
+blockquote,
+body,
+button,
+code,
+dd,
+details,
+div,
+dl,
+dt,
+fieldset,
+figcaption,
+figure,
+footer,
+form,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+header,
+hgroup,
+hr,
+input,
+legend,
+li,
+menu,
+nav,
+ol,
+p,
+pre,
+section,
+td,
+textarea,
+th,
+ul {
+  margin: 0;
+  padding: 0;
+}
+input,
+select,
+textarea {
+  font-size: 100%;
+}
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+fieldset,
+img {
+  border: 0;
+}
+abbr,
+acronym {
+  border: 0;
+  font-variant: normal;
+}
+del {
+  text-decoration: line-through;
+}
+address,
+caption,
+cite,
+code,
+dfn,
+em,
+th,
+var {
+  font-style: normal;
+  font-weight: 500;
+}
+ol,
+ul {
+  list-style: none;
+}
+caption,
+th {
+  text-align: left;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  font-size: 100%;
+  font-weight: 500;
+}
+q:after,
+q:before {
+  content: '';
+}
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+sup {
+  top: -0.5em;
+}
+sub {
+  bottom: -0.25em;
+}
+a,
+ins {
+  text-decoration: none;
+}
+html {
+  -webkit-tap-highlight-color: transparent;
+}
+body,
+html {
+  font-family: sans-serif;
+}
+ul,
+li {
+  list-style-type: none;
+}
+img {
+  display: block;
+}
+.clearfix:after,
+.clearfix:before {
+  content: ' ';
+  display: table;
+}
+.clearfix:after {
+  clear: both;
+}
+.logo {
+  padding: 0.34375rem 0.03125rem 0.390625rem 0.203125rem;
+}
+.logo img {
+  width: 9.765625rem;
+  height: 1.640625rem;
+}
+.line {
+  width: 8.4375rem;
+  height: 1px;
+  background-color: #000;
+  margin: 0 auto;
+}
+.list {
+  padding: 0.9375rem 0 0.625rem 0.390625rem;
+  overflow: hidden;
+}
+.list li {
+  float: left;
+  margin: 0 0.390625rem 0.3125rem 0;
+}
+.list li img {
+  width: 2.8125rem;
+  height: 3.4375rem;
+}
+.bottom {
+  padding: 0.9375rem 0.78125rem 0.9375rem 0.390625rem;
+}
+.bottom img {
+  width: 8.828125rem;
+  height: 3.46875rem;
+}
+.detail-top {
+  width: 10rem;
+  height: 1.609375rem;
+  background: url(../img/top.jpg) no-repeat;
+  background-size: 10rem 2.078125rem;
+  padding-top: 0.46875rem;
+  margin-bottom: 0.390625rem;
+}
+.detail-top img {
+  height: 1.125rem;
+  margin: 0 auto;
+  display: block;
+}
+.other {
+  margin-top: 0.859375rem;
+  text-align: center;
+  font-size: 0.546875rem;
+  font-weight: bold;
+  color: #000;
+}
+.btn-list {
+  overflow: hidden;
+  padding: 0.625rem 0.3125rem 0.78125rem 0.46875rem;
+}
+.btn-list li {
+  float: left;
+  margin: 0 0.15625rem 0.15625rem 0;
+}
+.btn-list li a {
+  display: block;
+  font-size: 0.46875rem;
+  color: #fff;
+  font-weight: bold;
+  background: url(../img/btn-bg.png) no-repeat;
+  background-size: 2.90625rem 1.03125rem;
+  width: 2.90625rem;
+  height: 1.03125rem;
+  line-height: 1.03125rem;
+  text-align: center;
+}
+#J_iframe {
+  width: 100%;
+  box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  padding: 0 0.46875rem;
+}
+html,
+body {
+  -webkit-overflow-scrolling: touch;
+  width: 100%;
+  height: 100%;
+}

+ 131 - 0
web/application/collect/assets/default/detail.html

@@ -0,0 +1,131 @@
+<!doctype html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <title>榜单详情页</title>
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <meta name="apple-mobile-web-app-status-bar-style" content="black">
+        <meta name="format-detection" content="telephone=no">
+        <link rel="stylesheet" type="text/css" href="css/style.css">
+        <script>!function(){var e;e=function(e){return function(e,t){function i(){var t=r.getBoundingClientRect().width;t/m>540&&(t=540*m);var i=t/10;r.style.fontSize=i+"px",d.rem=e.rem=i}var a,n=e.document,r=n.documentElement,o=n.querySelector('meta[name="viewport"]'),l=n.querySelector('meta[name="flexible"]'),m=0,s=0,d=t.flexible||(t.flexible={});if(o){console.warn("将根据已有的meta标签来设置缩放比例");var c=o.getAttribute("content").match(/initial\-scale=([\d\.]+)/);c&&(s=parseFloat(c[1]),m=parseInt(1/s))}else if(l){var p=l.getAttribute("content");if(p){var u=p.match(/initial\-dpr=([\d\.]+)/),f=p.match(/maximum\-dpr=([\d\.]+)/);u&&(m=parseFloat(u[1]),s=parseFloat((1/m).toFixed(2))),f&&(m=parseFloat(f[1]),s=parseFloat((1/m).toFixed(2)))}}if(!m&&!s){var v=(e.navigator.appVersion.match(/android/gi),e.navigator.appVersion.match(/iphone/gi)),h=e.devicePixelRatio;m=v?h>=3&&(!m||m>=3)?3:h>=2&&(!m||m>=2)?2:1:1,s=1/m}if(r.setAttribute("data-dpr",m),!o)if(o=n.createElement("meta"),o.setAttribute("name","viewport"),o.setAttribute("content","initial-scale="+s+", maximum-scale="+s+", minimum-scale="+s+", user-scalable=no"),r.firstElementChild)r.firstElementChild.appendChild(o);else{var x=n.createElement("div");x.appendChild(o),n.write(x.innerHTML)}e.addEventListener("resize",function(){clearTimeout(a),a=setTimeout(i,300)},!1),e.addEventListener("pageshow",function(e){e.persisted&&(clearTimeout(a),a=setTimeout(i,300))},!1),"complete"===n.readyState?n.body.style.fontSize=12*m+"px":n.addEventListener("DOMContentLoaded",function(e){n.body.style.fontSize=12*m+"px"},!1),i(),d.dpr=e.dpr=m,d.refreshRem=i,d.rem2px=function(e){var t=parseFloat(e)*this.rem;return"string"==typeof e&&e.match(/rem$/)&&(t+="px"),t},d.px2rem=function(e){var t=parseFloat(e)/this.rem;return"string"==typeof e&&e.match(/px$/)&&(t+="rem"),t}}(window,window.lib||(window.lib={})),e}()}();</script>
+    </head>
+    <body>
+        <div class="detail-top"><img id="J_txt" src="" alt="" /></div>
+        <iframe id="J_iframe" src="" scrolling="no" width="100%" height="2000" frameborder="0"></iframe>
+        <div class="other">其他部门</div>
+        <div class="line"></div>
+        <ul class="btn-list">
+            <li>
+                <a href="detail.html?id=0">卸妆部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=1">洗颜部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=2">化妆水部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=3">美容液部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=4">精华部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=5">乳液部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=6">面霜部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=7">护肤油部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=8">面膜部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=9">唇部护理部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=10">防晒部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=11">底妆部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=12">腮红部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=13">眼影部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=14">眼线部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=15">睫毛部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=16">眉毛部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=17">口红部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=18">指甲油部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=19">香水部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=20">香氛部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=21">工具部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=22">仪器部门</a>
+            </li>
+            <li>
+                <a href="detail.html?id=23">内服部门</a>
+            </li>
+        </ul>
+        <div class="line"></div>
+        <div class="bottom"><img src="img/bottom.jpg" alt="" /></div>
+        <script type="text/javascript" src="js/zepto.min.js"></script>
+        <script type="text/javascript">
+            var id = parseInt(getUrlParam('id'));
+            $('#J_iframe').attr('src', 'http://muracat.com.cn/collect/web/application/collect/?show.view?id='+(id+1));
+            $('#J_txt').attr('src', 'img/txt'+id+'.png');
+
+            function getUrlParam(sKey, sUrl) {
+                var re = /(\?|&)([^&#]*)/g;
+                var url = sUrl || window.location.href;
+                var arr = url.match(re) || [];
+                var result = {};
+                for (var i = 0; i < arr.length; i++) {
+                    var nArr = arr[i].substr(1).split("=");
+                    if (nArr[0] in result) {
+                        result[nArr[0]] instanceof Array ?
+                                result[nArr[0]].push(nArr[1]):
+                                result[nArr[0]] = [result[nArr[0]],nArr[1]];
+                    } else {
+                        result[nArr[0]] = nArr[1];
+                    }
+                }
+                return sKey ? (result[sKey] || "") : result;
+            }
+
+            function setIframeHeight(iframe) {
+            if (iframe) {
+            var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
+            if (iframeWin.document.body) {
+            iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
+            }
+            }
+            };
+
+            window.onload = function () {
+            setIframeHeight(document.getElementById('J_iframe'));
+            };
+        </script>
+    </body>
+</html>

+ 94 - 0
web/application/collect/assets/default/home.html

@@ -0,0 +1,94 @@
+<!doctype html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <title>榜单列表页</title>
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <meta name="apple-mobile-web-app-status-bar-style" content="black">
+        <meta name="format-detection" content="telephone=no">
+        <link rel="stylesheet" type="text/css" href="css/style.css">
+        <script>!function(){var e;e=function(e){return function(e,t){function i(){var t=r.getBoundingClientRect().width;t/m>540&&(t=540*m);var i=t/10;r.style.fontSize=i+"px",d.rem=e.rem=i}var a,n=e.document,r=n.documentElement,o=n.querySelector('meta[name="viewport"]'),l=n.querySelector('meta[name="flexible"]'),m=0,s=0,d=t.flexible||(t.flexible={});if(o){console.warn("将根据已有的meta标签来设置缩放比例");var c=o.getAttribute("content").match(/initial\-scale=([\d\.]+)/);c&&(s=parseFloat(c[1]),m=parseInt(1/s))}else if(l){var p=l.getAttribute("content");if(p){var u=p.match(/initial\-dpr=([\d\.]+)/),f=p.match(/maximum\-dpr=([\d\.]+)/);u&&(m=parseFloat(u[1]),s=parseFloat((1/m).toFixed(2))),f&&(m=parseFloat(f[1]),s=parseFloat((1/m).toFixed(2)))}}if(!m&&!s){var v=(e.navigator.appVersion.match(/android/gi),e.navigator.appVersion.match(/iphone/gi)),h=e.devicePixelRatio;m=v?h>=3&&(!m||m>=3)?3:h>=2&&(!m||m>=2)?2:1:1,s=1/m}if(r.setAttribute("data-dpr",m),!o)if(o=n.createElement("meta"),o.setAttribute("name","viewport"),o.setAttribute("content","initial-scale="+s+", maximum-scale="+s+", minimum-scale="+s+", user-scalable=no"),r.firstElementChild)r.firstElementChild.appendChild(o);else{var x=n.createElement("div");x.appendChild(o),n.write(x.innerHTML)}e.addEventListener("resize",function(){clearTimeout(a),a=setTimeout(i,300)},!1),e.addEventListener("pageshow",function(e){e.persisted&&(clearTimeout(a),a=setTimeout(i,300))},!1),"complete"===n.readyState?n.body.style.fontSize=12*m+"px":n.addEventListener("DOMContentLoaded",function(e){n.body.style.fontSize=12*m+"px"},!1),i(),d.dpr=e.dpr=m,d.refreshRem=i,d.rem2px=function(e){var t=parseFloat(e)*this.rem;return"string"==typeof e&&e.match(/rem$/)&&(t+="px"),t},d.px2rem=function(e){var t=parseFloat(e)/this.rem;return"string"==typeof e&&e.match(/px$/)&&(t+="rem"),t}}(window,window.lib||(window.lib={})),e}()}();</script>
+    </head>
+    <body>
+        <div class="logo">
+            <img src="img/logo.jpg" alt="" />
+        </div>
+        <div class="line"></div>
+        <ul class="list">
+            <li>
+                <a href="detail.html?id=0"><img src="img/xz-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=1"><img src="img/qj-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=2"><img src="img/hzs-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=3"><img src="img/mry-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=4"><img src="img/jh-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=5"><img src="img/ry-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=6"><img src="img/ms-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=7"><img src="img/hfy-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=8"><img src="img/mm-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=9"><img src="img/cbhl-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=10"><img src="img/fs-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=11"><img src="img/dz-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=12"><img src="img/sh-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=13"><img src="img/yy-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=14"><img src="img/yx-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=15"><img src="img/jm-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=16"><img src="img/meimao-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=17"><img src="img/kh-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=18"><img src="img/zjy-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=19"><img src="img/xs-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=20"><img src="img/xf-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=21"><img src="img/zj-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=22"><img src="img/yq-icon.png" alt="" /></a>
+            </li>
+            <li>
+                <a href="detail.html?id=23"><img src="img/nf-icon.png" alt="" /></a>
+            </li>
+        </ul>
+        <div class="line"></div>
+        <div class="bottom"><img src="img/bottom.jpg" alt="" /></div>
+    </body>
+</html>

二進制
web/application/collect/assets/default/img/.DS_Store


二進制
web/application/collect/assets/default/img/bottom.jpg


二進制
web/application/collect/assets/default/img/btn-bg.png


二進制
web/application/collect/assets/default/img/cbhl-icon.png


二進制
web/application/collect/assets/default/img/dz-icon.png


二進制
web/application/collect/assets/default/img/fs-icon.png


二進制
web/application/collect/assets/default/img/hfy-icon.png


二進制
web/application/collect/assets/default/img/hzs-icon.png


二進制
web/application/collect/assets/default/img/jh-icon.png


二進制
web/application/collect/assets/default/img/jm-icon.png


二進制
web/application/collect/assets/default/img/kh-icon.png


二進制
web/application/collect/assets/default/img/logo.jpg


二進制
web/application/collect/assets/default/img/meimao-icon.png


二進制
web/application/collect/assets/default/img/mm-icon.png


二進制
web/application/collect/assets/default/img/mry-icon.png


二進制
web/application/collect/assets/default/img/ms-icon.png


二進制
web/application/collect/assets/default/img/nf-icon.png


二進制
web/application/collect/assets/default/img/qj-icon.png


二進制
web/application/collect/assets/default/img/ry-icon.png


二進制
web/application/collect/assets/default/img/sh-icon.png


二進制
web/application/collect/assets/default/img/top.jpg


二進制
web/application/collect/assets/default/img/txt0.png


二進制
web/application/collect/assets/default/img/txt1.png


二進制
web/application/collect/assets/default/img/txt10.png


二進制
web/application/collect/assets/default/img/txt11.png


二進制
web/application/collect/assets/default/img/txt12.png


二進制
web/application/collect/assets/default/img/txt13.png


二進制
web/application/collect/assets/default/img/txt14.png


二進制
web/application/collect/assets/default/img/txt15.png


二進制
web/application/collect/assets/default/img/txt16.png


二進制
web/application/collect/assets/default/img/txt17.png


二進制
web/application/collect/assets/default/img/txt18.png


二進制
web/application/collect/assets/default/img/txt19.png


二進制
web/application/collect/assets/default/img/txt2.png


二進制
web/application/collect/assets/default/img/txt20.png


二進制
web/application/collect/assets/default/img/txt21.png


二進制
web/application/collect/assets/default/img/txt22.png


二進制
web/application/collect/assets/default/img/txt23.png


二進制
web/application/collect/assets/default/img/txt3.png


二進制
web/application/collect/assets/default/img/txt4.png


二進制
web/application/collect/assets/default/img/txt5.png


二進制
web/application/collect/assets/default/img/txt6.png


二進制
web/application/collect/assets/default/img/txt7.png


二進制
web/application/collect/assets/default/img/txt8.png


二進制
web/application/collect/assets/default/img/txt9.png


二進制
web/application/collect/assets/default/img/xf-icon.png


二進制
web/application/collect/assets/default/img/xs-icon.png


二進制
web/application/collect/assets/default/img/xz-icon.png


二進制
web/application/collect/assets/default/img/yq-icon.png


二進制
web/application/collect/assets/default/img/yx-icon.png


二進制
web/application/collect/assets/default/img/yy-icon.png


二進制
web/application/collect/assets/default/img/zj-icon.png


二進制
web/application/collect/assets/default/img/zjy-icon.png


文件差異過大導致無法顯示
+ 0 - 0
web/application/collect/assets/default/js/zepto.min.js


二進制
web/application/collect/database/.DS_Store


+ 130 - 0
web/application/collect/database/.svn/entries

@@ -0,0 +1,130 @@
+10
+
+dir
+924
+svn://182.92.3.30/project/collect/database
+svn://182.92.3.30/project
+
+
+
+2016-04-11T06:00:02.700480Z
+733
+yubin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+140960d9-11d8-4647-83e1-275f326d1242
+
+config.php
+file
+
+
+
+
+2016-04-15T13:28:45.000000Z
+7974e1827c0c6f52c8bbf045a6fde074
+2016-04-11T06:00:02.700480Z
+733
+yubin
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+9652
+
+data.php
+file
+
+
+
+
+2016-04-15T13:28:45.000000Z
+3bbf8d1c2b63f54593bd7011bed65adf
+2016-04-11T04:20:14.618126Z
+725
+yubin
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3725
+
+cate.php
+file
+
+
+
+
+2016-03-21T14:07:54.000000Z
+29399538166d53ba8e50c4e9ab94645f
+2016-03-21T14:12:19.183235Z
+385
+yubin
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2937
+

+ 5 - 0
web/application/collect/database/.svn/prop-base/cate.php.svn-base

@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END

+ 5 - 0
web/application/collect/database/.svn/prop-base/config.php.svn-base

@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END

+ 5 - 0
web/application/collect/database/.svn/prop-base/data.php.svn-base

@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END

+ 150 - 0
web/application/collect/database/.svn/text-base/cate.php.svn-base

@@ -0,0 +1,150 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
+$cate = function()
+{
+	$array = array(-1 => array('name' => '父级分类'));
+	$cate = Maze::load('collect/cate-main');
+	if($cate)
+	{
+		$array += $cate;
+	}
+	return $array;
+};
+
+$time = time();
+
+return array
+(
+	# 表名
+	'name' => 'cate',
+	# 显示给用户看的名称
+	'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'	=> 'order,fulltext',
+			//'list'		=> '"<a href=\"".Maze::url("thead/list?id={id}", "main")."\" target=\"_blank\">{name}</a>"',
+			'list' 		=> true,
+		),
+
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级分类',
+			'default' 	=> Maze::input('option_cate_id', -1),
+			'desc' 		=> '上级分类',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'search'	=> 'order,select',
+			//'list'		=> '{cate_id} > 0 ? Maze::load("forum/cate-one#name", {cate_id}) : "父级栏目"',
+			'option' 	=> $cate,
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list_name' => '排序',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+		),
+		
+		'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' => 'parent',
+
+		'list_button' => array
+		(
+			21 => array('新增子分类', '"cate&option_cate_id={id}&oper_parent=cate"', '{cate_id}<=0'),
+			//6 => '删除'
+		),
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(	
+		# main 取所有主栏目
+		'main' => array
+		(
+			'where' => array
+			(
+				'cate_id' => -1,
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|id',
+		),
+		
+		# 取所有下级栏目
+		'child' => array
+		(
+			'where' => array
+			(
+				'cate_id' => array('1', '>='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|cate_id|id|',
+		),
+	),
+);

+ 398 - 0
web/application/collect/database/.svn/text-base/config.php.svn-base

@@ -0,0 +1,398 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '可用',
+	2 => '不可用',
+);
+
+$mul = array
+(
+	1 => '开启',
+	2 => '关闭',
+);
+
+$pic = array
+(
+	1 => '关闭',
+	2 => '开启',
+);
+
+$status = array
+(
+	1 => '待机',
+	2 => '运行中',
+	3 => '抓取中',
+	4 => '已完成',
+);
+
+$cate = function()
+{
+	$array = array();
+	$cate = Maze::load('collect/cate-main');
+	if($cate)
+	{
+		$array += $cate;
+	}
+	return $array;
+};
+
+$cate_child = function()
+{
+	$cate = Maze::load('collect/cate-child');
+
+	return $cate;
+};
+
+return array
+(
+	# 表名
+	'name' => 'config',
+	# 显示给用户看的名称
+	'lang' => '采集配置管理',
+	# 后台菜单排序
+	'order' => 20,
+	# 数据结构
+	'struct' => array
+	(
+	
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '配置ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '采集名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入采集名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'cate_id_parent'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '选择分类',
+			'default' 	=> '0',
+			'desc' 		=> '请选择分类',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			//'search'	=> 'order,select',
+			'list_name' => '父级分类',
+			//'list'		=> '{cate_id_parent} > 0 ? Maze::load("collect/cate-one#name", {cate_id_parent}) : "无"',
+			'option' 	=> $cate,
+			# 当值改变时,执行下一步操作
+			'child_name' => 'cate_id',
+			'child' => $cate_child,
+			'child_value' => '{cate_id}',
+		),
+		
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '子分类',
+			'default' 	=> '0',
+			'desc' 		=> '请选择子分类',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'list_name'	=> '子分类',
+			'list'		=> '{cate_id} > 0 ? Maze::load("collect/cate-one#name", {cate_id}) : "无"',
+		),
+		
+		'site'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '采集网址-这里填写采集网址,如果采集的网址和分页的链接不同,需要加入|g|分隔符来确认与分页不同的部分,如果进行单页采集,则|g|失效,同时此处可以填写多个网址,多个换行隔开',
+			'default' 	=> '',
+			'desc' 		=> '采集网址',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+			//'list'		=> true,
+			//'edit'		=> 'textarea',
+		),
+		
+		'site_rule_content'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '是否进行批量采集-默认开启,开启则根据“底层页采集规则”得到下级网址里的内容,否则直接读取采集网址的内容(单页采集)',
+			'default' 	=> '1',
+			'desc' 		=> '是否进行批量采集',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $mul,
+			'update'	=> 'radio',
+		),
+		
+		'site_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '底层页采集规则-使用正则表达式,匹配出当前采集网址里的底层页网址',
+			'default' 	=> '',
+			'desc' 		=> '底层页采集规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'page_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集页数规则-填写采集的页数的正则表达式,加入|g|来设置共采集多少页,如[a-z]|g|10',
+			'default' 	=> '',
+			'desc' 		=> '采集页数规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'name_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集标题规则-填写采集的标题的正则表达式,用来读取的标题',
+			'default' 	=> '',
+			'desc' 		=> '采集标题规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'name_include'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '标题包含字符-如果填写该项,则进一步过滤,只保留包含有该字符的,不支持正则',
+			'default' 	=> '',
+			'desc' 		=> '采集标题规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'content_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集内容规则-填写采集的内容的正则表达式,用来读取的内容',
+			'default' 	=> '',
+			'desc' 		=> '采集内容规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'content_include'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容过滤字符-如果填写该项,则进一步过滤内容,只保留不包含有该字符的内容(注意:和标题包含字符不同),多个规则直接换行,支持正则',
+			'default' 	=> '',
+			'desc' 		=> '采集内容规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'date_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集时间规则-填写采集的时间的正则表达式,用来读取的时间',
+			'default' 	=> '',
+			'desc' 		=> '采集时间规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'intro_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集摘要规则-填写采集的摘要的正则表达式,用来读取的摘要,一般不需要特意采集',
+			'default' 	=> '',
+			'desc' 		=> '采集摘要规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'extend_rule'		=> array
+		(
+			'type' 		=> 'varchar-600',
+			'name' 		=> '采集扩展字段规则-如果需要采集除上述之外的字段的数据,可以通过这个扩展字段规则来定义,多个换行',
+			'default' 	=> '',
+			'desc' 		=> '采集扩展字段规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'extend_name'		=> array
+		(
+			'type' 		=> 'varchar-600',
+			'name' 		=> '扩展字段名称-必须与上述扩展字段规则一一对应,多个换行',
+			'default' 	=> '',
+			'desc' 		=> '扩展字段名称',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'pic_locate'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '图片本地化-默认关闭,将图片抓取到本站来,开启后抓取效率会降低',
+			'default' 	=> '1',
+			'desc' 		=> '图片本地化',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $pic,
+			//'update'	=> 'radio',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $status,
+			'list'		=> true,
+			'edit'		=> true,
+			'update'	=> 'radio',
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '抓取次数',
+			'default' 	=> '0',
+			'desc' 		=> '抓取次数',
+			'match' 	=> 'is_numeric',
+			'list'		=> true,
+		),
+
+		'sdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '抓取开始时间',
+			'default' 	=> '0',
+			'desc' 		=> '抓取开始时间',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {sdate})',
+			'callback'	=> 'maketime',
+		),
+
+		'time'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '抓取间隔秒数-填写开始时间之后的间隔抓取的秒数,为0则只抓取一次',
+			'default' 	=> '0',
+			'desc' 		=> '抓取间隔秒数',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+		),
+		
+		'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
+	(
+		# 更新数据时,要显示的按钮,这里填写js脚本事件即可。保存当前数据可为固定参数:"save-data",复制数据为:copy-data
+		'update_button' => array
+		(
+			'提交保存' => 'save-data',
+			'放弃保存' => "msg({status:1,msg:'yes'})",
+			'复制数据' => 'copy-data',
+		),
+
+		# 不允许编辑
+		//'edit' => false,
+		
+		# 列表页的类型
+		//'list_type' => 'parent',
+		
+		# 可以删除
+		'list_button' => array
+		(
+			11 => array('数据列表', '"data&option_config_id={id}&oper_save_jump=config&oper_parent=config"'),
+			6 => array('采集数据', 'Maze::url("collect/data.daemon?id={id}&")'),
+			//22 => array('新增设备', '"system&option_system_id={id}&oper_save_jump=system&oper_parent=system"', '{system_id}==-1'),
+			//6 => '删除'
+		),
+		
+		//'desc' => '注意:命令码',
+	),
+
+	'alter' => array
+	(
+		1 => array
+		(
+			array('update', 'content_include', 'content_include', 'text-255  内容'),//更新字段
+		),
+		'version' => 1,
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(	
+		# 获取所有待机并且符合当前时间的配置
+		'get' => array
+		(
+			'option' => array
+			(
+				'id' => 'yes',
+				'status' => array('yes', '<='),
+				'sdate' => array('yes-sdate`+`time', '<='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder' => 'desc', 'id' => 'desc'),
+			'col' => '*',
+		),
+
+		# 获取所有运行中的数据
+		'getOne' => array
+		(
+			'option' => array
+			(
+				'id' => 'yes',
+				'status' => array('yes'),
+				'sdate' => array('yes-sdate`+`time', '<='),
+				'state' => 1,
+			),
+			'type' => 'one',
+		),
+	)
+);

+ 190 - 0
web/application/collect/database/.svn/text-base/data.php.svn-base

@@ -0,0 +1,190 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '正常',
+	2 => '删除',
+);
+return array
+(
+	# 表名
+	'name' => 'data',
+	# 显示给用户看的名称
+	'lang' => '数据管理',
+	# 后台菜单排序
+	'order' => 6,
+	# 数据结构
+	'struct' => array
+	(
+	
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+
+		'source_link'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '来源网址',
+			'default' 	=> '',
+			'desc' 		=> '来源网址',
+			'match' 	=> 'is_string',
+			//'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'source_list'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '来源网址所属列表页',
+			'default' 	=> '',
+			'desc' 		=> '来源网址所属列表页',
+			'match' 	=> 'is_string',
+			//'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '请输入标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+			'edit'		=> 'textarea',
+		),
+
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分类id',
+			'default' 	=> '1',
+			'desc' 		=> '请选择分类id',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> '{cate_id} > 0 ? Maze::load("collect/cate-one#name", {cate_id}) : "无"',
+			# 开启显示控制,可以控制下边的表单
+			//'show'		=> 'cate_id',
+		),
+
+		'config_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '配置id',
+			'default' 	=> '1',
+			'desc' 		=> '请选择配置id',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> '{config_id} > 0 ? Maze::load("collect/config-one#name", {config_id}) : "无"',
+			# 开启显示控制,可以控制下边的表单
+			//'show'		=> 'cate_id',
+		),
+		
+		'info'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '摘要',
+			'default' 	=> '',
+			'desc' 		=> '请输入摘要',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+			//'edit'		=> true,
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-1000',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key'		=> 1,
+		),
+
+		'extend'		=> array
+		(
+			'type' 		=> 'text-1000',
+			'name' 		=> '扩展信息',
+			'default' 	=> '',
+			'desc' 		=> '请扩展信息',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+			//'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '数据状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			//'update'	=> 'radio',
+		),
+		
+		'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
+	(
+		# 开启批量管理
+		'mul' => true,
+		'insert' => false,
+		'list_button' => array(6 => '删除'),
+	),
+
+	
+	# request 请求接口定义
+	'request' => array
+	(		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'config_id' => 'yes',
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('id', 'asc'),
+		),
+	),
+);

+ 150 - 0
web/application/collect/database/cate.php

@@ -0,0 +1,150 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
+$cate = function()
+{
+	$array = array(-1 => array('name' => '父级分类'));
+	$cate = Dever::load('collect/cate-main');
+	if($cate)
+	{
+		$array += $cate;
+	}
+	return $array;
+};
+
+$time = time();
+
+return array
+(
+	# 表名
+	'name' => 'cate',
+	# 显示给用户看的名称
+	'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'	=> 'order,fulltext',
+			//'list'		=> '"<a href=\"".Dever::url("thead/list?id={id}", "main")."\" target=\"_blank\">{name}</a>"',
+			'list' 		=> true,
+		),
+
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '上级分类',
+			'default' 	=> Dever::input('option_cate_id', -1),
+			'desc' 		=> '上级分类',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'search'	=> 'order,select',
+			//'list'		=> '{cate_id} > 0 ? Dever::load("forum/cate-one#name", {cate_id}) : "父级栏目"',
+			'option' 	=> $cate,
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list_name' => '排序',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+		),
+		
+		'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' => 'parent',
+
+		'list_button' => array
+		(
+			21 => array('新增子分类', '"cate&option_cate_id={id}&oper_parent=cate"', '{cate_id}<=0'),
+			//6 => '删除'
+		),
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(	
+		# main 取所有主栏目
+		'main' => array
+		(
+			'where' => array
+			(
+				'cate_id' => -1,
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|id',
+		),
+		
+		# 取所有下级栏目
+		'child' => array
+		(
+			'where' => array
+			(
+				'cate_id' => array('1', '>='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder` desc,`id', 'desc'),
+			'col' => '*|cate_id|id|',
+		),
+	),
+);

+ 398 - 0
web/application/collect/database/config.php

@@ -0,0 +1,398 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '可用',
+	2 => '不可用',
+);
+
+$mul = array
+(
+	1 => '开启',
+	2 => '关闭',
+);
+
+$pic = array
+(
+	1 => '关闭',
+	2 => '开启',
+);
+
+$status = array
+(
+	1 => '待机',
+	2 => '运行中',
+	3 => '抓取中',
+	4 => '已完成',
+);
+
+$cate = function()
+{
+	$array = array();
+	$cate = Dever::load('collect/cate-main');
+	if($cate)
+	{
+		$array += $cate;
+	}
+	return $array;
+};
+
+$cate_child = function()
+{
+	$cate = Dever::load('collect/cate-child');
+
+	return $cate;
+};
+
+return array
+(
+	# 表名
+	'name' => 'config',
+	# 显示给用户看的名称
+	'lang' => '采集配置管理',
+	# 后台菜单排序
+	'order' => 20,
+	# 数据结构
+	'struct' => array
+	(
+	
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '配置ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '采集名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入采集名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'cate_id_parent'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '选择分类',
+			'default' 	=> '0',
+			'desc' 		=> '请选择分类',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			//'search'	=> 'order,select',
+			'list_name' => '父级分类',
+			//'list'		=> '{cate_id_parent} > 0 ? Dever::load("collect/cate-one#name", {cate_id_parent}) : "无"',
+			'option' 	=> $cate,
+			# 当值改变时,执行下一步操作
+			//'child_name' => 'cate_id',
+			//'child' => $cate_child,
+			//'child_value' => '{cate_id}',
+		),
+		
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '子分类',
+			'default' 	=> '0',
+			'desc' 		=> '请选择子分类',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'list_name'	=> '子分类',
+			'list'		=> '{cate_id} > 0 ? Dever::load("collect/cate-one#name", {cate_id}) : "无"',
+		),
+		
+		'site'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '采集网址-这里填写采集网址,如果采集的网址和分页的链接不同,需要加入|g|分隔符来确认与分页不同的部分,如果进行单页采集,则|g|失效,同时此处可以填写多个网址,多个换行隔开',
+			'default' 	=> '',
+			'desc' 		=> '采集网址',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+			//'list'		=> true,
+			//'edit'		=> 'textarea',
+		),
+		
+		'site_rule_content'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '是否进行批量采集-默认开启,开启则根据“底层页采集规则”得到下级网址里的内容,否则直接读取采集网址的内容(单页采集)',
+			'default' 	=> '1',
+			'desc' 		=> '是否进行批量采集',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $mul,
+			'update'	=> 'radio',
+		),
+		
+		'site_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '底层页采集规则-使用正则表达式,匹配出当前采集网址里的底层页网址',
+			'default' 	=> '',
+			'desc' 		=> '底层页采集规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'page_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集页数规则-填写采集的页数的正则表达式,加入|g|来设置共采集多少页,如[a-z]|g|10',
+			'default' 	=> '',
+			'desc' 		=> '采集页数规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'name_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集标题规则-填写采集的标题的正则表达式,用来读取的标题',
+			'default' 	=> '',
+			'desc' 		=> '采集标题规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'name_include'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '标题包含字符-如果填写该项,则进一步过滤,只保留包含有该字符的,不支持正则',
+			'default' 	=> '',
+			'desc' 		=> '采集标题规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'content_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集内容规则-填写采集的内容的正则表达式,用来读取的内容',
+			'default' 	=> '',
+			'desc' 		=> '采集内容规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'content_include'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容过滤字符-如果填写该项,则进一步过滤内容,只保留不包含有该字符的内容(注意:和标题包含字符不同),多个规则直接换行,支持正则',
+			'default' 	=> '',
+			'desc' 		=> '采集内容规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'date_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集时间规则-填写采集的时间的正则表达式,用来读取的时间',
+			'default' 	=> '',
+			'desc' 		=> '采集时间规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'intro_rule'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '采集摘要规则-填写采集的摘要的正则表达式,用来读取的摘要,一般不需要特意采集',
+			'default' 	=> '',
+			'desc' 		=> '采集摘要规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'extend_rule'		=> array
+		(
+			'type' 		=> 'varchar-600',
+			'name' 		=> '采集扩展字段规则-如果需要采集除上述之外的字段的数据,可以通过这个扩展字段规则来定义,多个换行',
+			'default' 	=> '',
+			'desc' 		=> '采集扩展字段规则',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'extend_name'		=> array
+		(
+			'type' 		=> 'varchar-600',
+			'name' 		=> '扩展字段名称-必须与上述扩展字段规则一一对应,多个换行',
+			'default' 	=> '',
+			'desc' 		=> '扩展字段名称',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'pic_locate'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '图片本地化-默认关闭,将图片抓取到本站来,开启后抓取效率会降低',
+			'default' 	=> '1',
+			'desc' 		=> '图片本地化',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $pic,
+			//'update'	=> 'radio',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $status,
+			'list'		=> true,
+			'edit'		=> true,
+			'update'	=> 'radio',
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '抓取次数',
+			'default' 	=> '0',
+			'desc' 		=> '抓取次数',
+			'match' 	=> 'is_numeric',
+			'list'		=> true,
+		),
+
+		'sdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '抓取开始时间',
+			'default' 	=> '0',
+			'desc' 		=> '抓取开始时间',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {sdate})',
+			'callback'	=> 'maketime',
+		),
+
+		'time'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '抓取间隔秒数-填写开始时间之后的间隔抓取的秒数,为0则只抓取一次',
+			'default' 	=> '0',
+			'desc' 		=> '抓取间隔秒数',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+		),
+		
+		'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
+	(
+		# 更新数据时,要显示的按钮,这里填写js脚本事件即可。保存当前数据可为固定参数:"save-data",复制数据为:copy-data
+		'update_button' => array
+		(
+			'提交保存' => 'save-data',
+			'放弃保存' => "msg({status:1,msg:'yes'})",
+			'复制数据' => 'copy-data',
+		),
+
+		# 不允许编辑
+		//'edit' => false,
+		
+		# 列表页的类型
+		//'list_type' => 'parent',
+		
+		# 可以删除
+		'list_button' => array
+		(
+			11 => array('数据列表', '"data&option_config_id={id}&oper_save_jump=config&oper_parent=config"'),
+			6 => array('采集数据', 'Dever::url("collect/data.daemon?id={id}&")'),
+			//22 => array('新增设备', '"system&option_system_id={id}&oper_save_jump=system&oper_parent=system"', '{system_id}==-1'),
+			//6 => '删除'
+		),
+		
+		//'desc' => '注意:命令码',
+	),
+
+	'alter' => array
+	(
+		1 => array
+		(
+			array('update', 'content_include', 'content_include', 'text-255  内容'),//更新字段
+		),
+		'version' => 1,
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(	
+		# 获取所有待机并且符合当前时间的配置
+		'get' => array
+		(
+			'option' => array
+			(
+				'id' => 'yes',
+				'status' => array('yes', '<='),
+				'sdate' => array('yes-sdate`+`time', '<='),
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder' => 'desc', 'id' => 'desc'),
+			'col' => '*',
+		),
+
+		# 获取所有运行中的数据
+		'getOne' => array
+		(
+			'option' => array
+			(
+				'id' => 'yes',
+				'status' => array('yes'),
+				'sdate' => array('yes-sdate`+`time', '<='),
+				'state' => 1,
+			),
+			'type' => 'one',
+		),
+	)
+);

+ 190 - 0
web/application/collect/database/data.php

@@ -0,0 +1,190 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '正常',
+	2 => '删除',
+);
+return array
+(
+	# 表名
+	'name' => 'data',
+	# 显示给用户看的名称
+	'lang' => '数据管理',
+	# 后台菜单排序
+	'order' => 6,
+	# 数据结构
+	'struct' => array
+	(
+	
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+
+		'source_link'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '来源网址',
+			'default' 	=> '',
+			'desc' 		=> '来源网址',
+			'match' 	=> 'is_string',
+			//'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'source_list'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '来源网址所属列表页',
+			'default' 	=> '',
+			'desc' 		=> '来源网址所属列表页',
+			'match' 	=> 'is_string',
+			//'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '请输入标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+			'edit'		=> 'textarea',
+		),
+
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分类id',
+			'default' 	=> '1',
+			'desc' 		=> '请选择分类id',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> '{cate_id} > 0 ? Dever::load("collect/cate-one#name", {cate_id}) : "无"',
+			# 开启显示控制,可以控制下边的表单
+			//'show'		=> 'cate_id',
+		),
+
+		'config_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '配置id',
+			'default' 	=> '1',
+			'desc' 		=> '请选择配置id',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> '{config_id} > 0 ? Dever::load("collect/config-one#name", {config_id}) : "无"',
+			# 开启显示控制,可以控制下边的表单
+			//'show'		=> 'cate_id',
+		),
+		
+		'info'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '摘要',
+			'default' 	=> '',
+			'desc' 		=> '请输入摘要',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+			//'edit'		=> true,
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-1000',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key'		=> 1,
+		),
+
+		'extend'		=> array
+		(
+			'type' 		=> 'text-1000',
+			'name' 		=> '扩展信息',
+			'default' 	=> '',
+			'desc' 		=> '请扩展信息',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+			//'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '数据状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			//'update'	=> 'radio',
+		),
+		
+		'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
+	(
+		# 开启批量管理
+		'mul' => true,
+		'insert' => false,
+		'list_button' => array(6 => '删除'),
+	),
+
+	
+	# request 请求接口定义
+	'request' => array
+	(		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'config_id' => 'yes',
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('id', 'asc'),
+		),
+	),
+);

部分文件因文件數量過多而無法顯示