info.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. $type = function()
  3. {
  4. $array = array();
  5. $info = Dever::db('short/type')->state();
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'info',
  16. # 显示给用户看的名称
  17. 'lang' => '短域名',
  18. # 是否显示在后台菜单
  19. 'order' => 1,
  20. 'auto' => 10000000,
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'order' => 'asc',
  32. 'list' => true,
  33. ),
  34. 'type_id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => '分类',
  38. 'default' => '1',
  39. 'desc' => '分类',
  40. 'match' => 'is_numeric',
  41. 'update' => 'select',
  42. 'option' => $type,
  43. 'search' => 'select',
  44. 'list' => true,
  45. ),
  46. 'url' => array
  47. (
  48. 'type' => 'varchar-800',
  49. 'name' => '需要转换的网址',
  50. 'default' => '',
  51. 'desc' => '需要转换的网址',
  52. 'match' => 'is_string',
  53. 'update' => 'text',
  54. 'search' => 'fulltext',
  55. 'list' => true,
  56. ),
  57. 'param' => array
  58. (
  59. 'type' => 'varchar-2000',
  60. 'name' => '参数',
  61. 'default' => '',
  62. 'desc' => '参数',
  63. 'match' => 'option',
  64. //'update' => 'text',
  65. //'list' => true,
  66. 'list_name' => '短连接',
  67. 'list' => 'Dever::load("short/handle.showUrl", {id})',
  68. ),
  69. 'key' => array
  70. (
  71. 'type' => 'varchar-32',
  72. 'name' => '关键字',
  73. 'default' => '',
  74. 'desc' => '关键字',
  75. 'match' => 'option',
  76. //'update' => 'text',
  77. //'search' => 'fulltext',
  78. //'list' => true,
  79. ),
  80. 'state' => array
  81. (
  82. 'type' => 'tinyint-1',
  83. 'name' => '状态',
  84. 'default' => '1',
  85. 'desc' => '请选择状态',
  86. 'match' => 'is_numeric',
  87. ),
  88. 'cdate' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '录入时间',
  92. 'match' => array('is_numeric', time()),
  93. 'desc' => '',
  94. # 只有insert时才生效
  95. 'insert' => true,
  96. 'search' => 'date',
  97. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  98. ),
  99. ),
  100. 'manage' => array
  101. (
  102. ),
  103. 'request' => array
  104. (
  105. )
  106. );