2010-12-14 13:53:51 +00:00
|
|
|
<?php
|
|
|
|
|
2012-04-30 10:49:46 +00:00
|
|
|
/*
|
|
|
|
* *****************************************************************
|
|
|
|
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved.
|
|
|
|
| @ Author : ArslanHassan
|
|
|
|
| @ Software : ClipBucket , © PHPBucket.com
|
|
|
|
* ******************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
define( "THIS_PAGE", 'view_item' );
|
|
|
|
define( "PARENT_PAGE", 'collections' );
|
2011-01-03 11:02:54 +00:00
|
|
|
|
2010-12-14 13:53:51 +00:00
|
|
|
require 'includes/config.inc.php';
|
2012-04-30 10:49:46 +00:00
|
|
|
$pages->page_redir();
|
2010-12-14 13:53:51 +00:00
|
|
|
|
2012-04-30 10:49:46 +00:00
|
|
|
$item = $_GET['item'];
|
2010-12-14 13:53:51 +00:00
|
|
|
$type = $_GET['type'];
|
2012-04-30 10:49:46 +00:00
|
|
|
$cid = $_GET['collection'];
|
|
|
|
$order = tbl( "collection_items" ) . ".ci_id DESC";
|
|
|
|
|
|
|
|
$type = confirm_collection_type( $type );
|
|
|
|
|
|
|
|
if ( $cbcollection->is_viewable( $cid ) ) {
|
|
|
|
if ( empty( $item ) )
|
|
|
|
header( 'location:' . BASEURL );
|
|
|
|
else {
|
|
|
|
if ( empty( $type ) )
|
|
|
|
header( 'location:' . BASEURL );
|
|
|
|
else {
|
|
|
|
assign( 'type', $type );
|
2012-05-28 07:10:27 +00:00
|
|
|
// $param = array("type" => $type, "cid" => $cid);
|
|
|
|
// $cdetails = $cbcollection->get_collections( $param );
|
|
|
|
// $collect = $cdetails[0];
|
|
|
|
$collect = $cbcollection->get_collection($cid, " AND type = '".$type."' ");
|
2012-04-30 10:49:46 +00:00
|
|
|
switch ( $type ) {
|
|
|
|
case "videos":
|
|
|
|
case "v": {
|
|
|
|
if ( VERSION != '3.0' ) {
|
|
|
|
e(lang('This is has been removed from Clipbucket '.VERSION),'w');
|
|
|
|
$Cbucket->show_page = false;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
global $cbvideo;
|
|
|
|
$video = $cbvideo->get_video( $item );
|
|
|
|
|
|
|
|
if ( video_playable( $video ) ) {
|
|
|
|
//Getting list of collection items
|
|
|
|
$page = mysql_clean( $_GET['page'] );
|
|
|
|
$get_limit = create_query_limit( $page, 20 );
|
|
|
|
$order = tbl( "collection_items" ) . ".ci_id DESC";
|
|
|
|
|
|
|
|
$items = $cbvideo->collection->get_collection_items_with_details( $cid, $order, $get_limit );
|
|
|
|
assign( 'items', $items );
|
|
|
|
|
|
|
|
assign( 'open_collection', 'yes' );
|
|
|
|
$info = $cbvideo->collection->get_collection_item_fields( $cid, $video['videoid'], 'ci_id,collection_id' );
|
|
|
|
if ( $info ) {
|
|
|
|
$video = array_merge( $video, $info[0] );
|
|
|
|
increment_views( $video['videoid'], 'video' );
|
|
|
|
|
|
|
|
assign( 'object', $video );
|
|
|
|
assign( 'user', $userquery->get_user_details( $video['userid'] ) );
|
|
|
|
assign( 'c', $collect );
|
|
|
|
|
|
|
|
subtitle( $video['title'] );
|
|
|
|
} else {
|
|
|
|
e( lang( "item_not_exist" ) );
|
|
|
|
$Cbucket->show_page = false;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
e( lang( "item_not_exist" ) );
|
|
|
|
$Cbucket->show_page = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "photos":
|
|
|
|
case "p": {
|
|
|
|
global $cbphoto;
|
2012-06-01 11:57:50 +00:00
|
|
|
$photo = $cbphoto->get_photo( $item, true );
|
2012-04-30 10:49:46 +00:00
|
|
|
if ( $photo ) {
|
|
|
|
$info = $cbphoto->collection->get_collection_item_fields( $cid, $photo['photo_id'], 'ci_id' );
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
|
2012-04-30 10:49:46 +00:00
|
|
|
if ( $info ) {
|
|
|
|
$photo = array_merge( $photo, $info[0] );
|
2012-05-28 07:10:27 +00:00
|
|
|
if ( is_photo_viewable( $photo ) ) {
|
|
|
|
increment_views( $photo['photo_id'], 'photo' );
|
Updated : upgrade_3.0.sql
Updated : edit_account.php, Now when avatar is set it redirects to user profile
Updated : EXIF Data url
Updated : queryString function regex. Old one was removing complete query string
Updated : display_manager_links(), now all variables except omo are removed from url
Added : Make profile link for photos @startup.php
Added : return_object_order in template_functions.php, This returns the order of provided omo value
Updated : Order checking @manage_collections.php and @manage_photos.php. Now only return_object_order is used
Updated : Updating of photo when it is uploaded
Updated : photo.html, single_feed.html, single_feed_comment.html, photo_form.html, user.html, video.html, /view_channel/feed.html, manage_photos.html, view_channel.html
Added : user_contacts.html, user_photos.html and user_videos.html
Added : autoComplete parameter for photo tagging
Updated : default.css, feeds.css and view_channel.css
Updated : user_contacts.php
Added : Next and Previous photos links @view_item.php
Fixed : Avatar Delete
Fixed : getProfileItem method of $userquery
2012-12-04 13:27:13 +00:00
|
|
|
|
2012-05-28 07:10:27 +00:00
|
|
|
assign( 'object', $photo );
|
|
|
|
assign( 'user', $userquery->get_user_details( $photo['userid'] ) );
|
|
|
|
assign( 'c', $collect );
|
|
|
|
|
|
|
|
subtitle( $photo['photo_title'] . ' « ' . $collect['collection_name'] );
|
|
|
|
|
|
|
|
register_photo_private_message_field( $photo );
|
Updated : upgrade_3.0.sql
Updated : edit_account.php, Now when avatar is set it redirects to user profile
Updated : EXIF Data url
Updated : queryString function regex. Old one was removing complete query string
Updated : display_manager_links(), now all variables except omo are removed from url
Added : Make profile link for photos @startup.php
Added : return_object_order in template_functions.php, This returns the order of provided omo value
Updated : Order checking @manage_collections.php and @manage_photos.php. Now only return_object_order is used
Updated : Updating of photo when it is uploaded
Updated : photo.html, single_feed.html, single_feed_comment.html, photo_form.html, user.html, video.html, /view_channel/feed.html, manage_photos.html, view_channel.html
Added : user_contacts.html, user_photos.html and user_videos.html
Added : autoComplete parameter for photo tagging
Updated : default.css, feeds.css and view_channel.css
Updated : user_contacts.php
Added : Next and Previous photos links @view_item.php
Fixed : Avatar Delete
Fixed : getProfileItem method of $userquery
2012-12-04 13:27:13 +00:00
|
|
|
$_next = $cbphoto->collection->get_next_prev_item( $photo['ci_id'], $photo['collection_id'], 'next' );
|
|
|
|
assign( 'next', $_next[0] );
|
|
|
|
|
|
|
|
$_prev = $cbphoto->collection->get_next_prev_item( $photo['ci_id'], $photo['collection_id'], 'prev' );
|
|
|
|
assign( 'prev', $_prev[0] );
|
2012-05-28 07:10:27 +00:00
|
|
|
} else {
|
|
|
|
cb_show_page( false );
|
|
|
|
}
|
2012-04-30 10:49:46 +00:00
|
|
|
} else {
|
|
|
|
e( lang( "item_not_exist" ) );
|
|
|
|
$Cbucket->show_page = false;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
e( lang( "item_not_exist" ) );
|
|
|
|
$Cbucket->show_page = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
$Cbucket->show_page = false;
|
2011-08-04 11:06:38 +00:00
|
|
|
|
2012-04-30 10:49:46 +00:00
|
|
|
template_files( 'view_item.html' );
|
2010-12-23 16:56:33 +00:00
|
|
|
display_it();
|
2010-12-14 13:53:51 +00:00
|
|
|
?>
|