예제 #1
0
<?php

// 后台视频直播
// 2015-06-09  samuel
require_once ykfile('source/video_live_service.php');
$next_id = intval($_GET['next_id']);
$count = intval($_GET['count']);
$type = $_GET["type"];
// 直播视频的类型  categoryId  0  代表的是所有
if ($count <= 0) {
    $count = 10;
}
if ($type == 0) {
    $type = NULL;
}
$videoLiveSer = new VideoLiveService();
$videoList = $videoLiveSer->get_all($type, $next_id, $count);
$video_total = $videoLiveSer->get_count($type);
// 以下4个参数,必须计算出来,分页器要使用
// page_cur: 当前页, 从1开始计算
// page_count: 总页数
// page_prefix: 点页数后,取数据的url前缀
// next_id: 下一页超始数据
$page_cur = intval(($next_id + 1 + 9) / 10);
$page_count = intval(($video_total + 9) / 10);
$page_prefix = "/m/admin.php?mod=video_live&type={$type}";
$next_id += $count;
include ykfile('pages/admin/video_live_list.php');
예제 #2
0
파일: detail.php 프로젝트: samuel072/PHP
<?php

/**
 * 根据id 查询出具体的视频直播信息
 */
require_once "../config.php";
require_once ykfile("source/video_live_service.php");
require_once ykfile("source/comment_service.php");
session_start();
$id = $_GET['id'];
$videoSer = new VideoLiveService();
// 因为只有这个地方需要评论的类容 所以将评论的类容集成在这个地方
$video = $videoSer->get_by_id($id);
// 修改点击数量
$videoSer->update_pv($video->pv, $id);
$commSer = new CommentService();
$comments = $commSer->get_comment_by_vid($video->id);
$video->comments = $comments;
// 该视频直播用户在我们这个平台上总共直播视频的数量
//$num = $videoSer->get_num($video->user->uuid);
include_once ykfile("pages/video/detail.php");
예제 #3
0
<?php

require_once ykfile("source/video_live_service.php");
$params = json_decode(file_get_contents("php://input"));
$params->is_delete = 0;
$params->state = 2;
if (!$params->position) {
    $params->position = 0;
}
$videoSer = new VideoLiveService();
$result = $videoSer->save_video($params);
$status = 0;
$message = "";
if ($result !== false) {
    $status = 0;
    $message = "发布成功,请等待审核";
    $video = $result;
} else {
    $status = ERR_INTERNAL;
    $message = "发布失败";
    $video = $param;
}
echo json_encode(array("status" => $status, "message" => $message, "video" => $video));
예제 #4
0
파일: list.php 프로젝트: samuel072/PHP
<?php

require_once "../config.php";
require_once ykfile("source/video_live_service.php");
$mod = $_GET['mod'];
if ($mod == 'mp') {
    // 一刻演讲局
    $page_title = "一刻演讲局";
    $category_id = 2;
} else {
    // 创业路演汇
    $page_title = "创业路演汇";
    $category_id = 3;
}
// 根据演讲类型 查询出对应的list列表数据
$videoSer = new VideoLiveService();
$video_list = $videoSer->get_video_by_type($category_id, 0, 10);
include_once ykfile("pages/video/list.php");
예제 #5
0
<?php

// 伪删除视频直播 根据视频直播的id
require_once ykfile("source/video_live_service.php");
$id = $_GET['id'];
$is_delete = $_GET['is_delete'];
$videoSer = new VideoLiveService();
$result = $videoSer->del($id, $is_delete);
if ($result) {
    echo json_encode(array("status" => 0, "message" => "成功!"));
} else {
    echo json_encode(array("status" => 1, "message" => "失败!"));
}
예제 #6
0
파일: qk_video.php 프로젝트: samuel072/PHP
<?php

require_once "config.php";
require_once ykfile("source/video_live_service.php");
// 视频直播
// 查询   今天的直播 5个
// 查询   一刻演讲局 4个
// 查询  创业路演汇 4个
$videoSer = new VideoLiveService();
$video_live_list = $videoSer->get_video_by_type(1, 0, 10);
$one_talk_list = $videoSer->get_video_by_type(2, 0, 4);
$carve_out_list = $videoSer->get_video_by_type(3, 0, 4);
include_once ykfile("pages/video/index.php");
예제 #7
0
<?php

// 添加或编辑机视频直播的基本信息内容
require_once ykfile("source/video_live_service.php");
require_once ykfile("source/tag_service.php");
$id = intval($_GET['id']);
$videoLiveSer = new VideoLiveService();
$video_live = $videoLiveSer->get_by_id($id);
// 标签
$tagSer = new TagService();
$tag_list = $tagSer->get_all();
$page_title = "视频直播信息";
include_once ykfile("pages/admin/edit_video_live.php");