active.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <?php
  2. $status = array
  3. (
  4. 1 => '开启',
  5. 2 => '关闭',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'active',
  11. # 显示给用户看的名称
  12. 'lang' => '活动设置',
  13. 'menu' => false,
  14. 'end' => array
  15. (
  16. //'update' => 'service/lib/manage.feedback',
  17. //'insert' => 'service/lib/manage.feedback',
  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. 'search' => 'order',
  30. 'update' => 'hidden',
  31. 'value' => Dever::input('where_id')
  32. //'list' => true,
  33. ),
  34. 'info_id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => '小刊',
  38. 'default' => '',
  39. 'desc' => '小刊',
  40. 'match' => 'is_numeric',
  41. 'update' => 'hidden',
  42. 'value' => Dever::input('search_option_info_id')
  43. ),
  44. 'status' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '活动状态',
  48. 'default' => '1',
  49. 'desc' => '活动状态',
  50. 'match' => 'is_numeric',
  51. 'update' => 'radio',
  52. 'option' => $status,
  53. ),
  54. 'name' => array
  55. (
  56. 'type' => 'varchar-80',
  57. 'name' => '活动标题',
  58. 'default' => '',
  59. 'desc' => '活动标题',
  60. 'match' => 'is_string',
  61. 'update' => 'text',
  62. 'search' => 'fulltext',
  63. 'list' => true,
  64. ),
  65. 'start' => array
  66. (
  67. 'type' => 'int-11',
  68. 'default' => '',
  69. 'name' => '活动开始时间',
  70. 'match' => 'is_string',
  71. 'desc' => '活动开始时间',
  72. 'update' => 'date',
  73. 'list' => 'date("Y-m-d H:i:s", {start})',
  74. 'callback' => 'maketime',
  75. ),
  76. 'end' => array
  77. (
  78. 'type' => 'int-11',
  79. 'default' => '',
  80. 'name' => '活动结束时间',
  81. 'match' => 'is_string',
  82. 'desc' => '活动结束时间',
  83. 'update' => 'date',
  84. 'list' => 'date("Y-m-d H:i:s", {end})',
  85. 'callback' => 'maketime',
  86. ),
  87. 'desc' => array
  88. (
  89. 'type' => 'text-255',
  90. 'name' => '活动描述',
  91. 'default' => '',
  92. 'desc' => '活动描述',
  93. 'match' => 'option',
  94. 'update' => 'editor',
  95. 'key' => 1,
  96. //'search' => 'fulltext',
  97. //'list' => true,
  98. ),
  99. 'invite_num' => array
  100. (
  101. 'type' => 'int-11',
  102. 'name' => '邀请多少个好友开启免费阅读',
  103. 'default' => '10',
  104. 'desc' => '邀请多少个好友开启免费阅读',
  105. 'match' => 'is_numeric',
  106. 'update' => 'text',
  107. ),
  108. 'invite_score' => array
  109. (
  110. 'type' => 'int-11',
  111. 'name' => '每邀请一个好友获得积分-仅支持邀请新用户,设置之后,积分规则里的设置将失效',
  112. 'default' => '2',
  113. 'desc' => '每邀请一个好友获得积分',
  114. 'match' => 'is_numeric',
  115. 'update' => 'text',
  116. ),
  117. 'invite_title' => array
  118. (
  119. 'type' => 'varchar-80',
  120. 'name' => '邀请好友标题',
  121. 'default' => '邀请好友获得积分',
  122. 'desc' => '邀请好友标题',
  123. 'match' => 'is_string',
  124. 'update' => 'text',
  125. ),
  126. 'invite_desc' => array
  127. (
  128. 'type' => 'varchar-800',
  129. 'name' => '邀请好友标题介绍',
  130. 'default' => '邀请10人开启免费阅读',
  131. 'desc' => '邀请好友标题介绍',
  132. 'match' => 'is_string',
  133. 'update' => 'textarea',
  134. ),
  135. 'content' => array
  136. (
  137. 'type' => 'text-255',
  138. 'name' => '活动规则说明',
  139. 'default' => '',
  140. 'desc' => '活动规则说明',
  141. 'match' => 'is_string',
  142. 'update' => 'editor',
  143. 'key' => 1,
  144. ),
  145. 'state' => array
  146. (
  147. 'type' => 'tinyint-1',
  148. 'name' => '状态',
  149. 'default' => '1',
  150. 'desc' => '请选择状态',
  151. 'match' => 'is_numeric',
  152. ),
  153. 'cdate' => array
  154. (
  155. 'type' => 'int-11',
  156. 'name' => '创建时间',
  157. 'match' => array('is_numeric', time()),
  158. 'desc' => '',
  159. # 只有insert时才生效
  160. 'insert' => true,
  161. 'search' => 'date',
  162. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  163. ),
  164. ),
  165. # 更新表结构
  166. 'alter' => array
  167. (
  168. 2 => array
  169. (
  170. array('update', 'desc', 'desc', 'text-255 描述'),
  171. //array('add', 'config', 'config', 'int-11 1 配置'),
  172. ),
  173. 'version' => 2,
  174. ),
  175. 'manage' => array
  176. (
  177. ),
  178. );