videos.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. Dever::setInput('ad_title', '视频列表页');
  3. Dever::setInput('ad_name', 'video');
  4. $top[0] = array
  5. (
  6. 'a' => array
  7. (
  8. 'href' => '$v.link',
  9. 'title' => '$v.name',
  10. 'target' => '',
  11. 'img' => array
  12. (
  13. 'src' => '$v.pic_cover',
  14. 'alt' => '$v.name',
  15. ),
  16. 'h3' => array
  17. (
  18. 'html' => '$v.name',
  19. ),
  20. 'span' => array
  21. (
  22. 'html' => '精选推荐',
  23. ),
  24. ),
  25. );
  26. $top[1] = array
  27. (
  28. 'a' => array
  29. (
  30. 'href' => '$v.link',
  31. 'title' => '$v.name',
  32. 'target' => '',
  33. 'img' => array
  34. (
  35. 'src' => '$v.pic_cover',
  36. 'alt' => '$v.name',
  37. ),
  38. 'h3' => array
  39. (
  40. 'html' => '$v.name',
  41. ),
  42. 'span' => array
  43. (
  44. 'html' => '已有 <{$v.num_view}> 次观看',
  45. ),
  46. ),
  47. );
  48. $view
  49. ->set('name', 'video')
  50. ->set('title', 'content/lib/cate.getInfo#name')
  51. ->import('inc/head')
  52. ->fetch(array('.box .h_title', 1), 'content/lib/cate.getInfo#name')
  53. ->loop('.featured_video_fl', 'content/lib/video.getTop[0,1]', $top[0])
  54. ->loop('.featured_video_fr li', 'content/lib/video.getTop[1,3]', $top[1])
  55. ->loop
  56. (
  57. '.all_videos li',
  58. 'content/lib/video.getAll',
  59. array
  60. (
  61. 'a' => array
  62. (
  63. 'href' => '$v.link',
  64. 'title' => '$v.name',
  65. 'target' => '',
  66. 'img' => array
  67. (
  68. 'src' => '$v.pic_cover',
  69. 'alt' => '$v.name',
  70. ),
  71. 'p' => array
  72. (
  73. 'html' => '$v.name',
  74. ),
  75. 'span' => array
  76. (
  77. 'html' => '已有 <{$v.num_view}> 次观看',
  78. ),
  79. ),
  80. )
  81. )
  82. ->fetch('.epages','<{Dever::page("current")}>')
  83. ->import('inc/foot')
  84. # display
  85. ->display();