msg_send.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. $project = function()
  3. {
  4. $array = array();
  5. $info = Dever::load('main/project-state', array('option_type' => 3));
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'msg_send',
  16. # 显示给用户看的名称
  17. 'lang' => '发送模板消息',
  18. 'order' => 90,
  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. ),
  32. 'project_id' => array
  33. (
  34. 'type' => 'varchar-300',
  35. 'name' => '选择项目',
  36. 'default' => '',
  37. 'desc' => '选择项目',
  38. 'match' => 'is_numeric',
  39. 'list' => true,
  40. 'update' => 'checkbox',
  41. 'option' => $project,
  42. ),
  43. 'key' => array
  44. (
  45. 'type' => 'varchar-20',
  46. 'name' => '模板消息key',
  47. 'default' => '',
  48. 'desc' => '模板消息key',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'list' => true,
  52. 'edit' => true,
  53. ),
  54. 'page' => array
  55. (
  56. 'type' => 'varchar-200',
  57. 'name' => '页面路径',
  58. 'default' => 'pages/index/index',
  59. 'desc' => '页面路径',
  60. 'match' => 'is_string',
  61. 'update' => 'text',
  62. 'list' => true,
  63. ),
  64. 'content' => array
  65. (
  66. 'type' => 'text-255',
  67. 'name' => '模板内容',
  68. 'default' => '',
  69. 'desc' => '请输入内容',
  70. 'match' => 'is_string',
  71. 'update' => array
  72. (
  73. array
  74. (
  75. 'col' => 'key',
  76. 'name' => '标识',
  77. 'default' => '',
  78. 'desc' => '请输入标识',
  79. 'match' => 'is_string',
  80. 'update' => 'text',
  81. ),
  82. array
  83. (
  84. 'col' => 'value',
  85. 'name' => '内容值',
  86. 'default' => '',
  87. 'desc' => '内容值',
  88. 'match' => 'is_string',
  89. 'update' => 'textarea',
  90. ),
  91. ),
  92. ),
  93. 'state' => array
  94. (
  95. 'type' => 'tinyint-1',
  96. 'name' => '状态',
  97. 'default' => '1',
  98. 'desc' => '请选择状态',
  99. 'match' => 'is_numeric',
  100. ),
  101. 'cdate' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '更新时间',
  105. 'match' => array('is_numeric', time()),
  106. 'desc' => '',
  107. 'default' => '',
  108. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  109. ),
  110. ),
  111. //'top' => Dever::config('base', 'applet')->top,
  112. 'manage' => array
  113. (
  114. //'delete' => false,
  115. //'insert' => false,
  116. //'edit' => false,
  117. 'list_button' => array
  118. (
  119. 'oper' => array('立刻发送', '"applet/msg.submit?id={id}"'),
  120. ),
  121. ),
  122. );