예제 #1
0
파일: listening.php 프로젝트: h3len/Project
 protected function media2url($media = array())
 {
     $content = '';
     if (!$media['media_id']) {
         return $content;
     }
     $media_id = $media['media_id'];
     switch ($media['type']) {
         case 'vod':
             require_once ROOT_PATH . 'lib/class/publishcontent.class.php';
             $publish_content = new publishcontent();
             $content = $publish_content->get_content(array('content_id' => $media_id));
             $content = $content[0]['content_url'];
             break;
         case 'live':
             $content = $this->get_channel_url($media_id);
             break;
     }
     return $content;
 }
예제 #2
0
파일: recommend.php 프로젝트: h3len/Project
<?php

header('Content-Type: text/xml; charset=UTF-8');
define('M2O_ROOT_PATH', '../');
@(include_once M2O_ROOT_PATH . 'global.php');
//include(M2O_ROOT_PATH . 'lib/class/curl.class.php');
include M2O_ROOT_PATH . 'lib/class/publishcontent.class.php';
$id = intval($_INPUT['extend']);
if ($id) {
    $limits = 10;
    $con = array('liv_cel_id' => $liv_cel_id, 'sort_field' => $sort_field, 'sort_type' => $sort_type ? $sort_type : 'ASC', 'bundle_id' => 'livmedia', 'module_id' => 'vod', 'need_video' => 'vod');
    $con['is_have_indexpic'] = 1;
    $obj = new publishcontent();
    $content = $obj->get_content($id);
    $con['exclude_id'] = $content['cid'];
    if ($content['column_id']) {
        $con['column_id'] = $content['column_id'];
    }
    if ($content['keywords']) {
        $con['keywords'] = $content['keywords'];
        $liv_data = $obj->get_content_condition($columnid, $weight, $offset, $limits, $con);
        if ($liv_data && is_array($liv_data)) {
            echo '<recommend imgBaseUrl="">';
            foreach ($liv_data as $v) {
                $img = web_get_pic_url($v['indexpic'], '80', '60');
                $link = $v['content_url'];
                $rep = array('"', '<', '>');
                $exp = array("'", '《', '》');
                $v['title'] = str_replace($rep, $exp, $v['title']);
                echo '<item id="' . $link . '" title="' . $v['title'] . '" img="' . $img . '" count="' . $v['click_num'] . '" duration="' . $v['video']['duration'] . '"/>';
            }
예제 #3
0
 public function get_published_content($condi)
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $publish_server = new publishcontent();
     return $publish_server->get_content($condi);
 }