col.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. # 定义几个常用的选项
  3. $option = array
  4. (
  5. 1 => '正常',
  6. 2 => '删除',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'col',
  12. # 显示给用户看的名称
  13. 'lang' => '采集字段管理',
  14. 'menu' => false,
  15. # 后台菜单排序
  16. 'order' => 6,
  17. 'desc' => 'dom解析:类似jquery的解析方式,如$("#id")->find("a")->attr("class")',
  18. # 数据结构
  19. 'struct' => array
  20. (
  21. 'id' => array
  22. (
  23. 'type' => 'int-11',
  24. 'name' => 'ID',
  25. 'default' => '',
  26. 'desc' => '',
  27. 'match' => 'is_numeric',
  28. 'search' => 'order',
  29. 'list' => true,
  30. 'order' => 'desc',
  31. ),
  32. 'name' => array
  33. (
  34. 'type' => 'varchar-100',
  35. 'name' => '字段名称',
  36. 'default' => '',
  37. 'desc' => '字段名称',
  38. 'match' => 'is_string',
  39. 'update' => 'text',
  40. 'search' => 'fulltext',
  41. 'list' => true,
  42. ),
  43. 'key' => array
  44. (
  45. 'type' => 'varchar-100',
  46. 'name' => '字段唯一标识符',
  47. 'default' => '',
  48. 'desc' => '字段唯一标识符',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. ),
  54. 'project_id' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '项目id',
  58. 'default' => Dever::input('option_project_id', -1),
  59. 'desc' => '请选择项目id',
  60. 'match' => 'is_numeric',
  61. 'search' => 'order',
  62. ),
  63. 'collect_rule' => array
  64. (
  65. 'type' => 'varchar-500',
  66. 'name' => '采集规则-支持dom解析、正则',
  67. 'default' => '',
  68. 'desc' => '采集规则',
  69. 'match' => 'is_string',
  70. 'update' => 'textarea',
  71. //'edit' => true,
  72. ),
  73. 'collect_include' => array
  74. (
  75. 'type' => 'varchar-500',
  76. 'name' => '包含字符-如果填写该项,则进一步过滤,只保留包含有该字符的,支持dom解析、正则',
  77. 'default' => '',
  78. 'desc' => '采集规则',
  79. 'match' => 'option',
  80. 'update' => 'textarea',
  81. ),
  82. 'collect_exclude' => array
  83. (
  84. 'type' => 'varchar-500',
  85. 'name' => '不包含字符-如果填写该项,则进一步过滤,只保留不包含有该字符的,支持dom解析、正则',
  86. 'default' => '',
  87. 'desc' => '采集规则',
  88. 'match' => 'option',
  89. 'update' => 'textarea',
  90. ),
  91. 'state' => array
  92. (
  93. 'type' => 'tinyint-1',
  94. 'name' => '数据状态',
  95. 'default' => '1',
  96. 'desc' => '请选择状态',
  97. ),
  98. 'cdate' => array
  99. (
  100. 'type' => 'int-11',
  101. 'name' => '录入时间',
  102. 'match' => array('is_numeric', time()),
  103. 'desc' => '',
  104. # 只有insert时才生效
  105. //'insert' => true,
  106. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  107. ),
  108. ),
  109. );