info.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. 'menu' => false,
  21. 'auto' => 10000000,
  22. # 数据结构
  23. 'struct' => array
  24. (
  25. 'id' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => 'ID',
  29. 'default' => '',
  30. 'desc' => '',
  31. 'match' => 'is_numeric',
  32. 'order' => 'asc',
  33. 'list' => true,
  34. ),
  35. 'type_id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '分类',
  39. 'default' => '1',
  40. 'desc' => '分类',
  41. 'match' => 'is_numeric',
  42. 'update' => 'select',
  43. 'option' => $type,
  44. 'search' => 'select',
  45. 'list' => true,
  46. ),
  47. 'url' => array
  48. (
  49. 'type' => 'varchar-800',
  50. 'name' => '转换的url',
  51. 'default' => '',
  52. 'desc' => '转换的url',
  53. 'match' => 'is_string',
  54. 'update' => 'text',
  55. 'search' => 'fulltext',
  56. 'list' => true,
  57. ),
  58. 'param' => array
  59. (
  60. 'type' => 'varchar-2000',
  61. 'name' => '参数',
  62. 'default' => '',
  63. 'desc' => '参数',
  64. 'match' => 'is_string',
  65. 'update' => 'text',
  66. 'list' => true,
  67. ),
  68. 'key' => array
  69. (
  70. 'type' => 'varchar-32',
  71. 'name' => '关键字',
  72. 'default' => '',
  73. 'desc' => '关键字',
  74. 'match' => 'is_string',
  75. 'update' => 'text',
  76. 'search' => 'fulltext',
  77. 'list' => true,
  78. ),
  79. 'state' => array
  80. (
  81. 'type' => 'tinyint-1',
  82. 'name' => '状态',
  83. 'default' => '1',
  84. 'desc' => '请选择状态',
  85. 'match' => 'is_numeric',
  86. ),
  87. 'cdate' => array
  88. (
  89. 'type' => 'int-11',
  90. 'name' => '录入时间',
  91. 'match' => array('is_numeric', time()),
  92. 'desc' => '',
  93. # 只有insert时才生效
  94. 'insert' => true,
  95. 'search' => 'date',
  96. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  97. ),
  98. ),
  99. 'manage' => array
  100. (
  101. ),
  102. 'request' => array
  103. (
  104. )
  105. );