info.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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' => '转换的url',
  50. 'default' => '',
  51. 'desc' => '转换的url',
  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' => 'is_string',
  64. 'update' => 'text',
  65. 'list' => true,
  66. ),
  67. 'key' => array
  68. (
  69. 'type' => 'varchar-32',
  70. 'name' => '关键字',
  71. 'default' => '',
  72. 'desc' => '关键字',
  73. 'match' => 'is_string',
  74. 'update' => 'text',
  75. 'search' => 'fulltext',
  76. 'list' => true,
  77. ),
  78. 'state' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '状态',
  82. 'default' => '1',
  83. 'desc' => '请选择状态',
  84. 'match' => 'is_numeric',
  85. ),
  86. 'cdate' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '录入时间',
  90. 'match' => array('is_numeric', time()),
  91. 'desc' => '',
  92. # 只有insert时才生效
  93. 'insert' => true,
  94. 'search' => 'date',
  95. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  96. ),
  97. ),
  98. 'manage' => array
  99. (
  100. ),
  101. 'request' => array
  102. (
  103. )
  104. );