info_field.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. $type = array
  3. (
  4. 1 => '文本框',
  5. 2 => '下拉框',
  6. );
  7. $id = Dever::input('search_option_active_id');
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'info_field',
  12. # 显示给用户看的名称
  13. 'lang' => '字段设置',
  14. # 后台菜单排序
  15. 'order' => 2,
  16. 'menu' => false,
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. 'search' => 'order',
  28. 'list' => true,
  29. 'order' => 'desc',
  30. ),
  31. 'active_id' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => '活动名称',
  35. 'default' => '-1',
  36. 'desc' => '活动名称',
  37. 'match' => 'is_string',
  38. 'value' => $id,
  39. 'update' => 'hidden',
  40. // 'search' => 'text',
  41. 'list' => "Dever::load('active/lib/manage.active#active_name',{active_id})",
  42. ),
  43. 'name' => array
  44. (
  45. 'type' => 'varchar-200',
  46. 'name' => '名称',
  47. 'default' => '',
  48. 'desc' => '名称',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. ),
  54. 'type' => array
  55. (
  56. 'type' => 'tinyint-1',
  57. 'name' => '类型',
  58. 'default' => '1',
  59. 'desc' => '类型',
  60. 'match' => 'is_numeric',
  61. 'update' => 'radio',
  62. 'option' => $type,
  63. 'search' => 'select',
  64. 'list' => true,
  65. 'control' => 'type',
  66. ),
  67. 'reorder' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '排序-数值越大越靠前',
  71. 'default' => '1',
  72. 'desc' => '请输入排序',
  73. 'match' => 'option',
  74. 'update' => 'text',
  75. 'search' => 'order',
  76. 'list' => true,
  77. 'order' => 'desc',
  78. 'edit' => true,
  79. ),
  80. 'state' => array
  81. (
  82. 'type' => 'tinyint-1',
  83. 'name' => '状态',
  84. 'default' => '1',
  85. 'desc' => '请选择状态',
  86. 'match' => 'is_numeric',
  87. ),
  88. 'cdate' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '创建时间',
  92. 'match' => array('is_numeric', time()),
  93. 'desc' => '',
  94. # 只有insert时才生效
  95. 'insert' => true,
  96. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  97. ),
  98. ),
  99. 'manage' => array
  100. (
  101. //'insert' => false,
  102. 'delete' => false,
  103. // 'edit' => false,
  104. 'list_button' => array
  105. (
  106. 'list1' => array('属性值设置', '"info_field_value&project=active&search_option_field_id={id}&oper_table=info_field&oper_project=active&top_table=info&search_option_active_id={active_id}"' , '{type} > 1'),
  107. ),
  108. ),
  109. 'request' => array
  110. (
  111. 'getList' => array
  112. (
  113. # 匹配的正则或函数 选填项
  114. 'option' => array
  115. (
  116. 'active_id' => 'yes',
  117. 'state' => 1,
  118. ),
  119. 'type' => 'all',
  120. 'order' => array('reorder' => 'desc','type'=>'asc'),
  121. 'col' => 'id,name,type',
  122. ),
  123. ),
  124. );