123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace Video\Lib;
- use Dever;
- class Core
- {
- public function vod_api()
- {
- $data['name'] = '视频';
- $where = array();
- $name = Dever::input('search_name');
- $cate = Dever::input('search_cate');
- if ($name) {
- $where['name'] = $name;
- }
- if ($cate > 0) {
- $where['cate_id'] = $cate;
- }
- $data['file'] = Dever::db('video/vod')->list($where);
- $data['cate'] = Dever::db('content/cate')->getAll();
- if ($data['file']) {
- foreach ($data['file'] as $k => $v) {
- $data['file'][$k]['source_name'] = $v['name'];
- $data['file'][$k]['file'] = $v['pic_cover'];
- $data['file'][$k]['pic'] = $v['pic_cover'];
- }
- }
- return $data;
- }
- public function live_api()
- {
- $data['name'] = '直播';
- $where = array();
- $name = Dever::input('search_name');
- $cate = Dever::input('search_cate');
- if ($name) {
- $where['name'] = $name;
- }
- if ($cate > 0) {
- $where['cate_id'] = $cate;
- }
- $data['file'] = Dever::db('video/live')->list($where);
- $data['cate'] = Dever::db('content/cate')->getAll();
- if ($data['file']) {
- foreach ($data['file'] as $k => $v) {
- $data['file'][$k]['source_name'] = $v['name'];
- $data['file'][$k]['file'] = $v['pic_cover'];
- $data['file'][$k]['pic'] = $v['pic_cover'];
- }
- }
- return $data;
- }
- }
|