import.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. $desc = Dever::input('desc');
  3. if ($desc) {
  4. $desc = Dever::decode($desc);
  5. }
  6. return array
  7. (
  8. # 表名
  9. 'name' => 'import',
  10. # 显示给用户看的名称
  11. 'lang' => '导入',
  12. 'menu' => false,
  13. 'end' => array
  14. (
  15. 'insert' => 'upload/lib/manage.import',
  16. ),
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. 'search' => 'order',
  28. 'list' => true,
  29. ),
  30. 'file' => array
  31. (
  32. 'type' => 'varchar-150',
  33. 'name' => '选择导入文件-' . $desc,
  34. 'default' => '',
  35. 'desc' => '选择导入文件',
  36. 'match' => 'option',
  37. 'update' => 'upload',
  38. 'key' => Dever::input('key', 4),
  39. ),
  40. 'call' => array
  41. (
  42. 'type' => 'varchar-800',
  43. 'name' => 'call',
  44. 'default' => '',
  45. 'desc' => '选择导入文件',
  46. 'match' => 'option',
  47. 'update' => 'hidden',
  48. 'value' => Dever::input('call'),
  49. ),
  50. 'state' => array
  51. (
  52. 'type' => 'tinyint-1',
  53. 'name' => '状态',
  54. 'default' => '1',
  55. 'desc' => '请选择状态',
  56. 'match' => 'is_numeric',
  57. ),
  58. 'cdate' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '创建时间',
  62. 'match' => array('is_numeric', time()),
  63. 'desc' => '',
  64. # 只有insert时才生效
  65. 'insert' => true,
  66. //'search' => 'date',
  67. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  68. ),
  69. ),
  70. 'manage' => array
  71. (
  72. //'excel' => true,
  73. //'delete' => false,
  74. //'edit' => false,
  75. //'insert' => false,
  76. ),
  77. );