
Added : user account files for photos and collections Added : function add onReload() in head.html Updated : photo_upload.html Updated : view_collection.html Updated : view_item.html to more simple page Added : view_photo.html Updated : watch_video.html. Displayed Collection form Updated : collections.class.php Added : new smarty functions Added : Photo Download Added : New function updateObjectStats Added : Photo Comment case Added : orphan_photos.php Fixed : Admin photo settings Updated : photo_uploader.php Updated : photo.class.php
96 lines
No EOL
2.3 KiB
PHP
96 lines
No EOL
2.3 KiB
PHP
<?php
|
|
/*
|
|
******************************************************************
|
|
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved.
|
|
| @ Author : ArslanHassan
|
|
| @ Software : ClipBucket , © PHPBucket.com
|
|
*******************************************************************
|
|
*/
|
|
|
|
define("THIS_PAGE",'view_item');
|
|
define("PARENT_PAGE",'view_collection');
|
|
require 'includes/config.inc.php';
|
|
|
|
$item = $_GET['item'];
|
|
$type = $_GET['type'];
|
|
$cid = $_GET['collection'];
|
|
$order = tbl("collection_items").".ci_id DESC";
|
|
|
|
if($cbcollection->is_viewable($cid))
|
|
{
|
|
if(empty($item))
|
|
header('location:'.BASEURL);
|
|
else
|
|
{
|
|
if(empty($type))
|
|
header('location:'.BASEURL);
|
|
else
|
|
{
|
|
assign('type',$type);
|
|
|
|
switch($type)
|
|
{
|
|
case "videos":
|
|
case "v":
|
|
{
|
|
global $cbvideo;
|
|
$video = $cbvideo->get_video($item);
|
|
|
|
if($video)
|
|
{
|
|
$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);
|
|
} else {
|
|
e("Item does not exist");
|
|
$Cbucket->show_page = false;
|
|
}
|
|
} else {
|
|
e("Item does not exist");
|
|
$Cbucket->show_page = false;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case "photos":
|
|
case "p":
|
|
{
|
|
global $cbphoto;
|
|
$photo = $cbphoto->get_photo($item);
|
|
if($photo)
|
|
{
|
|
$info = $cbphoto->collection->get_collection_item_fields($cid,$photo['photo_id'],'ci_id');
|
|
if($info)
|
|
{
|
|
$photo = array_merge($photo,$info[0]);
|
|
increment_views($photo['photo_id'],'photo');
|
|
|
|
assign('object',$photo);
|
|
assign('user',$userquery->get_user_details($photo['userid']));
|
|
assign('c',$collect);
|
|
} else {
|
|
e("Item does not exist");
|
|
$Cbucket->show_page = false;
|
|
}
|
|
} else {
|
|
e("Item does not exist");
|
|
$Cbucket->show_page = false;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
|
|
}
|
|
}
|
|
} else
|
|
$Cbucket->show_page = false;
|
|
|
|
template_files('view_item.html');
|
|
display_it();
|
|
?>
|