//is Facebook
            } else {
                $rowcontent['vid_type'] = 5;
                //hotlink from other site
            }
        } else {
            $rowcontent['vid_path'] = '';
        }
        // Auto-Thumb from Youtube - if empty Image
        if ($rowcontent['vid_type'] == 2 and empty($rowcontent['homeimgfile'])) {
            $rowcontent['homeimgfile'] = 'http://img.youtube.com/vi/' . get_youtube_id($rowcontent['vid_path']) . '/0.jpg';
            $rowcontent['homeimgthumb'] = 3;
        }
        // Auto-duration from Youtube - if empty
        if ($rowcontent['vid_type'] == 2 and empty($rowcontent['vid_duration'])) {
            $_vid_duration = youtubeVideoDuration($rowcontent['vid_path']);
            $rowcontent['vid_duration'] = sec2hms($_vid_duration);
        }
        if ($rowcontent['id'] == 0) {
            if (!defined('NV_IS_SPADMIN') and intval($rowcontent['publtime']) < NV_CURRENTTIME) {
                $rowcontent['publtime'] = NV_CURRENTTIME;
            }
            if ($rowcontent['status'] == 1 and $rowcontent['publtime'] > NV_CURRENTTIME) {
                $rowcontent['status'] = 2;
            }
            $sql = 'INSERT INTO ' . NV_PREFIXLANG . '_' . $module_data . '_rows
				(catid, listcatid, admin_id, admin_name, author, artist, sourceid, addtime, edittime, status, publtime, exptime, archive, title, alias, hometext, vid_path, vid_duration, vid_type, homeimgfile, homeimgalt, homeimgthumb, inhome, allowed_comm, allowed_rating, hitstotal, hitscm, total_rating, click_rating) VALUES
				 (' . intval($rowcontent['catid']) . ',
				 :listcatid,
				 ' . intval($rowcontent['admin_id']) . ',
				 :admin_name,
<?php

/**
 * @Project VIDEOS 4.x
 * @Author KENNYNGUYEN (nguyentiendat713@gmail.com)
 * @Website tradacongnghe.com
 * @License GNU/GPL version 2 or any later version
 * @Createdate Oct 08, 2015 10:47:41 AM
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$path = $nv_Request->get_string('vid_path', 'post', '');
$mod = $nv_Request->get_string('mod', 'post', '');
$path = urldecode($path);
if (!empty($path) and is_youtube($path)) {
    $_vid_duration = youtubeVideoDuration($path);
    $duration = sec2hms($_vid_duration);
} else {
    $duration = '';
}
include NV_ROOTDIR . '/includes/header.php';
echo $duration;
include NV_ROOTDIR . '/includes/footer.php';