filter.php 2.1 KB

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