template.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. $type = array
  3. (
  4. 'gd' => 'GD库',
  5. 'im' => 'ImageMagic库',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'template',
  11. # 显示给用户看的名称
  12. 'lang' => '模板设置',
  13. 'order' => 20,
  14. 'check' => 'key',
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. //'list' => true,
  27. ),
  28. 'name' => array
  29. (
  30. 'type' => 'varchar-32',
  31. 'name' => '模板名称',
  32. 'default' => '',
  33. 'desc' => '模板名称',
  34. 'match' => 'is_string',
  35. 'update' => 'text',
  36. 'search' => 'fulltext',
  37. 'list' => true,
  38. ),
  39. 'key' => array
  40. (
  41. 'type' => 'varchar-32',
  42. 'name' => '模板标识-调用模板时,使用该标识来获取模板信息',
  43. 'default' => '',
  44. 'desc' => '模板标识',
  45. 'match' => 'is_string',
  46. 'update' => 'text',
  47. 'search' => 'fulltext',
  48. 'list' => true,
  49. ),
  50. 'type' => array
  51. (
  52. 'type' => 'varchar-32',
  53. 'name' => '使用的图形库',
  54. 'default' => 'im',
  55. 'desc' => '使用的图形库',
  56. 'match' => 'is_string',
  57. 'update' => 'select',
  58. 'option' => $type,
  59. 'search' => 'select',
  60. ),
  61. 'background' => array
  62. (
  63. 'type' => 'varchar-150',
  64. 'name' => '模板背景图',
  65. 'default' => '',
  66. 'desc' => '模板背景图',
  67. 'match' => 'option',
  68. 'update' => 'image',
  69. 'key' => '1',
  70. 'place' => '150',
  71. ),
  72. 'pic' => array
  73. (
  74. 'type' => 'varchar-150',
  75. 'name' => '模板样例图',
  76. 'default' => '',
  77. 'desc' => '模板样例图',
  78. 'match' => 'option',
  79. 'update' => 'image',
  80. 'key' => '1',
  81. 'place' => '150',
  82. ),
  83. 'state' => array
  84. (
  85. 'type' => 'tinyint-1',
  86. 'name' => '状态',
  87. 'default' => '1',
  88. 'desc' => '请选择状态',
  89. 'match' => 'is_numeric',
  90. ),
  91. 'cdate' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '录入时间',
  95. 'match' => array('is_numeric', time()),
  96. 'desc' => '',
  97. # 只有insert时才生效
  98. 'insert' => true,
  99. 'search' => 'date',
  100. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  101. ),
  102. ),
  103. # 管理功能
  104. 'manage' => array
  105. (
  106. # 列表
  107. 'list_button' => array
  108. (
  109. 'list' => array('模块', '"model&project=poster&search_option_template_id={id}&oper_parent=template&oper_project=poster"'),
  110. ),
  111. ),
  112. );