up.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. $type = array
  3. (
  4. 1 => '现场直击',
  5. 2 => '超模风采',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'up',
  11. # 显示给用户看的名称
  12. 'lang' => '上传活动图片',
  13. 'order' => 80,
  14. 'set' => array
  15. (
  16. 'type' => $type,
  17. ),
  18. 'menu' => false,
  19. 'end' => array
  20. (
  21. 'insert' => 'content/lib/manage.upPic',
  22. 'update' => 'content/lib/manage.upPic',
  23. ),
  24. # 数据结构
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. 'list' => true,
  35. ),
  36. 'act_id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '活动id',
  40. 'default' => '1',
  41. 'desc' => '活动id',
  42. 'match' => 'is_numeric',
  43. 'value' => '1',
  44. 'update' => 'hidden',
  45. ),
  46. 'type' => array
  47. (
  48. 'type' => 'tinyint-1',
  49. 'name' => '类型',
  50. 'default' => '1',
  51. 'desc' => '类型',
  52. 'match' => 'is_numeric',
  53. 'option' => $type,
  54. 'update' => 'radio',
  55. 'search' => 'select',
  56. 'list' => true,
  57. 'edit' => true,
  58. ),
  59. 'pic' => array
  60. (
  61. 'type' => 'text-255',
  62. 'name' => '图片-可以上传多张图片,图片比例要求宽度不超过960px,高度不超过1200px',
  63. 'default' => '',
  64. 'desc' => '图片',
  65. 'match' => 'option',
  66. 'update' => 'images',
  67. 'key' => '1',
  68. ),
  69. 'state' => array
  70. (
  71. 'type' => 'tinyint-1',
  72. 'name' => '状态',
  73. 'default' => '1',
  74. 'desc' => '请选择状态',
  75. 'match' => 'is_numeric',
  76. ),
  77. 'cdate' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '录入时间',
  81. 'match' => array('is_numeric', time()),
  82. 'desc' => '',
  83. # 只有insert时才生效
  84. 'insert' => true,
  85. ),
  86. ),
  87. # 管理功能
  88. 'manage' => array
  89. (
  90. 'page_list' => 'baoming',
  91. ),
  92. # request 请求接口定义
  93. 'request' => array
  94. (
  95. ),
  96. );