
FIXED : has_access function ADDED : New Group Management System ADDED : NEW rewrite_rules for SEO links UPDATED : ClipBucket favicon.ico
58 lines
No EOL
1.5 KiB
PHP
58 lines
No EOL
1.5 KiB
PHP
<?php
|
|
/*
|
|
****************************************************************************
|
|
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
|
|
| @ Author : ArslanHassan
|
|
| @ Software : ClipBucket , © PHPBucket.com
|
|
*******************************************************************************
|
|
*/
|
|
|
|
define("THIS_PAGE","add_group_videos");
|
|
define("PARENT_PAGE","groups");
|
|
|
|
require 'includes/config.inc.php';
|
|
$pages->page_redir();
|
|
|
|
$url = mysql_clean($_GET['url']);
|
|
|
|
$details = $cbgroup->group_details_url($url);
|
|
assign('group',$details);
|
|
|
|
|
|
if(!$details)
|
|
e("Group does not exist");
|
|
elseif(!$cbgroup->is_member(userid(),$details['group_id']))
|
|
e("You are not member of this group so cannot add videos");
|
|
else
|
|
{
|
|
|
|
///Getting User Videos
|
|
$array = array('user'=>userid());
|
|
$usr_vids = get_videos($array);
|
|
assign('usr_vids',$usr_vids);
|
|
|
|
//Adding videos to group
|
|
if(isset($_POST['add_videos']))
|
|
{
|
|
$total = count($usr_vids);
|
|
for($i=0;$i<=$total;$i++)
|
|
{
|
|
$videoid = $usr_vids[$i]['videoid'];
|
|
if($_POST['check_video_'.$videoid]=='yes')
|
|
$cbgroup->add_group_video($videoid,$details['group_id'],false);
|
|
else
|
|
$cbgroup->remove_group_video($videoid,$details['group_id'],false);
|
|
}
|
|
//Update Group Total Videos
|
|
$cbgroup->update_group_videos_count($details['group_id']);
|
|
|
|
$eh->flush();
|
|
e("Selected videos have been updated","m");
|
|
}
|
|
assign('group',$details);
|
|
}
|
|
|
|
template_files('add_group_videos.html');
|
|
display_it();
|
|
|
|
?>
|