当前位置: 首页>>代码示例>>PHP>>正文


PHP Video::insert方法代码示例

本文整理汇总了PHP中Video::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP Video::insert方法的具体用法?PHP Video::insert怎么用?PHP Video::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Video的用法示例。


在下文中一共展示了Video::insert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveNew

 static function saveNew(Profile $profile, $url, $options = array())
 {
     $vid = new Video();
     $vid->id = UUID::gen();
     $vid->profile_id = $profile->id;
     $vid->url = $url;
     $options['object_type'] = Video::OBJECT_TYPE;
     if (!array_key_exists('uri', $options)) {
         $options['uri'] = common_local_url('showvideo', array('id' => $vid->id));
     }
     if (!array_key_exists('rendered', $options)) {
         $options['rendered'] = sprintf("<video src=\"%s\">Sorry, your browser doesn't support the video tag.</video>", $url);
     }
     $vid->uri = $options['uri'];
     $vid->insert();
     return Notice::saveNew($profile->id, '', 'web', $options);
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:17,代码来源:Video.php

示例2: array

}
if ($mode == "Add") {
    # echo "<pre>";  print_r($_FILES) ; exit;
    $redirect_file = "index.php?file=m-videoadd&mode=" . $mode . "&iVideoCategoryId=" . $iVideoCategoryId . "&iVideoId=" . $iVideoId . $qs;
    $GeneralObj->checkDuplicate('iVideoId', 'Video', array('vVideoName', 'iVideoCategoryId'), $redirect_file, "Video Title Already Exists ", $vVideoName, 'AND');
    // $videoObj->setdCreated($dCreated);
    if (isset($_FILES['vVideoPath']['name']) && $_FILES['vVideoPath']['name'] != "") {
        $video_name = date('Ymdhis') . $_FILES['vVideoPath']['name'];
        if (copy($_FILES['vVideoPath']['tmp_name'], $CFG->datadirroot . "/video/" . $video_name)) {
            if ($video_name != '') {
                $videoObj->setvVideoPath($video_name);
            }
        }
    }
    //$videoObj->setiSGroupId($iSGroupId);
    $id1 = $videoObj->insert();
    $msg = MSG_ADD;
    if ($eStatus == 'Active') {
        // for Notification of users
        $sql_Category_select = "select vCategoryName FROM VideoCategory WHERE iVideoCategoryId = " . $iVideoCategoryId;
        $catagery_Array = $obj->select($sql_Category_select);
        $user_emails = $userObj->getNotificationUsers($iSGroupId);
        if (is_Array($user_emails) && count($user_emails) > 0) {
            for ($i = 0; $i < count($user_emails); $i++) {
                $sql_insert = "INSERT INTO `cron_email` (`vEmail` ,`vUsername` ,`vName` ,`vAdmin_email` ,`vCategoryName` ,`eType` ,`iID`)\n\t\t\t\t\t\tVALUES ('" . $user_emails[$i]['vEmail'] . "', '" . $user_emails[$i]['vUsername'] . "', '" . $vVideoName . "', '" . $user_emails['admin_email'] . "', '" . $catagery_Array[0]['vCategoryName'] . "', 'Video', '" . $id1 . "')";
                $id = $obj->insert($sql_insert);
                //$emailObj->send_add_videomail($user_emails[$i]['vUsername'],$vVideoName,$user_emails['admin_email'],$user_emails[$i]['vEmail'],$catagery_Array[0]['vCategoryName']);
            }
        }
    }
    $url = 'index.php?file=Video&AX=Yes&var_msg=' . $msg . '&iVideoCategoryId=' . $iVideoCategoryId . $qs;
开发者ID:redeyes1024,项目名称:medlii_mlm_backend,代码行数:31,代码来源:videoadd_a.php

示例3: insert_local_video

 /**
  * insert_local_video
  * This inserts a video file into the video file table the tag
  * information we can get is super sketchy so it's kind of a crap shoot
  * here
  */
 public function insert_local_video($file, $options = array())
 {
     /* Create the vainfo object and get info */
     $gtypes = $this->get_gather_types('video');
     $vainfo = new vainfo($file, $gtypes, '', '', '', $this->sort_pattern, $this->rename_pattern);
     $vainfo->get_info();
     $tag_name = vainfo::get_tag_type($vainfo->tags, 'metadata_order_video');
     $results = vainfo::clean_tag_info($vainfo->tags, $tag_name, $file);
     $results['catalog'] = $this->id;
     $id = Video::insert($results, $gtypes, $options);
     if ($results['art']) {
         $art = new Art($id, 'video');
         $art->insert_url($results['art']);
         if (AmpConfig::get('generate_video_preview')) {
             Video::generate_preview($id);
         }
     } else {
         $this->added_videos_to_gather[] = $id;
     }
     $this->_filecache[strtolower($file)] = 'v_' . $id;
     return $id;
 }
开发者ID:cheese1,项目名称:ampache,代码行数:28,代码来源:local.catalog.php


注:本文中的Video::insert方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。