71 lines
2.3 KiB
PHP
71 lines
2.3 KiB
PHP
<?php
|
|
|
|
/* $Id: user_video.php 148 2009-03-30 23:58:01Z john $ */
|
|
|
|
$page = "tagged_video";
|
|
include "header.php";
|
|
|
|
if (isset($_GET['file'])) {
|
|
$file = $_GET['file'] ;
|
|
if (file_exists($file) && is_readable($file) && preg_match('/\.mp4$/',$file)) {
|
|
header('Content-type: application/mp4');
|
|
header("Content-Disposition: attachment; filename=\"$file\"");
|
|
readfile($file);
|
|
}
|
|
} else {
|
|
}
|
|
|
|
//$task = ( isset($_POST['task']) ? $_POST['task'] : NULL );
|
|
if(isset($_POST['task'])) { $task = $_POST['task']; } elseif(isset($_GET['task'])) { $task = $_GET['task']; } else { $task = "1"; }
|
|
// ENSURE VIDEO IS ENABLED FOR THIS USER
|
|
if( !($user->level_info['level_video_allow'] || $user->level_info['level_youtube_allow']) )
|
|
{
|
|
// header("Location: user_home.php");
|
|
// exit();
|
|
}
|
|
|
|
|
|
// CREATE VIDEO OBJECT
|
|
$video = new se_video($user->user_info['user_id']);
|
|
|
|
// GET PRIVACY SETTINGS
|
|
$level_video_privacy = unserialize($user->level_info['level_video_privacy']);
|
|
rsort($level_video_privacy);
|
|
$level_video_comments = unserialize($user->level_info['level_video_comments']);
|
|
rsort($level_video_comments);
|
|
|
|
|
|
|
|
|
|
|
|
// GET VIDEOS
|
|
$total_videos = $video->video_tag_total("(se_videos.video_is_converted<>'-1')");
|
|
$video_array = $video->video_tag_list(0, $total_videos, "se_videos.video_is_converted, video_id DESC", "", 1);
|
|
|
|
|
|
// GET PREVIOUS PRIVACY SETTINGS
|
|
for($c=0;$c<count($level_video_privacy);$c++) {
|
|
if(user_privacy_levels($level_video_privacy[$c]) != "") {
|
|
SE_Language::_preload(user_privacy_levels($level_video_privacy[$c]));
|
|
$privacy_options[$level_video_privacy[$c]] = user_privacy_levels($level_video_privacy[$c]);
|
|
}
|
|
}
|
|
|
|
for($c=0;$c<count($level_video_comments);$c++) {
|
|
if(user_privacy_levels($level_video_comments[$c]) != "") {
|
|
SE_Language::_preload(user_privacy_levels($level_video_comments[$c]));
|
|
$comment_options[$level_video_comments[$c]] = user_privacy_levels($level_video_comments[$c]);
|
|
}
|
|
}
|
|
|
|
|
|
$dir=video_dir($user->user_info['user_id']);
|
|
|
|
// ASSIGN VARIABLES AND SHOW VIEW VIDEOS PAGE
|
|
$smarty->assign('videos_total', $total_videos);
|
|
$smarty->assign('videos', $video_array);
|
|
$smarty->assign('dir', $dir);
|
|
$smarty->assign('privacy_options', $privacy_options);
|
|
$smarty->assign('comment_options', $comment_options);
|
|
include "footer.php";
|
|
?>
|