config.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. $type = array
  3. (
  4. 1 => '主积分',
  5. 2 => '普通积分',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'config',
  11. # 显示给用户看的名称
  12. 'lang' => '积分名称设置',
  13. 'order' => 1,
  14. 'end' => array
  15. (
  16. 'insert' => 'score/lib/manage.config',
  17. 'update' => 'score/lib/manage.config',
  18. ),
  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. ),
  30. 'name' => array
  31. (
  32. 'type' => 'varchar-32',
  33. 'name' => '积分名称',
  34. 'default' => '',
  35. 'desc' => '请输入积分名称',
  36. 'match' => 'is_string',
  37. 'update' => 'text',
  38. 'search' => 'fulltext',
  39. 'list' => true,
  40. ),
  41. 'type' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '是否主积分-只能有一个主积分,主积分将作为用户主要积分显示在用户信息中',
  45. 'default' => '2',
  46. 'desc' => '是否主积分',
  47. 'match' => 'is_numeric',
  48. 'update' => 'select',
  49. 'option' => $type,
  50. 'search' => 'select',
  51. 'list' => true,
  52. ),
  53. 'reorder' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '排序(数值越大越靠前)',
  57. 'default' => '1',
  58. 'desc' => '请输入排序',
  59. 'match' => 'option',
  60. 'update' => 'text',
  61. 'search' => 'order',
  62. 'list' => true,
  63. 'order' => 'desc',
  64. 'edit' => true,
  65. ),
  66. 'state' => array
  67. (
  68. 'type' => 'tinyint-1',
  69. 'name' => '状态',
  70. 'default' => '1',
  71. 'desc' => '请选择状态',
  72. 'match' => 'is_numeric',
  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. ),
  83. ),
  84. 'manage' => array
  85. (
  86. # 列表
  87. 'list_button' => array
  88. (
  89. 'list' => array('规则设置', '"rule&search_option_config_id={id}&oper_parent=config"'),
  90. ),
  91. ),
  92. 'request' => array
  93. (
  94. # 更新
  95. 'set' => array
  96. (
  97. 'type' => 'update',
  98. 'set' => array
  99. (
  100. 'type' => '2',
  101. ),
  102. ),
  103. ),
  104. );