ranking.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <?php
  2. $status = array
  3. (
  4. 1 => '开启',
  5. 2 => '关闭',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'ranking',
  11. # 显示给用户看的名称
  12. 'lang' => '排行榜设置',
  13. 'menu' => false,
  14. 'ends' => array
  15. (
  16. 'insert' => 'magazine/lib/manage.setRankingCache',
  17. 'update' => 'magazine/lib/manage.setRankingCache',
  18. ),
  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. 'update' => 'hidden',
  31. 'value' => Dever::input('where_id')
  32. //'list' => true,
  33. ),
  34. 'info_id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => '电子刊',
  38. 'default' => '',
  39. 'desc' => '电子刊',
  40. 'match' => 'is_numeric',
  41. 'update' => 'hidden',
  42. 'value' => Dever::input('search_option_info_id')
  43. ),
  44. 'status' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '排行榜状态',
  48. 'default' => '1',
  49. 'desc' => '排行榜状态',
  50. 'match' => 'is_numeric',
  51. 'update' => 'radio',
  52. 'option' => $status,
  53. ),
  54. 'name' => array
  55. (
  56. 'type' => 'varchar-80',
  57. 'name' => '排行榜标题',
  58. 'default' => '',
  59. 'desc' => '排行榜标题',
  60. 'match' => 'is_string',
  61. 'update' => 'text',
  62. 'search' => 'fulltext',
  63. 'list' => true,
  64. ),
  65. 'start' => array
  66. (
  67. 'type' => 'int-11',
  68. 'default' => '',
  69. 'name' => '排行榜开始时间',
  70. 'match' => 'option',
  71. 'desc' => '排行榜开始时间',
  72. 'update' => 'date',
  73. 'list' => 'date("Y-m-d H:i:s", {start})',
  74. 'callback' => 'maketime',
  75. ),
  76. 'end' => array
  77. (
  78. 'type' => 'int-11',
  79. 'default' => '',
  80. 'name' => '排行榜结束时间',
  81. 'match' => 'option',
  82. 'desc' => '排行榜结束时间',
  83. 'update' => 'date',
  84. 'list' => 'date("Y-m-d H:i:s", {end})',
  85. 'callback' => 'maketime',
  86. ),
  87. 'desc' => array
  88. (
  89. 'type' => 'text-255',
  90. 'name' => '排行榜描述',
  91. 'default' => '',
  92. 'desc' => '排行榜描述',
  93. 'match' => 'option',
  94. 'update' => 'editor',
  95. 'key' => 1,
  96. //'search' => 'fulltext',
  97. //'list' => true,
  98. ),
  99. 'state' => array
  100. (
  101. 'type' => 'tinyint-1',
  102. 'name' => '状态',
  103. 'default' => '1',
  104. 'desc' => '请选择状态',
  105. 'match' => 'is_numeric',
  106. ),
  107. 'cdate' => array
  108. (
  109. 'type' => 'int-11',
  110. 'name' => '创建时间',
  111. 'match' => array('is_numeric', time()),
  112. 'desc' => '',
  113. # 只有insert时才生效
  114. 'insert' => true,
  115. 'search' => 'date',
  116. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  117. ),
  118. ),
  119. 'manage' => array
  120. (
  121. ),
  122. 'request' => array
  123. (
  124. # 获取提交订单超过12个小时
  125. 'getDataByTime' => array
  126. (
  127. # 匹配的正则或函数 选填项
  128. 'option' => array
  129. (
  130. 'end' => array('yes', '<='),
  131. 'ends' => array('yes-end', '>'),
  132. 'state' => 1,
  133. 'status' => 1,
  134. ),
  135. 'type' => 'all',
  136. 'order' => array('id' => 'desc'),
  137. 'col' => '*',
  138. ),
  139. ),
  140. );