info.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. 'name' => array
  47. (
  48. 'type' => 'varchar-600',
  49. 'name' => '标题',
  50. 'default' => '',
  51. 'desc' => '标题',
  52. 'match' => 'option',
  53. 'update' => 'text',
  54. 'search' => 'fulltext',
  55. 'list' => true,
  56. ),
  57. 'url' => array
  58. (
  59. 'type' => 'varchar-800',
  60. 'name' => '需要转换的网址',
  61. 'default' => '',
  62. 'desc' => '需要转换的网址',
  63. 'match' => 'is_string',
  64. 'update' => 'text',
  65. 'search' => 'fulltext',
  66. 'list' => true,
  67. ),
  68. 'param' => array
  69. (
  70. 'type' => 'varchar-2000',
  71. 'name' => '参数',
  72. 'default' => '',
  73. 'desc' => '参数',
  74. 'match' => 'option',
  75. //'update' => 'text',
  76. //'list' => true,
  77. 'list_name' => '短连接',
  78. 'list' => 'Dever::load("short/handle.showUrl", {id})',
  79. ),
  80. 'key' => array
  81. (
  82. 'type' => 'varchar-32',
  83. 'name' => '关键字',
  84. 'default' => '',
  85. 'desc' => '关键字',
  86. 'match' => 'option',
  87. //'update' => 'text',
  88. //'search' => 'fulltext',
  89. //'list' => true,
  90. ),
  91. 'state' => array
  92. (
  93. 'type' => 'tinyint-1',
  94. 'name' => '状态',
  95. 'default' => '1',
  96. 'desc' => '请选择状态',
  97. 'match' => 'is_numeric',
  98. ),
  99. 'cdate' => array
  100. (
  101. 'type' => 'int-11',
  102. 'name' => '录入时间',
  103. 'match' => array('is_numeric', time()),
  104. 'desc' => '',
  105. # 只有insert时才生效
  106. 'insert' => true,
  107. 'search' => 'date',
  108. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  109. ),
  110. ),
  111. 'manage' => array
  112. (
  113. ),
  114. 'request' => array
  115. (
  116. )
  117. );