form_id.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. $type = array
  3. (
  4. 1 => '普通表单',
  5. 2 => '支付表单',
  6. );
  7. $time = time()+(3600*24*7);
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'form_id',
  12. # 显示给用户看的名称
  13. 'lang' => '模板form_id收集表',
  14. 'menu' => false,
  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. 'type' => array
  29. (
  30. 'type' => 'tinyint-1',
  31. 'name' => '类型',
  32. 'default' => '1',
  33. 'desc' => '类型',
  34. 'match' => 'option',
  35. 'search' => 'select',
  36. 'option' => $type,
  37. 'list' => true,
  38. ),
  39. 'cate_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '电子刊分类',
  43. 'default' => '1',
  44. 'desc' => '电子刊分类',
  45. 'match' => 'is_numeric',
  46. //'search' => 'select',
  47. 'list' => true,
  48. ),
  49. 'num' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '使用次数',
  53. 'default' => '0',
  54. 'desc' => '使用次数',
  55. 'match' => 'is_numeric',
  56. 'list' => true,
  57. ),
  58. 'uid' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '用户id',
  62. 'default' => '',
  63. 'desc' => '用户id',
  64. 'match' => 'is_numeric',
  65. 'list' => true,
  66. ),
  67. 'form_id' => array
  68. (
  69. 'type' => 'varchar-700',
  70. 'name' => 'form_id',
  71. 'default' => '',
  72. 'desc' => 'form_id',
  73. 'match' => 'is_string',
  74. 'update' => 'text',
  75. 'search' => 'fulltext',
  76. 'list' => true,
  77. ),
  78. 'state' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '状态',
  82. 'default' => '1',
  83. 'desc' => '请选择状态',
  84. 'match' => 'is_numeric',
  85. ),
  86. 'cdate' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '更新时间',
  90. 'match' => array('is_numeric', time()),
  91. 'desc' => '',
  92. 'default' => '',
  93. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  94. ),
  95. ),
  96. 'top' => Dever::config('base', 'applet')->top,
  97. 'manage' => array
  98. (
  99. //'delete' => false,
  100. 'insert' => false,
  101. 'edit' => false,
  102. ),
  103. 'request' => array
  104. (
  105. 'getAll' => array
  106. (
  107. # 匹配的正则或函数 选填项
  108. 'option' => array
  109. (
  110. 'num' => array('yes', '<'),
  111. 'type' => 'yes',
  112. 'uid' => 'yes',
  113. 'cate_id' => 'yes',
  114. 'cdate' => array($time, '<='),
  115. 'state' => 1,
  116. ),
  117. 'type' => 'all',
  118. 'order' => array('cdate' => 'desc'),
  119. 'limit' => '0,100',
  120. 'col' => '*',
  121. ),
  122. 'getAllGroupByUid' => array
  123. (
  124. # 匹配的正则或函数 选填项
  125. 'option' => array
  126. (
  127. 'type' => 'yes',
  128. 'cate_id' => 'yes',
  129. 'cdate' => array($time, '<='),
  130. 'state' => 1,
  131. ),
  132. 'type' => 'all',
  133. 'group' => 'uid',
  134. 'order' => array('cdate' => 'desc'),
  135. 'col' => '*',
  136. ),
  137. ),
  138. );