index.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. defined('IN_PHPCMS') or exit('No permission resources.');
  3. /**
  4. *
  5. * ------------------------------------------
  6. * index
  7. * ------------------------------------------
  8. * @package PHPCMS V9.1.16
  9. * @author 王官庆
  10. * @copyright CopyRight (c) 2006-2012 上海盛大网络发展有限公司
  11. *
  12. */
  13. class index{
  14. public $db;
  15. public function __construct() {
  16. pc_base::load_app_class('ku6api', 'video', 0);
  17. $this->userid = param::get_cookie('userid');
  18. $this->setting = getcache('video');
  19. if(empty($this->setting)) {
  20. showmessage(L('module_not_exists'));
  21. }
  22. $this->ku6api = new ku6api($this->setting['sn'], $this->setting['skey']);
  23. }
  24. /**
  25. *
  26. * 视频列表
  27. */
  28. public function init() {
  29. showmessage('正在转向首页...','index.php');
  30. }
  31. /**
  32. * 播放清单,播放页
  33. */
  34. public function playlist(){
  35. pc_base::load_app_func('util','content');
  36. if(isset($_GET['siteid'])) {
  37. $siteid = intval($_GET['siteid']);
  38. } else {
  39. $siteid = 1;
  40. }
  41. $CATEGORYS = getcache('category_content_'.$siteid,'commons');
  42. $title = strip_tags($_GET['title']);
  43. $contentid = intval($_GET['contentid']);
  44. $catid = intval($_GET['catid']);
  45. $video_info = get_vid($contentid, $catid, $isspecial = 0);
  46. include template('content','show_videolist');
  47. }
  48. /**
  49. * 视频专辑列表页
  50. * index.php?m=video&c=index&a=album
  51. */
  52. public function album(){
  53. pc_base::load_app_func('util','content');
  54. $spid = $_GET['spid'];
  55. $page = $_GET['page'];
  56. if(isset($_GET['siteid'])) {
  57. $siteid = intval($_GET['siteid']);
  58. } else {
  59. $siteid = 1;
  60. }
  61. include template('content','video_album');
  62. }
  63. }
  64. ?>