clipbucket/upload/user_photos.php
Fawaz 801a9cc249 Updated : view_channel.html
Added : new js functions loadObject and channelObjects.
Added : new links for user collections, user favorite collection, user subscriptions and user subscribers
Added : height parameter in getFileSmarty function
Updated : default_thumb function for photos
Updated : registered get_collections for smarty
Added : new jquery compressed plugin jquery.jCarousel.js
Added : channel_item.html in blocks/view_channel folder
2011-01-27 12:42:54 +00:00

73 lines
No EOL
2 KiB
PHP

<?php
/*
****************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
****************************************************************
*/
define("THIS_PAGE",'user_photos');
define("PARENT_PAGE",'photos');
require 'includes/config.inc.php';
$pages->page_redir();
//$userquery->perm_check('view_videos',true);
$u = $_GET['user'];
$u = $u ? $u : $_GET['userid'];
$u = $u ? $u : $_GET['username'];
$u = $u ? $u : $_GET['uid'];
$u = $u ? $u : $_GET['u'];
$user = $userquery->get_user_details($u);
$page = mysql_clean($_GET['page']);
if($user)
{
assign('u',$user);
assign('p',$userquery->get_user_profile($udetails['userid']));
$mode = $_GET['mode'];
switch($mode)
{
case "photos":
case "uploaded":
default:
{
$limit = create_query_limit($page,config('photo_user_photos'));
assign("the_title",$user['username']." ".lang('photos'));
$photos = get_photos(array("limit"=>$limit,"user"=>$user['userid']));
$total_rows = get_photos(array("count_only"=>true,"user"=>$user['userid']));
$total_pages = count_pages($total_rows,config('photo_user_photos'));
}
break;
case "favorites":
case "fav_photots":
{
$limit = create_query_limit($page,config('photo_user_favorites'));
assign("the_title",$user['username']." ".lang('Favorite')." ".lang('photos'));
$favP = array("user"=>$user['userid'],"limit",$limit);
$photos = $cbphoto->action->get_favorites($favP);
$favP['count_only'] = true;
$total_rows = $cbphoto->action->get_favorites($params);
$total_pages = count_pages($total_rows,config('photo_user_favorites'));
}
break;
}
assign('photos',$photos);
$pages->paginate($total_pages,$page);
} else {
e(lang("usr_exist_err"));
$Cbucket->show_page = false;
}
if($Cbucket->show_page)
Template('user_photos.html');
else
display_it();
?>