model.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?php
  2. $type = array
  3. (
  4. 1 => '图片',
  5. 2 => '文字',
  6. );
  7. $fonts = array
  8. (
  9. 1 => '常规',
  10. 2 => '粗体',
  11. 3 => '中等',
  12. );
  13. $position_type = array
  14. (
  15. 1 => '左上角',
  16. 2 => '左下角',
  17. 3 => '右上角',
  18. 4 => '右下角',
  19. 5 => '居中',
  20. 6 => '上居中',
  21. 7 => '下居中',
  22. 8 => '自定义',
  23. );
  24. return array
  25. (
  26. # 表名
  27. 'name' => 'model',
  28. # 显示给用户看的名称
  29. 'lang' => '模块设置',
  30. 'menu' => false,
  31. 'check' => 'template_id,key',
  32. # 数据结构
  33. 'struct' => array
  34. (
  35. 'id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => 'ID',
  39. 'default' => '',
  40. 'desc' => '',
  41. 'match' => 'is_numeric',
  42. 'search' => 'order',
  43. //'list' => true,
  44. ),
  45. 'template_id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '所属模板',
  49. 'default' => '1',
  50. 'desc' => '请选择所属模板',
  51. 'match' => 'is_numeric',
  52. 'update' => 'hidden',
  53. 'value' => Dever::input('search_option_template_id')
  54. ),
  55. 'name' => array
  56. (
  57. 'type' => 'varchar-32',
  58. 'name' => '模块名称',
  59. 'default' => '',
  60. 'desc' => '模块名称',
  61. 'match' => 'is_string',
  62. 'update' => 'text',
  63. 'search' => 'fulltext',
  64. 'list' => true,
  65. ),
  66. 'key' => array
  67. (
  68. 'type' => 'varchar-32',
  69. 'name' => '模块标识-设置模块时,使用该标识来设置模块信息',
  70. 'default' => '',
  71. 'desc' => '模块标识',
  72. 'match' => 'is_string',
  73. 'update' => 'text',
  74. 'search' => 'fulltext',
  75. 'list' => true,
  76. ),
  77. 'type' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '模块类型',
  81. 'default' => '1',
  82. 'desc' => '请选择模块类型',
  83. 'match' => 'is_numeric',
  84. 'update' => 'radio',
  85. 'option' => $type,
  86. 'search' => 'select',
  87. 'list' => true,
  88. 'control' => 'type',
  89. ),
  90. 'value' => array
  91. (
  92. 'type' => 'varchar-500',
  93. 'name' => '模块默认值',
  94. 'default' => '',
  95. 'desc' => '模块默认值',
  96. 'match' => 'option',
  97. 'update' => 'text',
  98. 'search' => 'fulltext',
  99. //'list' => true,
  100. ),
  101. 'position_type' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '模块位置',
  105. 'default' => '8',
  106. 'desc' => '请选择模块位置',
  107. 'match' => 'is_numeric',
  108. 'update' => 'radio',
  109. 'option' => $position_type,
  110. //'search' => 'select',
  111. //'list' => true,
  112. 'control' => 'position_type',
  113. ),
  114. 'position' => array
  115. (
  116. 'type' => 'varchar-32',
  117. 'name' => '模块定位-位置为left,top,如100,200',
  118. 'default' => '0,0',
  119. 'desc' => '模块定位',
  120. 'match' => 'is_string',
  121. 'update' => 'text',
  122. 'show' => 'position_type=8',
  123. ),
  124. 'offset' => array
  125. (
  126. 'type' => 'varchar-32',
  127. 'name' => '偏移量-偏移位置为left,top,如-10,-20',
  128. 'default' => '0,0',
  129. 'desc' => '偏移量',
  130. 'match' => 'is_string',
  131. 'update' => 'text',
  132. ),
  133. 'text_width' => array
  134. (
  135. 'type' => 'varchar-11',
  136. 'name' => '文字宽度',
  137. 'default' => '',
  138. 'desc' => '文字宽度',
  139. 'match' => 'is_string',
  140. 'update' => 'text',
  141. 'show' => 'type=2',
  142. ),
  143. 'width' => array
  144. (
  145. 'type' => 'varchar-11',
  146. 'name' => '图片宽度',
  147. 'default' => '200',
  148. 'desc' => '图片宽度',
  149. 'match' => 'is_string',
  150. 'update' => 'text',
  151. 'show' => 'type=1',
  152. ),
  153. 'height' => array
  154. (
  155. 'type' => 'varchar-11',
  156. 'name' => '图片高度',
  157. 'default' => '200',
  158. 'desc' => '图片高度',
  159. 'match' => 'is_string',
  160. 'update' => 'text',
  161. 'show' => 'type=1',
  162. ),
  163. 'color' => array
  164. (
  165. 'type' => 'varchar-10',
  166. 'name' => '文字颜色',
  167. 'default' => '#000000',
  168. 'desc' => '文字颜色',
  169. 'match' => 'is_string',
  170. 'update' => 'color',
  171. 'show' => 'type=2',
  172. ),
  173. 'fonts' => array
  174. (
  175. 'type' => 'int-11',
  176. 'name' => '字体',
  177. 'default' => '1',
  178. 'desc' => '字体',
  179. 'match' => 'is_numeric',
  180. 'update' => 'select',
  181. 'option' => $fonts,
  182. 'show' => 'type=2',
  183. ),
  184. 'size' => array
  185. (
  186. 'type' => 'int-11',
  187. 'name' => '文字大小-直接输入像素数字',
  188. 'default' => '16',
  189. 'desc' => '文字大小',
  190. 'match' => 'is_numeric',
  191. 'update' => 'text',
  192. 'show' => 'type=2',
  193. ),
  194. 'angle' => array
  195. (
  196. 'type' => 'int-11',
  197. 'name' => '角度-直接输入数字',
  198. 'default' => '0',
  199. 'desc' => '角度',
  200. 'match' => 'is_numeric',
  201. 'update' => 'text',
  202. 'show' => 'type=2',
  203. ),
  204. 'state' => array
  205. (
  206. 'type' => 'tinyint-1',
  207. 'name' => '状态',
  208. 'default' => '1',
  209. 'desc' => '请选择状态',
  210. 'match' => 'is_numeric',
  211. ),
  212. 'cdate' => array
  213. (
  214. 'type' => 'int-11',
  215. 'name' => '录入时间',
  216. 'match' => array('is_numeric', time()),
  217. 'desc' => '',
  218. # 只有insert时才生效
  219. 'insert' => true,
  220. 'search' => 'date',
  221. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  222. ),
  223. ),
  224. );