Video bookmark removed by copyright owner\'s request. ('.$owner.').
Please check out and follow their offical collection here!
';
}
// Where meta data for video, channel, gallery will be stored.
$meta_data = array("title" => "", "description" => "",
"videothumbnail" => "",
"videolink" => "",
"keywords" => "");
if ($gtype == "gallery_id" || $gtype == "gallery_name") { //show gallery index
$serialize_address=1;
//Get the gallery name and id
$gallery_id = sanitize_paranoid_string($_GET['id']);
if($gallery_id == 'www' || $gallery_id == '') {
header('location: /');
exit;
}
if ($gtype == "gallery_id")
$sql_where = "g.id = '$gallery_id'";
else
$sql_where = "g.url_name = '$gallery_id'";
if($user_id) {
$sql = "SELECT g.*, s.id s_id, u.safe FROM myvidster_gallery g
JOIN myvidster_user u on g.user_id = u.id
LEFT JOIN myvidster_subscription s ON s.type_id = g.id and s.user_id = $user_id and s.status IN (1,2)
WHERE
u.disable <> 1 and
$sql_where";
}
else {
$sql = "SELECT g.* FROM myvidster_gallery g
JOIN myvidster_user u on g.user_id = u.id
WHERE
u.disable <> 1 and
$sql_where";
}
$result = mysql_query($sql,$mysql_link_slave); //mrg
$row1 = mysql_fetch_array( $result );
if (!$row1) {
header( 'Location: /' );
exit;
}
$gallery_name = $row1['name'];
$short_gallery_name = shortentext($row1['name'],20);
$gallery_id = $row1['id'];
$gallery_owner = $row1['user_id'];
$s_id = $row1['s_id'];
$safe = $row1['safe'];
$collection_url="collection/$gallery_id/$short_gallery_name";
//echo $collection_url; exit;
if($safe == 5 && $gallery_owner != $user_id) header('Location: /?status=not_found');
if ($row1['gstats']) {
$gstats = '
';
}else $gstats = '';
$thumb_num = $row1['thumb_num'];
$rss_link = ""._("RSS Subscription")."";
$rss_link="";
if($gallery_owner == $user_id) {
$edit_gallery = '[edit]';
$sort_gallery = '[sort]';
$isowner=1;
}
else {
if(!$s_id)
$subscribe = "";
else $subscribe = "";
$isowner=0;
}
$subscriber_count = count_subscribers("gallery",$gallery_id,$isowner,$allfs);
$background_url = $row1['background_url'];
$gallery_description = $row1['description'];
$last_video = $row1['last_video'];
$meta_data['title'] = $gallery_name;
$meta_data['description'] = $gallery_description;
$gallery_desc = n3y_url_shorten(nl2br($gallery_description));
$url_name = $row1['url_name'];
if ($url_name && $gtype == "gallery_id") {
$gallery_url = $url_name;
if($allfs) {
header( "Location: /$gallery_url&allfs=1" );
exit;
}
else {
header( 'Location: /'.$gallery_url );
exit;
}
}
elseif(!$url_name) $gallery_url = "collection/".$gallery_id;
else $gallery_url = $url_name;
$gallery_url_full="//www.myvidster.com/$gallery_url";
$breadcrum = "$gallery_name";
$vgallery_content.="
";
$vgallery_content.="
$breadcrum
$subscribe
";
$vgallery_content.='
';
if($last_video) { //this checks to see if the last video belongs to the collection or has been removed
$sql="SELECT video.id, video.private
FROM myvidster_video video
JOIN myvidster_channel channel ON video.channel_id = channel.id
JOIN myvidster_gallery gallery ON channel.gallery_id = gallery.id
WHERE
video.id = $last_video and video.private <> 3 and video.broken <> 1";
$results1 = mysql_query($sql,$mysql_link_slave);
$row1 = mysql_fetch_assoc($results1);
$last_video_id=$row1['id'];
$last_video_private=$row1['private'];
}
if(!$last_video_id) { //ok no last video ? lets fetch a new one !
$sql = "SELECT video.id, video.private
from myvidster_gallery gallery
JOIN myvidster_channel channel ON channel.gallery_id = gallery.id
JOIN myvidster_video video ON video.channel_id = channel.id
JOIN myvidster_user user ON video.user_id = user.id
where gallery.id = $gallery_id
AND video.private <> 3 and video.broken <> 1
ORDER BY video.id desc";
$results1 = mysql_query($sql,$mysql_link_slave2);
$row1 = mysql_fetch_assoc($results1);
$last_video_id=$row1['id'];
$last_video_private=$row1['private'];
if($last_video_id) { //great update the last video id to the table
$sql = "update myvidster_gallery set last_video = $last_video_id where id = $gallery_id";
mysql_query($sql);
}
}
if($last_video_id) {
//check to see if the visitor is allow to view that last vid
//if not then just grab first available
if($user_id == $gallery_owner || $last_video_private != 1)
$sql_where = "WHERE video.id = $last_video_id";
else
$sql_where = "JOIN myvidster_gallery gallery ON channel.gallery_id = gallery.id
WHERE video.private IN (0,2)
and gallery.id = $gallery_id
limit 1";
$query="SELECT user.disp_name, video.id, video.posted, video.posted_by, video.thumbnail, video.title,
video.type, video.type_id, video.type_url, video.flv_download, video.channel_id,
video.user_id, video.private, video.base_link, video.name_attrib, video.flashvars,
video.broken, channel.name as channel_name, channel.id as channel_id, video.tags, video.keywords, video.access_lock,
video.cc_owner, user.profile_photo, user.email, user.safe, video.master_id
FROM myvidster_video video
JOIN myvidster_user user ON user.id = video.user_id
JOIN myvidster_channel channel ON channel.id = video.channel_id
$sql_where";
$vid_results = mysql_query($query,$mysql_link_slave);
$row1 = mysql_fetch_array($vid_results);
if($row1['id']) {
$id = $row1['id'];
$video_user_id = $row1['user_id'];
$vid_channel_id = $row1['channel_id'];
$type = $row1['type'];
if ($type == 999) $type_id = $id;
else $type_id = $row1['type_id'];
if($glb_locale=="es_ES")
$posted = strftime("%d de %b de %Y", @strtotime($row1['posted']));
else
$posted = strftime("%d %b, %Y", @strtotime($row1['posted']));
$source_url = $row1['type_url'];
$source_domain = get_domain($source_url);
$href = "/video/$id";
$title = $row1['title'];
$base_link = $row1['base_link'];
$name_attrib= $row1['name_attrib'];
$flashvars = $row1['flashvars'];
$video_title = wordwrap($title,40, "\n", true);
$video_title_url = safe_url($title);
$title_url = "$title";
$thumbnail = $row1['thumbnail'];
$thumbnailUrl = "
'._("This video contains adult content. To view this video you must be").' 18+.
Click here to disable the family filter. You can also disable the family filter in the user options (Recommend because this will disable the filter when you are log in).