template.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. $type = function()
  3. {
  4. $array = array
  5. (
  6. // -1 => array
  7. // (
  8. // 'id' => '-1',
  9. // 'name' => '无来源',
  10. // ),
  11. );
  12. $data = Dever::load('sms/lib/base')->type();
  13. if($data)
  14. {
  15. $array += $data;
  16. }
  17. return $array;
  18. };
  19. $name = Dever::input('search_option_name');
  20. $mobile = Dever::input('search_option_mobile');
  21. return array
  22. (
  23. # 表名
  24. 'name' => 'template',
  25. # 显示给用户看的名称
  26. 'lang' => '短息发送模板',
  27. 'end' => array
  28. (
  29. 'insert' => 'sms/lib/base.templateUpdate',
  30. 'update' => 'sms/lib/base.templateUpdate',
  31. ),
  32. 'menu' => false,
  33. # 数据结构
  34. 'struct' => array
  35. (
  36. 'id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => 'ID',
  40. 'default' => '',
  41. 'desc' => '',
  42. 'match' => 'is_numeric',
  43. 'search' => 'order',
  44. //'list' => true,
  45. ),
  46. 'type' => array
  47. (
  48. 'type' => 'varchar-2000',
  49. 'name' => '类型',
  50. 'default' => '',
  51. 'desc' => '类型',
  52. 'match' => 'is_string',
  53. 'option' => $type,
  54. 'update' => 'radio',
  55. 'list' => true,
  56. ),
  57. 'name' => array
  58. (
  59. 'type' => 'varchar-100',
  60. 'name' => '名称',
  61. 'default' => $name,
  62. 'desc' => '名称',
  63. 'match' => 'is_string',
  64. 'update' => 'text',
  65. 'list' => true,
  66. ),
  67. 'content' => array
  68. (
  69. 'type' => 'varchar-800',
  70. 'name' => '未审核通过内容',
  71. 'default' => '',
  72. 'desc' => '未审核通过内容',
  73. 'match' => 'option',
  74. 'update' => 'textarea',
  75. ),
  76. 'mobile' => array
  77. (
  78. 'type' => 'bigint-11',
  79. 'name' => '手机号',
  80. 'default' => $mobile,
  81. 'desc' => '请输入手机号',
  82. 'match' => Dever::rule('mobile'),
  83. 'update' => 'hidden',
  84. ),
  85. 'state' => array
  86. (
  87. 'type' => 'tinyint-1',
  88. 'name' => '状态',
  89. 'default' => '1',
  90. 'desc' => '请选择状态',
  91. 'match' => 'is_numeric',
  92. ),
  93. 'cdate' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '申请时间',
  97. 'match' => array('is_numeric', time()),
  98. 'desc' => '',
  99. # 只有insert时才生效
  100. 'insert' => true,
  101. 'search' => 'date',
  102. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  103. ),
  104. ),
  105. 'manage' => array
  106. (
  107. 'insert' => false,
  108. 'delete' => false,
  109. 'edit' => false,
  110. ),
  111. 'request' => array
  112. (
  113. )
  114. );