import.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. $source = function()
  3. {
  4. $array = array();
  5. $data = Dever::db('clue/source')->state(array('type'=>1));
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $a = '<a href="'.Dever::url("clue/lib/manage.out_muban").'">下载模板</a>';
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'import',
  17. # 显示给用户看的名称
  18. 'lang' => '线索导入',
  19. # 后台菜单排序
  20. 'order' => 2,
  21. 'menu' => false,
  22. // 'auto' => 100000,
  23. 'start'=>array
  24. (
  25. 'insert'=>'clue/lib/manage.updateImport',
  26. 'update'=>'clue/lib/manage.updateImport',
  27. ),
  28. # 数据结构
  29. 'struct' => array
  30. (
  31. 'id' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => 'ID',
  35. 'default' => '',
  36. 'desc' => '',
  37. 'match' => 'is_numeric',
  38. 'search' => 'order',
  39. 'list' => true,
  40. 'order' => 'desc',
  41. ),
  42. 'source' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => '来源',
  46. 'default' => '1',
  47. 'desc' => '',
  48. 'match' => 'is_string',
  49. 'option' => $source,
  50. 'update' => 'radio',
  51. // 'search' => $search_auth == 1 ? 'select' : false,
  52. // 'list' => true,
  53. ),
  54. 'file' => array
  55. (
  56. 'type' => 'varchar-500',
  57. 'name' => '上传Excel文件或csv文件-'.$a,
  58. 'default' => '',
  59. 'desc' => '上传Excel文件或csv文件',
  60. 'match' => 'is_string',
  61. 'update' => 'upload',
  62. 'key' => '8',
  63. //'place' => '150',
  64. ),
  65. 'state' => array
  66. (
  67. 'type' => 'tinyint-1',
  68. 'name' => '状态',
  69. 'default' => '1',
  70. 'desc' => '请选择状态',
  71. 'match' => 'is_numeric',
  72. ),
  73. 'cdate' => array
  74. (
  75. 'type' => 'int-11',
  76. 'name' => '创建时间',
  77. 'match' => array('is_numeric', time()),
  78. 'desc' => '',
  79. # 只有insert时才生效
  80. 'insert' => true,
  81. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  82. ),
  83. ),
  84. 'manage' => array
  85. (
  86. //'insert' => false,
  87. // 'delete' => false,
  88. // 'edit' => false,
  89. # 后台管理不要列表页
  90. 'list' => 'update',
  91. ),
  92. 'request' => array
  93. (
  94. ),
  95. );