Vod.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. namespace app\index\controller;
  3. use think\Controller;
  4. class Vod extends Base
  5. {
  6. public function __construct()
  7. {
  8. parent::__construct();
  9. }
  10. public function index()
  11. {
  12. return $this->label_fetch('vod/index');
  13. }
  14. public function type()
  15. {
  16. $info = $this->label_type();
  17. return $this->label_fetch( mac_tpl_fetch('vod',$info['type_tpl'],'type') );
  18. }
  19. public function show()
  20. {
  21. $this->check_show();
  22. $info = $this->label_type();
  23. return $this->label_fetch( mac_tpl_fetch('vod',$info['type_tpl_list'],'show') );
  24. }
  25. public function ajax_show()
  26. {
  27. $this->check_ajax();
  28. $this->check_show(1);
  29. $info = $this->label_type();
  30. return $this->label_fetch('vod/ajax_show');
  31. }
  32. public function search()
  33. {
  34. $param = mac_param_url();
  35. $this->check_search($param);
  36. $this->label_search($param);
  37. return $this->label_fetch('vod/search');
  38. }
  39. public function ajax_search()
  40. {
  41. $param = mac_param_url();
  42. $this->check_ajax();
  43. $this->check_search($param,1);
  44. $this->label_search($param);
  45. return $this->label_fetch('vod/ajax_search');
  46. }
  47. public function detail()
  48. {
  49. $info = $this->label_vod_detail();
  50. if($info['vod_copyright']==1 && $GLOBALS['config']['app']['copyright_status']==2){
  51. return $this->label_fetch('vod/copyright');
  52. }
  53. if(!empty($info['vod_pwd']) && session('1-1-'.$info['vod_id'])!='1'){
  54. return $this->label_fetch('vod/detail_pwd');
  55. }
  56. return $this->label_fetch( mac_tpl_fetch('vod',$info['vod_tpl'],'detail') );
  57. }
  58. public function ajax_detail()
  59. {
  60. $this->check_ajax();
  61. $info = $this->label_vod_detail();
  62. return $this->label_fetch('vod/ajax_detail');
  63. }
  64. public function copyright()
  65. {
  66. $info = $this->label_vod_detail();
  67. return $this->label_fetch('vod/copyright');
  68. }
  69. public function role()
  70. {
  71. $info = $this->label_vod_role();
  72. return $this->label_fetch('vod/role');
  73. }
  74. public function play()
  75. {
  76. $info = $this->label_vod_play('play');
  77. if($info['vod_copyright']==1 && $GLOBALS['config']['app']['copyright_status']==3){
  78. return $this->label_fetch('vod/copyright');
  79. }
  80. return $this->label_fetch( mac_tpl_fetch('vod',$info['vod_tpl_play'],'play') );
  81. }
  82. public function player()
  83. {
  84. $info = $this->label_vod_play('play',[],0,1);
  85. if($info['vod_copyright']==1 && $GLOBALS['config']['app']['copyright_status']==4){
  86. return $this->label_fetch('vod/copyright');
  87. }
  88. if(!empty($info['vod_pwd_play']) && session('1-4-'.$info['vod_id'])!='1'){
  89. return $this->label_fetch('vod/player_pwd');
  90. }
  91. return $this->label_fetch('vod/player');
  92. }
  93. public function down()
  94. {
  95. $info = $this->label_vod_play('down');
  96. return $this->label_fetch( mac_tpl_fetch('vod',$info['vod_tpl_down'],'down') );
  97. }
  98. public function downer()
  99. {
  100. $info = $this->label_vod_play('down');
  101. if(!empty($info['vod_pwd_down']) && session('1-5-'.$info['vod_id'])!='1'){
  102. return $this->label_fetch('vod/downer_pwd');
  103. }
  104. return $this->label_fetch('vod/downer');
  105. }
  106. public function rss()
  107. {
  108. $info = $this->label_vod_detail();
  109. return $this->label_fetch('vod/rss');
  110. }
  111. public function plot()
  112. {
  113. $info = $this->label_vod_detail();
  114. return $this->label_fetch('vod/plot');
  115. }
  116. }