community.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. $community_cate = function()
  3. {
  4. $array = array();
  5. $info = Dever::db('community/cate')->state();
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'community',
  16. # 显示给用户看的名称
  17. 'lang' => '社区设置',
  18. 'menu' => false,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'update' => 'hidden',
  31. //'list' => true,
  32. ),
  33. 'info_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '合集',
  37. 'default' => '',
  38. 'desc' => '合集',
  39. 'match' => 'is_numeric',
  40. 'update' => 'hidden',
  41. 'value' => Dever::input('search_option_info_id')
  42. ),
  43. 'cate' => array
  44. (
  45. 'type' => 'varchar-180',
  46. 'name' => '社区分类',
  47. 'default' => '1,2,3',
  48. 'desc' => '社区分类',
  49. 'match' => 'is_numeric',
  50. 'update' => 'checkbox',
  51. 'option' => $community_cate,
  52. ),
  53. 'cate_name' => array
  54. (
  55. 'type' => 'varchar-200',
  56. 'name' => '社区分类自定义名称-多个用逗号隔开,更上面选择的社区分类对应',
  57. 'default' => '',
  58. 'desc' => '社区分类自定义名称',
  59. 'match' => 'option',
  60. 'update' => 'textarea',
  61. ),
  62. 'state' => array
  63. (
  64. 'type' => 'tinyint-1',
  65. 'name' => '状态',
  66. 'default' => '1',
  67. 'desc' => '请选择状态',
  68. 'match' => 'is_numeric',
  69. ),
  70. 'cdate' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '创建时间',
  74. 'match' => array('is_numeric', time()),
  75. 'desc' => '',
  76. # 只有insert时才生效
  77. 'insert' => true,
  78. 'search' => 'date',
  79. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  80. ),
  81. ),
  82. 'manage' => array
  83. (
  84. ),
  85. 'request' => array
  86. (
  87. ),
  88. );