help.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'help',
  6. # 显示给用户看的名称
  7. 'lang' => '帮助中心',
  8. 'order' => 8,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'search' => 'order',
  20. 'list' => true,
  21. ),
  22. 'name' => array
  23. (
  24. 'type' => 'varchar-24',
  25. 'name' => '名称',
  26. 'default' => '',
  27. 'desc' => '名称',
  28. 'match' => 'is_string',
  29. 'update' => 'text',
  30. 'search' => 'order,fulltext',
  31. 'list' => true,
  32. //'modal' => '点此打开',
  33. ),
  34. 'content' => array
  35. (
  36. 'type' => 'text-1000',
  37. 'name' => '内容',
  38. 'default' => '',
  39. 'desc' => '请输入内容',
  40. 'match' => 'option',
  41. 'update' => 'editor',
  42. ),
  43. 'reorder' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '排序(数值越大越靠前)',
  47. 'default' => '1',
  48. 'desc' => '请输入排序',
  49. 'match' => 'option',
  50. 'update' => 'text',
  51. 'search' => 'order',
  52. 'list' => true,
  53. 'order' => 'desc',
  54. 'edit' => true,
  55. ),
  56. 'state' => array
  57. (
  58. 'type' => 'tinyint-1',
  59. 'name' => '状态',
  60. 'default' => '1',
  61. 'desc' => '请选择状态',
  62. 'match' => 'is_numeric',
  63. //'option' => $option,
  64. //'update' => 'radio',
  65. ),
  66. 'cdate' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '录入时间',
  70. 'match' => array('is_numeric', time()),
  71. 'desc' => '',
  72. # 只有insert时才生效
  73. 'insert' => true,
  74. ),
  75. ),
  76. # 索引
  77. 'index' => array
  78. (
  79. # 索引名 => 索引id
  80. ),
  81. # 管理功能
  82. 'manage' => array
  83. (
  84. ),
  85. 'request' => array
  86. (
  87. 'getAll' => array
  88. (
  89. # 匹配的正则或函数 选填项
  90. 'option' => array
  91. (
  92. 'state' => 1,
  93. ),
  94. 'type' => 'all',
  95. 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
  96. 'page' => array(15, 'list'),
  97. 'col' => '*',
  98. ),
  99. )
  100. );