level.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. $config = function()
  3. {
  4. $array = array();
  5. $info = Dever::db('score/config')->state();
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'level',
  16. # 显示给用户看的名称
  17. 'lang' => '积分等级设置',
  18. # 后台菜单排序
  19. 'order' => 8,
  20. 'check' => 'level',
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. //'list' => true,
  33. //'order' => 'desc',
  34. ),
  35. 'name' => array
  36. (
  37. 'type' => 'varchar-32',
  38. 'name' => '等级名称',
  39. 'default' => '',
  40. 'desc' => '请输入名称',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'search' => 'fulltext',
  44. 'list' => true,
  45. ),
  46. 'score' => array
  47. (
  48. 'type' => 'text-1000',
  49. 'name' => '积分设置',
  50. 'default' => '',
  51. 'desc' => '积分设置',
  52. 'match' => 'is_string',
  53. 'update' => array
  54. (
  55. array
  56. (
  57. 'col' => 'config',
  58. 'name' => '积分名称',
  59. 'default' => '',
  60. 'desc' => '积分名称',
  61. 'match' => 'is_string',
  62. 'update' => 'select',
  63. 'option' => $config,
  64. ),
  65. array
  66. (
  67. 'col' => 'num',
  68. 'name' => '所需积分数',
  69. 'default' => '0',
  70. 'desc' => '所需积分数',
  71. 'match' => 'is_string',
  72. 'update' => 'text',
  73. ),
  74. ),
  75. ),
  76. 'level' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '等级数字-请直接输入等级数字,每次升级按照该数字进行匹配,如果设置为1,则为lv1,不允许重复,用户升级',
  80. 'default' => '1',
  81. 'desc' => '等级数字',
  82. 'match' => 'option',
  83. 'update' => 'text',
  84. 'search' => 'order',
  85. 'list' => true,
  86. 'order' => 'desc',
  87. 'edit' => true,
  88. ),
  89. 'state' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '状态',
  93. 'default' => '1',
  94. 'desc' => '请选择状态',
  95. 'match' => 'is_numeric',
  96. ),
  97. 'cdate' => array
  98. (
  99. 'type' => 'int-11',
  100. 'name' => '录入时间',
  101. 'match' => array('is_numeric', time()),
  102. 'desc' => '',
  103. # 只有insert时才生效
  104. 'insert' => true,
  105. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  106. ),
  107. ),
  108. 'manage' => array
  109. (
  110. ),
  111. 'request' => array
  112. (
  113. ),
  114. );