focus.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. $type = array
  3. (
  4. 1 => '链接',
  5. 2 => '文章',
  6. 3 => '视频',
  7. 4 => '直播',
  8. 5 => '杂志',
  9. );
  10. return array
  11. (
  12. # 表名
  13. 'name' => 'focus',
  14. # 显示给用户看的名称
  15. 'lang' => '焦点图管理-废弃',
  16. # 后台菜单排序
  17. 'order' => 9,
  18. 'menu' => false,
  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. //'list' => true,
  31. 'order' => 'desc',
  32. ),
  33. 'name' => array
  34. (
  35. 'type' => 'varchar-32',
  36. 'name' => '名称',
  37. 'default' => '',
  38. 'desc' => '请输入名称',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => 'fulltext',
  42. 'list' => true,
  43. /*
  44. 'key' => 1,
  45. 'media' => 5,
  46. */
  47. ),
  48. 'type' => array
  49. (
  50. 'type' => 'int-11',
  51. 'name' => '类型',
  52. 'default' => '1',
  53. 'desc' => '请选择类型',
  54. 'match' => 'is_numeric',
  55. 'update' => 'select',
  56. 'option' => $type,
  57. ),
  58. 'link' => array
  59. (
  60. 'type' => 'varchar-400',
  61. 'name' => '链接或者内容id',
  62. 'default' => '',
  63. 'desc' => '请输入链接',
  64. 'match' => 'option',
  65. 'update' => 'text',
  66. 'search' => 'fulltext',
  67. //'list' => true,
  68. //'searchbox' => array('ku/lib/manage.search_product?json=1', 'id', 'ku/lib/manage.search_product_by_ids', 'type'),
  69. ),
  70. 'pic' => array
  71. (
  72. 'type' => 'varchar-150',
  73. 'name' => '图片-图片大小:000px*000px',
  74. 'default' => '',
  75. 'desc' => '请选择图片',
  76. 'match' => 'is_string',
  77. 'update' => 'image',
  78. 'key' => '1',
  79. 'place' => '150',
  80. ),
  81. 'reorder' => array
  82. (
  83. 'type' => 'int-11',
  84. 'name' => '排序(数值越大越靠前)',
  85. 'default' => '1',
  86. 'desc' => '请输入排序',
  87. 'match' => 'option',
  88. 'update' => 'text',
  89. 'search' => 'order',
  90. 'list' => true,
  91. 'order' => 'desc',
  92. 'edit' => true,
  93. ),
  94. 'state' => array
  95. (
  96. 'type' => 'tinyint-1',
  97. 'name' => '状态',
  98. 'default' => '1',
  99. 'desc' => '请选择状态',
  100. 'match' => 'is_numeric',
  101. ),
  102. 'cdate' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '录入时间',
  106. 'match' => array('is_numeric', time()),
  107. 'desc' => '',
  108. # 只有insert时才生效
  109. 'insert' => true,
  110. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  111. ),
  112. ),
  113. 'request' => array
  114. (
  115. 'getAll' => array
  116. (
  117. # 匹配的正则或函数 选填项
  118. 'option' => array
  119. (
  120. 'state' => 1,
  121. ),
  122. 'type' => 'all',
  123. 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
  124. 'col' => '*',
  125. ),
  126. ),
  127. );