focus.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | magazine.php 杂志表
  5. |--------------------------------------------------------------------------
  6. */
  7. # 定义几个常用的选项
  8. $option = array
  9. (
  10. 1 => '显示',
  11. 2 => '不显示',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'focus',
  17. # 显示给用户看的名称
  18. 'lang' => '首页焦点图',
  19. //'order' => 9,
  20. # 数据结构
  21. 'struct' => array
  22. (
  23. 'id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => 'ID',
  27. 'default' => '',
  28. 'desc' => '',
  29. 'match' => 'is_numeric',
  30. 'order' => 'desc',
  31. ),
  32. 'name' => array
  33. (
  34. 'type' => 'varchar-150',
  35. 'name' => '标题',
  36. 'default' => '',
  37. 'desc' => '标题',
  38. 'match' => 'is_string',
  39. 'update' => 'text',
  40. 'list' => true,
  41. ),
  42. 'pic' => array
  43. (
  44. 'type' => 'varchar-150',
  45. 'name' => '焦点图图片-图片大小1000pxX560px',
  46. 'default' => '',
  47. 'desc' => '请选择焦点图图片',
  48. 'match' => 'is_string',
  49. 'update' => 'image',
  50. 'key' => '1',
  51. //'list' => true,
  52. ),
  53. 'link' => array
  54. (
  55. 'type' => 'varchar-50',
  56. 'name' => '焦点图链接',
  57. 'default' => '',
  58. 'desc' => '请输入焦点图链接',
  59. 'match' => 'is_string',
  60. 'update' => 'text',
  61. 'search' => 'fulltext',
  62. 'list' => true,
  63. ),
  64. 'reorder' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => '排序-数值越大越靠前',
  68. 'default' => '1',
  69. 'desc' => '请输入排序',
  70. 'match' => 'option',
  71. 'update' => 'text',
  72. 'search' => 'order',
  73. 'list' => true,
  74. 'order' => 'desc',
  75. 'edit' => true,
  76. ),
  77. 'state' => array
  78. (
  79. 'type' => 'tinyint-1',
  80. 'name' => '状态',
  81. 'default' => '1',
  82. 'desc' => '请选择状态',
  83. 'match' => 'is_numeric',
  84. 'option' => $option,
  85. 'update' => 'radio',
  86. 'list' => true,
  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. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  97. ),
  98. ),
  99. );