config.php 2.3 KB

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