filter.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. # 定义几个常用的选项
  3. $status = array
  4. (
  5. 1 => '未审核',
  6. 2 => '审核通过',
  7. 3 => '审核未通过',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'filter',
  13. # 显示给用户看的名称
  14. 'lang' => '过滤词配置',
  15. 'order' => 1,
  16. 'menu' => false,
  17. 'check' => 'name',
  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. 'order' => 'desc',
  29. ),
  30. 'name' => array
  31. (
  32. 'type' => 'varchar-50',
  33. 'name' => '过滤词-请填写一些常用的黑名单词汇',
  34. 'default' => '',
  35. 'desc' => '请输入过滤词',
  36. 'match' => 'is_string',
  37. 'update' => 'text',
  38. 'search' => 'fulltext',
  39. 'list' => true,
  40. ),
  41. 'num' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '过滤次数',
  45. 'default' => '',
  46. 'desc' => '请输入过滤次数',
  47. 'match' => 'is_numeric',
  48. //'update' => 'text',
  49. //'search' => 'fulltext',
  50. 'list' => true,
  51. ),
  52. 'status' => array
  53. (
  54. 'type' => 'tinyint-1',
  55. 'name' => '审核状态',
  56. 'default' => '1',
  57. 'desc' => '请选择审核状态',
  58. 'match' => 'is_numeric',
  59. 'option' => $status,
  60. 'update' => 'radio',
  61. 'list' => true,
  62. 'edit' => true,
  63. ),
  64. 'state' => array
  65. (
  66. 'type' => 'tinyint-1',
  67. 'name' => '数据状态',
  68. 'default' => '1',
  69. 'desc' => '请选择数据状态',
  70. 'match' => 'is_numeric',
  71. //'option' => $option,
  72. //'update' => 'radio',
  73. //'list' => true,
  74. ),
  75. 'cdate' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '录入时间',
  79. 'match' => array('is_numeric', time()),
  80. 'desc' => '',
  81. # 只有insert时才生效
  82. 'insert' => true,
  83. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  84. ),
  85. ),
  86. # 后台管理
  87. 'manage' => array
  88. (
  89. # 自定义页面
  90. 'page_list' => 'test',
  91. # 是否有删除按钮
  92. 'delete' => 1,
  93. # 是否物理删除
  94. //'delete' => 2,
  95. ),
  96. # request 请求接口定义
  97. 'request' => array
  98. (
  99. 'up' => array
  100. (
  101. 'where' => array
  102. (
  103. 'id' => 'yes',
  104. ),
  105. 'set' => array
  106. (
  107. 'num' => array(1, '+='),
  108. ),
  109. 'type' => 'update',
  110. ),
  111. )
  112. );