ADDED : New Group System

FIXED : has_access function
ADDED : New Group Management System
ADDED : NEW rewrite_rules for SEO links
UPDATED : ClipBucket favicon.ico
This commit is contained in:
Arslan Hassan 2009-12-21 21:11:54 +00:00
parent 2335bca10b
commit 7888c52e44
96 changed files with 4415 additions and 1256 deletions

View file

@ -118,24 +118,13 @@ RewriteRule ^External/Upload external_upload.php [nc]
#
#
#Group Section
RewriteRule ^group/leave/([a-zA-Z0-9].+)$ leave_group.php?url=$1 [nc]
RewriteRule ^manage/group/videos/([a-zA-Z0-9].+)$ manage_group_videos.php?url=$1 [nc]
RewriteRule ^manage/group/videos/([a-zA-Z0-9].+)$ manage_group_videos.php?url=$1 [nc]
RewriteRule ^manage/group/addvideos/([a-zA-Z0-9].+)$ add_group_videos.php?url=$1 [nc]
RewriteRule ^manage/group/members/([a-zA-Z0-9].+)$ manage_group_members.php?url=$1 [nc]
RewriteRule ^manage/group manage_groups.php
RewriteRule ^group/view/([a-zA-Z0-9].+) view_group.php?url=$1&%{QUERY_STRING} [nc]
RewriteRule ^group/videos/([a-zA-Z0-9].+) view_group_videos.php?url=$1 [nc]
RewriteRule ^group/members/([a-zA-Z0-9].+) view_group_members.php?url=$1 [nc]
RewriteRule ^group/invite/([a-zA-Z0-9].+) invite_group.php?url=$1 [nc]
RewriteRule ^manage/group/edit/([a-zA-Z0-9])$ edit_group.php?url=$1 [nc]
RewriteRule ^group/create/ create_group.php [nc]
RewriteRule ^group/join/([a-zA-Z0-9].+) join_group.php?url=$1 [nc]
RewriteRule ^community groups.php [nc]
RewriteRule ^groups$ groups.php [nc]
RewriteRule ^group/delete delete_group.php [nc]
RewriteRule ^group/topic/(.*)$ view_topic.php?tid=$1 [nc]
RewriteRule ^group/([a-zA-Z0-9].+) view_group.php?url=$1&%{QUERY_STRING} [L]
RewriteRule ^view_topic/([a-zA-Z0-9].+)_tid_([0-9]+) view_topic.php?tid=$2&%{QUERY_STRING} [L]
RewriteRule ^groups/([0-9a-z].+)/(.*)/(.*)/(.*)/(.*) groups.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^groups groups.php [L]
RewriteRule ^sitemap.xml$ sitemap.php

View file

@ -9,7 +9,6 @@
include(dirname(__FILE__)."/../includes/config.inc.php");
$files = get_video_being_processed();
if(is_array($files))
foreach($files as $file)
{

View file

@ -37,7 +37,7 @@ rename($temp_file,$orig_file);
'use_audio_bit_rate' => true,
'use_audio_codec' => true,
'format' => 'flv',
'video_codec'=>'libx264',
'video_codec'=>'flv',
'audio_codec'=>'libfaac',
'audio_rate'=>22050,
'audio_bitrate'=>128000,
@ -65,6 +65,7 @@ rename($temp_file,$orig_file);
$ffmpeg->configs = $configs;
$ffmpeg->gen_thumbs = TRUE;
$ffmpeg->gen_big_thumb = TRUE;
$ffmpeg->tmp_dir = TEMP_DIR;
$ffmpeg->input_ext = $ext;
$ffmpeg->output_file = VIDEOS_DIR.'/'.$tmp_file.'.flv';
$ffmpeg->hq_output_file = VIDEOS_DIR.'/'.$tmp_file.'.mp4';

View file

@ -1,62 +1,58 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
****************************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
*******************************************************************************
*/
$manage_vids = TRUE;
define("THIS_PAGE","add_group_videos");
define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
$url = clean($_GET['url']);
include('group_inc.php');
$group = @$topic_details['group_id'];
$details = $groups->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
include('group_check.php');
$url = mysql_clean($_GET['url']);
//Adding Video To Group
if(isset($_POST['add_videos'])){
if($details['video_type'] == 1){
$approved = 'no';
}else{
$approved = 'yes';
}
$msg = $groups->AddVideos($group,$approved);
}
$details = $cbgroup->group_details_url($url);
assign('group',$details);
//Getting User Videos
$sql = "SELECT * from video WHERE username = '".$user."'";
$rs = $db->Execute($sql);
$videos = $rs->getrows();
$total_vdo = $rs->recordcount()+0;
for($id=0;$id<$total_vdo;$id++){
$query=mysql_query("SELECT * FROM video_detail WHERE flv='".$videos[$id]['flv']."'");
$data = mysql_fetch_array($query);
$query2=mysql_query("SELECT * FROM group_videos WHERE videokey='".$videos[$id]['videokey']."' AND group_id='".$details['group_id']."'");
if(mysql_num_rows($query2) > 0){
$videos[$id]['checked'] = 'checked="checked"';
}
$videos[$id]['thumb'] = GetThumb($videos[$id]['flv']);
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);
}
Assign('videos',$videos);
Assign('total_vids',$total_vdo);
template_files('add_group_videos.html');
display_it();
Assign('groups',$details);
Assign('subtitle',$details['group_name'].' '.$LANG['grp_add_title']);
@Assign('msg',$msg);
@Assign('show_group',$show_group);
Template('header.html');
Template('message.html');
Template('group_header.html');
Template('add_group_videos.html');
Template('footer.html');
?>

View file

@ -9,12 +9,12 @@ $userdata = $db->select("users","*");
// Creating Group if button is pressed
if(isset($_POST['create_group'])) {
$groups->createGroups($_POST);
$cbgroup->createGroups($_POST);
}
// Assigning Variables
assign('users',$userdata);
assign('category',$groups->get_categories());
assign('category',$cbgroup->get_categories());
template_files('add_group.html');
display_it();

View file

@ -14,13 +14,13 @@ $gpid = mysql_clean($_GET['group_id']);
$userdata = $db->select("users","*");
if(isset($_POST['update_group'])) {
$groups->edit_group($_POST);
$cbgroup->edit_group($_POST);
}
//Assign Varialbes
assign('users',$userdata);
assign('category',$groups->get_categories());
assign('group_details',$groups->group_details($gpid));
assign('category',$cbgroup->get_categories());
assign('group_details',$cbgroup->group_details($gpid));
template_files('edit_group.html');
display_it();
@ -32,14 +32,14 @@ display_it();
//$gpid = mysql_clean($_GET['group_id']);
////Updating Group
//if(isset($_POST['update'])){
// $msg = $groups->UpdateGroup(2);
// $msg = $cbgroup->UpdateGroup(2);
//}
//if(!$groups->GroupExists($group) || $group == 'Array'){
//if(!$cbgroup->GroupExists($group) || $group == 'Array'){
// $msg = $LANG['grp_exist_error'];
// $show_group = 'No';
//}else{
//
// $details = $groups->GetDetailsid($group);
// $details = $cbgroup->GetDetailsid($group);
// $group = $details['group_id'];
// $user = $_SESSION['username'];
//

View file

@ -11,14 +11,14 @@ require_once '../includes/admin_config.php';
//Form Processing
if(isset($_POST['add_cateogry'])){
$groups->add_category($_POST);
$cbgroup->add_category($_POST);
}
//Making Categoyr as Default
if(isset($_GET['make_default']))
{
$cid = mysql_clean($_GET['make_default']);
$groups->make_default_category($cid);
$cbgroup->make_default_category($cid);
}
//Edit Categoty
@ -26,19 +26,19 @@ if(isset($_GET['category'])){
assign("edit_category","show");
if(isset($_POST['update_category']))
{
$groups->update_category($_POST);
$cbgroup->update_category($_POST);
}
assign('cat_details',$groups->get_category($_GET['category']));
assign('cat_details',$cbgroup->get_category($_GET['category']));
}
//Delete Category
if(isset($_GET['delete_category'])){
$groups->delete_category($_GET['delete_category']);
$cbgroup->delete_category($_GET['delete_category']);
}
//Assing Category Values
assign('category',$groups->get_categories());
assign('total',$groups->total_categories());
assign('category',$cbgroup->get_categories());
assign('total',$cbgroup->total_categories());
template_files('group_category.html'); display_it();

View file

@ -13,18 +13,18 @@ $pages->page_redir();
// Deactivate Group
if(isset($_GET['deactivate'])) {
$groups->unactive_gp(mysql_clean($_GET['deactivate']));
$cbgroup->unactive_gp(mysql_clean($_GET['deactivate']));
}
// Activate Group
if(isset($_GET['activate'])) {
$groups->active_gp(mysql_clean($_GET['activate']));
$cbgroup->active_gp(mysql_clean($_GET['activate']));
}
//Multiple Activate
if(isset($_POST['activate_selected'])) {
for($i=0; $i<count($_POST['check_group']); $i++) {
$groups->active_gp($_POST['check_group'][$i],true);
$cbgroup->active_gp($_POST['check_group'][$i],true);
}
e(lang('Selected Groups are activated.','m'));
}
@ -32,20 +32,20 @@ $pages->page_redir();
//Multiple Deactivate
if(isset($_POST['deactivate_selected'])) {
for($i=0; $i<count($_POST['check_group']); $i++) {
$groups->unactive_gp($_POST['check_group'][$i],true);
$cbgroup->unactive_gp($_POST['check_group'][$i],true);
}
e(lang('Selected Groups are deactivated.','m'));
}
// Delete group
if(isset($_GET['delete_group'])) {
$groups->delete_group(mysql_clean($_GET['delete_group']));
$cbgroup->delete_group(mysql_clean($_GET['delete_group']));
}
//Multiple Delete
if(isset($_POST['delete_selected'])) {
for($i=0; $i<count($_POST['check_group']); $i++) {
$groups->delete_group($_POST['check_group'][$i],true);
$cbgroup->delete_group($_POST['check_group'][$i],true);
}
e(lang('Selected Groups are Deleted.','m'));
}
@ -58,8 +58,8 @@ $pages->page_redir();
$pages->paginate($total_pages,$page);
// Assign varibles
assign('category',$groups->get_categories());
assign('gps',$groups->get_groups());
assign('category',$cbgroup->get_categories());
assign('gps',$cbgroup->get_groups());
template_files('groups_manager.html');
display_it();

View file

@ -1,4 +1,3 @@
<link href="../theme/stylesheet.css" rel="stylesheet" type="text/css" />
<span class="page_title">Video Categories</span>

View file

@ -59,7 +59,7 @@
<tr>
<td class="td_body">Group Thumb</td>
<td align="left" class="td_body">
<div style="padding:3px; border:1px solid #ccc; float:left; margin-right:20px;"><img src="{$gp_thumbs_url}/{$groups->get_gp_thumb($group_details.group_image)}" /></div>
<div style="padding:3px; border:1px solid #ccc; float:left; margin-right:20px;"><img src="{$gp_thumbs_url}/{$cbgroup->get_gp_thumb($group_details.group_image)}" /></div>
<input type="file" name="gpThumb" id="gpThumb" tabindex="10" style="padding:4px; border:1px solid #CCC; width:350px; font-size:12px;"/></td>
</tr>
<tr>

View file

@ -41,7 +41,7 @@
onmouseover="$('#vid_opt-{$gps[gp_list].group_id}').show()"
onmouseout="$('#vid_opt-{$gps[gp_list].group_id}').hide()" >
<div style="float:left; width:45px; height:34px; margin-left:10px">
<img src="{$gp_thumbs_url}/{$groups->get_gp_thumb($gps[gp_list].group_image)}" class="mid_user_thumb" />
<img src="{$gp_thumbs_url}/{$cbgroup->get_gp_thumb($gps[gp_list].group_image)}" class="mid_user_thumb" />
</div>
<a href="{$baseurl}/view_group.php?url={$gps[gp_list].group_url}" target="_blank" style="text-indent:10px">
{$gps[gp_list].group_name}

View file

@ -185,6 +185,27 @@ if(!empty($mode))
break;
case 'add_friend':
{
$friend = $_POST['uid'];
$userid = userid();
$userquery->add_contact($userid,$friend);
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';
}
if(error())
{
$msg = error_list();
$msg = '<div class="error">'.$msg[0].'</div>';
}
echo $msg;
}
break;
case 'rate_comment':
{
$thumb = $_POST['thumb'];
@ -244,6 +265,19 @@ if(!empty($mode))
$cid = $userquery->add_comment($comment,$id,$reply_to);
}
break;
case 't':
case 'topic':
{
$id = mysql_clean($_POST['obj_id']);
$comment = $_POST['comment'];
if($comment=='undefined')
$comment = '';
$reply_to = $_POST['reply_to'];
$cid = $cbgroup->add_comment($comment,$id,$reply_to);
}
break;
}
@ -379,6 +413,8 @@ if(!empty($mode))
default:
header('location:'.BASEURL);
}
}else
header('location:'.BASEURL);

View file

@ -11,52 +11,14 @@ require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
$userid = $_SESSION['userid'];
// Creating Group if button is pressed
if(isset($_POST['create_group'])) {
$groups->createGroups($_POST,$userid);
}
if(isset($_POST['create_group'])) {
$cbgroup->create_group($_POST,userid(),true);
}
// Assigning Variables
assign('users',$userdata);
assign('category',$groups->get_categories());
template_files('create_group.html');
display_it();
////Assigning Category List
// $sql = "SELECT * from category";
// $rs = $db->Execute($sql);
// $total_categories = $rs->recordcount() + 0;
// $category = $rs->getrows();
// Assign('category', $category);
//
////Form Validation And Submition
// if(isset($_POST['create'])){
// $msg = $groups->CreateGroup();
// }
//
////Assigning Default Values
//@$values= array(
// 'default_name' => mysql_clean($_POST['name']),
// 'default_des' => mysql_clean($_POST['description']),
// 'default_tags' => mysql_clean($_POST['tags']),
// 'default_url' => mysql_clean($_POST['url']),
// 'default_category' => mysql_clean($_POST['category']),
// 'default_type' => mysql_clean($_POST['group_type']),
// 'default_vtype' => mysql_clean($_POST['video_type']),
// 'default_ptype' => mysql_clean($_POST['post_type'])
// );
// while(list($name,$value) = each($values)){
// Assign($name,$value);
// }
//
//
//@Assign('msg',$msg);
//Template('header.html');
//Template('message.html');
//Template('create_group.html');
//Template('footer.html');
?>

View file

@ -13,11 +13,11 @@ $userquery->logincheck();
$url = mysql_clean($_GET['url']);
if(isset($_POST['update'])){
$msg = $groups->UpdateGroup();
$msg = $cbgroup->UpdateGroup();
}
include('group_inc.php');
//Delete Group
$details = $groups->GetDetails($url);
$details = $cbgroup->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
if($details['username'] !== $user){
@ -27,7 +27,7 @@ if(isset($_POST['update'])){
Assign('groups',$details);
if(isset($_POST['delete_group'])){
$groups->DeleteGroup($_POST['group_id']);
$cbgroup->DeleteGroup($_POST['group_id']);
Assign('show_succes','yes');
$show_delete = 'No';
}

View file

@ -1,51 +1,39 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*************************************************************
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
*************************************************************
*/
require 'includes/config.inc.php';
$pages->page_redir();
$userquery->logincheck();
$udetails = $userquery->get_user_details(userid());
assign('user',$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));
$url = mysql_clean($_GET['url']);
//Updating Group
if(isset($_POST['update'])){
$msg = $groups->UpdateGroup();
}
//Checks Group exists Or Not
include('group_inc.php');
$gid = mysql_clean($_GET['gid']);
//get group details
$gdetails = $cbgroup->get_group_details($gid);
$details = $groups->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
if($details['username'] != $user){
$msg = $LANG['grp_owner_err1'];
$show_group = 'No';
}
Assign('groups',$details);
if($gdetails['userid'] != userid())
{
e("You cannot edit this group");
$Cbucket->show_page = false;
}else{
//Updating Video Details
if(isset($_POST['update_group']))
{
$_POST['group_id'] = $gid;
$cbgroup->update_group();
$gdetails = $cbgroup->get_group_details($gid);
}
assign('group',$gdetails);
}
//Assigning Category List
$sql = "SELECT * from category";
$rs = $db->Execute($sql);
$total_categories = $rs->recordcount() + 0;
$category = $rs->getrows();
Assign('category', $category);
//If Update is true
$update = mysql_clean(@$_GET['update']);
if($update==true){
$msg = $LANG['grp_update_msg'];
}
Assign('show_group',@$show_group);
Assign('subtitle',' Edit '.$details['group_name']);
Assign('msg',@$msg);
Template('header.html');
Template('message.html');
Template('edit_group.html');
Template('footer.html');
template_files('edit_group.html');
display_it();
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,7 +1,7 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
@ -11,12 +11,59 @@ define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$pages->page_redir();
//Collect Data
$gpData = $groups->get_groups();
// Assign varibles
assign('category',$groups->get_categories());
assign('gps',$groups->list_groups());
//Setting Sort
$sort = $_GET['sort'];
$g_cond = array('category'=>mysql_clean($_GET['cat']),'date_span'=>$_GET['time']);
switch($sort)
{
case "most_recent":
default:
{
$g_cond['order'] = " date_added DESC ";
}
break;
case "most_viewed":
{
$g_cond['order'] = " total_views DESC ";
}
break;
case "featured":
{
$g_cond['order'] = "yes";
}
break;
case "top_rated":
{
$g_cond['order'] = " total_members DESC";
}
break;
case "most_commented":
{
$g_cond['order'] = " total_posts DESC";
}
break;
}
//Getting User List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,CLISTPP);
$glist = $g_cond;
$glist['limit'] = $get_limit;
$groups = $cbgroup->get_groups($glist);
Assign('groups', $groups);
//Collecting Data for Pagination
$gcount = $g_cond;
$gcount['count_only'] = true;
$total_rows = $cbgroup->get_groups($gcount);
$total_pages = count_pages($total_rows,CLISTPP);
//Pagination
$pages->paginate($total_pages,$page);
template_files('groups.html');
display_it();

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -487,7 +487,7 @@ class cbactions
$playlist = $this->get_playlist($id);
if(!$playlist)
e(lang("playlist_not_exist"));
elseif($playlist['userid']!=userid() && !has_access('admin_access'))
elseif($playlist['userid']!=userid() && !has_access('admin_access',TRUE))
e(lang("you_dont_hv_permission_del_playlist"));
else
{

View file

@ -10,7 +10,9 @@
*/
define("KEEP_MP4_AS_IS","yes");
define("KEEP_MP4_AS_IS","no");
define("MP4Box_BINARY","/usr/local/bin/MP4Box");
define("FLVTool2_BINARY","/usr/local/bin/flvtool2");
class ffmpeg
{
@ -33,6 +35,8 @@ class ffmpeg
var $hq_output_file = '';
var $log_file = '';
var $input_ext = '';
var $tmp_dir = '/';
var $flvtool2 = '';
/**
@ -41,6 +45,8 @@ class ffmpeg
function ffmpeg($file)
{
$this->ffmpeg = FFMPEG_BINARY;
$this->mp4box = MP4Box_BINARY;
$this->flvtool2 = FLVTool2_BINARY;
$this->input_file = $file;
}
@ -190,6 +196,18 @@ class ffmpeg
unlink(TEMP_DIR.'/output.tmp');
}
#FFMPEG GNERETAES Damanged File
#Injecting MetaData ysing FLVtool2 - you must have update version of flvtool2 ie 1.0.6 FInal or greator
$flv_cmd = $this->flvtool2." -U ".$this->output_file." 2> ".TEMP_DIR."/flvtool2_output.tmp ";
$flvtool2_output = $this->exec($flv_cmd);
if(file_exists(TEMP_DIR.'/flvtool2_output.tmp'))
{
$flvtool2_output = $flvtool2_output ? $flvtool2_output : join("", file(TEMP_DIR.'/flvtool2_output.tmp'));
unlink(TEMP_DIR.'/flvtool2_output.tmp');
}
$output .= $flvtool2_output;
$this->log('Conversion Command',$command);
$this->log .="\r\n\r\nConversion Details\r\n\r\n";
$this->log .=$output;
@ -230,7 +248,9 @@ class ffmpeg
$info['size'] = (integer)$stats['size'];
$this->ffmpeg." -i $path_source -acodec copy -vcodec copy -f null /dev/null 2>&1";
$output = $this->exec( $this->ffmpeg." -i $path_source -acodec copy -vcodec copy -f null /dev/null 2>&1" );
# parse output
if( $this->parse_format_info( $output, $info ) === false )
return false;
@ -832,7 +852,7 @@ class ffmpeg
$this->calculate_size_padding( $p, $i, $width, $height, $ratio, $pad_top, $pad_bottom, $pad_left, $pad_right );
$opt_av .= "-s {$width}x{$height} -aspect $ratio -padcolor 000000 -padtop $pad_top -padbottom $pad_bottom -padleft $pad_left -padright $pad_right";
$output = "";
$command = $this->ffmpeg." -i ".$this->input_file." $opt_av -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 ".$this->hq_output_file." 2> ".TEMP_DIR."/output.tmp ";
if(KEEP_MP4_AS_IS=="yes" && $this->input_ext=='mp4')
@ -846,10 +866,26 @@ class ffmpeg
unlink(TEMP_DIR.'/output.tmp');
}
/**
* Mp4 files are mostly not converted properly
* we have to use Mp4box in order
* to play them in regular manner, otherwise Flash players will
* load whole video before playing it
*/
$mp4_output = "";
$command = $this->mp4box." -inter 0.5 ".$this->hq_output_file." -tmp ".$this->tmp_dir." 2> ".TEMP_DIR."/mp4_output.tmp ";
$mp4_output .= $this->exec($command);
if(file_exists(TEMP_DIR.'/mp4_output.tmp'))
{
$mp4_output = $mp4_output ? $mp4_output : join("", file(TEMP_DIR.'/mp4_output.tmp'));
unlink(TEMP_DIR.'/mp4_output.tmp');
}
$ouput .= $mp4_output;
$this->log .= "\r\n\r\n\n=========STARTING $type CONVERSION==============\r\n\r\n\n";
$this->log("$type Video -- Conversion Command",$command);
$this->log .="\r\n\r\nConversion Details\r\n\r\n";
$this->log .=$output;
$this->log .= $output;
$this->log .= "\r\n\r\n\n=========ENDING $type CONVERSION==============\n\n";
$fields = array('file_conversion_log',strtolower($type));

View file

@ -24,7 +24,9 @@ class EH extends ClipBucket
function add_error($message=NULL,$id=NULL)
{
global $ignore_cb_errors;
//if id is set, error will be generated from error message list
if(!$ignore_cb_errors)
$this->error_list[] = $message;
}
@ -59,7 +61,9 @@ class EH extends ClipBucket
*/
function add_message($message=NULL,$id=NULL)
{
global $ignore_cb_errors;
//if id is set, error will be generated from error message list
if(!$ignore_cb_errors)
$this->message_list[] = $message;
}

File diff suppressed because it is too large Load diff

View file

@ -147,43 +147,32 @@ class myquery {
* Function used to delete comments
* @param CID
*/
function delete_comment($cid,$type='v',$is_reply=FALSE)
function delete_comment($cid,$type='v',$is_reply=FALSE,$forceDelete=false)
{
global $db,$userquery,$LANG;
//first get comment details
$cdetails = $this->get_comment($cid);
switch($type)
{
case 'v':
$own_id = $this->get_vid_owner($cdetails['type_id']);
break;
case 'c';
$own_id = $this->get_vid_owner($cdetails['type_id']);
break;
}
$cdetails = $this->get_comment($cid);
$uid = user_id();
if( $uid == $cdetails['userid']
|| $uid==$own_id
if(($uid == $cdetails['userid'] && $cdetails['userid']!='')
|| $userquery->permission['mod_access'] == 'yes'
|| $is_reply==TRUE)
|| $is_reply==TRUE || $forceDelete)
{
$replies = $this->get_comments($cdetails['type_id'],$type,FALSE,$cid,TRUE);
if(count($replies)>0 && is_array($replies))
{
foreach($replies as $reply)
{
$this->delete_comment($reply['comment_id'],$type,TRUE);
$this->delete_comment($reply['comment_id'],$type,TRUE,$forceDelete);
}
}
$db->Execute("DELETE FROM comments WHERE comment_id='$cid'");
$db->update("users",array("total_comments"),array("|f|total_comments-1")," userid='".$cdetails['userid']."'");
e($LANG['usr_cmt_del_msg'],m);
if($uid)
$myquery->update_comments_by_user($uid);
e($LANG['usr_cmt_del_msg'],"m");
return true;
}else{
e($LANG['no_comment_del_perm']);
@ -193,6 +182,28 @@ class myquery {
}
function DeleteComment($id,$videoid){return $this->delete_comment($videoid);}
/**
* Function used to delete all comments of particlar object
*/
function delete_comments($objid,$type='v',$forceDelete=false)
{
global $db,$userquery,$LANG;
$uid = user_id();
if($userquery->permission['mod_access'] == 'yes' || $forceDelete)
{
$db->Execute("DELETE FROM comments WHERE type_id='$objid' AND type='$type' ");
e($LANG['usr_cmt_del_msg'],m);
return true;
}else{
e($LANG['no_comment_del_perm']);
return false;
}
return false;
}
/***
* Function used to rate comment

View file

@ -161,7 +161,12 @@ class pages{
$params .= ' '.$extra_params;
if(SEO=='yes')
$params ='href="'.$page.'"';
{
if(count($_GET)==0 || (count($_GET)==1 && isset($_GET['page'])))
$params = $params;
else
$params ='href="'.$page.'"';
}
$final_link = preg_replace(array("/$page_pattern/i","/$param_pattern/i"),array($page,$params),$tag);
$final_link = preg_replace(array("/$page_pattern/i","/$param_pattern/i"),array($page,$params),$final_link);

View file

@ -280,7 +280,7 @@
}
//FUNCTION USED TO CLEAN EMBED CODE
/*//FUNCTION USED TO CLEAN EMBED CODE
function CleanEmbedCode($code){
$code = trim($code);
$embed_code = str_replace('<script', '', $code);
@ -337,7 +337,7 @@
}else{
return $msg;
}
}
}*/
@ -482,6 +482,8 @@
'size'=>'45',
'db_field'=>'title',
'required'=>'yes',
'min_length' => 4,
'max_length'=>100
),
'desc' => array('title'=> $LANG['vdo_desc'],

View file

@ -2,7 +2,6 @@
/*
**************************
* @ Author : Arslan Hassan
* @ Co Author : Frank White
* @ Software : ClipBucket
* @ Since : 2007
* @ Modified : 06-08-2009
@ -37,6 +36,7 @@ class userquery extends CBCategory{
'users' => 'users',
'action_log' => 'action_log',
'subtbl' => 'subscriptions',
'contacts' => 'contacts',
);
function userquery()
@ -189,6 +189,9 @@ class userquery extends CBCategory{
function login_check($access=NULL,$check_only=FALSE)
{
global $LANG,$Cbucket,$sess;
//First check weather userid is here or not
if(!userid())
{
@ -219,15 +222,17 @@ class userquery extends CBCategory{
//Now user have passed all the stages, now checking if user has level access or not
elseif($access)
{
{
//$access_details = $this->get_user_level(userid());
$access_details = $this->permission;
if(is_numeric($access))
{
if($access_details['level_id'] == $access)
{
return true;
}else{
if(!$check_only)
e($LANG['insufficient_privileges']);
$Cbucket->show_page(false);
@ -242,8 +247,10 @@ class userquery extends CBCategory{
else
{
if(!$check_only)
e($LANG['insufficient_privileges']);
$Cbucket->show_page(false);
{
e($LANG['insufficient_privileges']);
$Cbucket->show_page(false);
}
return false;
}
}
@ -683,45 +690,243 @@ class userquery extends CBCategory{
function change_user_pass($array){ return $this->ChangeUserPassword($array); }
function change_password($array){ return $this->ChangeUserPassword($array); }
//Function Used to update number of channel / profile views of user
function UpdateChannelViews($user){
$query = mysql_query("SELECT profile_hits FROM users WHERE username='".$user."'");
$data = mysql_fetch_array($query);
$views = $data['profile_hits']+1;
if(!isset($_COOKIE['view_'.$user])){
mysql_query("UPDATE users SET profile_hits = '".$views."' WHERE username = '".$user."'");
setcookie('view_'.$user,'true',time()+3600,'/');
}
}
/**
* Function used to add contact
*/
function add_contact($uid,$fid)
{
global $cbemail,$db;
//Add Contact to Contact list
$friend = $this->get_user_details($fid);
$sender = $this->get_user_details($uid);
function AddContact($friend,$username,$type=1){
global $LANG;
if($friend == $username){
$msg = e($LANG['usr_cnt_err']);
}
$query = mysql_query("SELECT * FROM contacts WHERE friend_username = '".$friend."' AND username='".$username."'");
if(mysql_num_rows($query)>0){
$msg = e($LANG['usr_cnt_err1']);
}
if(empty($msg)){
mysql_query("INSERT INTO contacts (friend_username,username,type)VALUES('".$friend."','".$username."','".$type."')");
$msg = e($LANG['usr_cnt_msg']);
}
return $msg;
if(!$friend)
e(lang('usr_exist_err'));
elseif($this->is_requested_friend($uid,$fid))
e("You have already sent friend request");
elseif($this->is_requested_friend($uid,$fid,"in"))
{
$this->confirm_friend($fid,$uid);
e("Friend has been added");
}else
{
$db->insert($this->dbtbl['contacts'],array('userid','contact_userid','date_added'),
array($uid,$fid,now()));
$insert_id = $db->insert_id();
e("Friend request has been sent","m");
//Sending friendship request email
$tpl = $cbemail->get_template('friend_request_email');
$more_var = array
(
'{reciever}' => $friend['username'],
'{sender}' => $sender['username'],
'{sender_link}'=> $this->profile_link($sender),
'{request_link}'=> BASEURL.'/manage_contacts.php?mode=request&confirm='.$insert_id
);
if(!is_array($var))
$var = array();
$var = array_merge($more_var,$var);
$subj = $cbemail->replace($tpl['email_template_subject'],$var);
$msg = nl2br($cbemail->replace($tpl['email_template'],$var));
//Now Finally Sending Email
cbmail(array('to'=>$friend['email'],'from'=>WEBSITE_EMAIL,'subject'=>$subj,'content'=>$msg));
}
//Function Used to Update Videos Watch By A User
function UpdateWatched($userid){
global $LANG;
$data = $this->GetUserData($userid);
$watched = $data['total_watched']+1;
mysql_query("UPDATE users SET total_watched ='".$watched."' WHERE userid='".$userid."'");
}
/**
* Function used to check weather users are confirmed friends or not
*/
function is_confirmed_friend($uid,$fid)
{
global $db;
$count = $db->count($this->dbtbl['contacts'],"contact_id",
" (userid='$uid' AND contact_userid='$fid') OR (userid='$fid' AND contact_userid='$uid') AND confirmed='yes'" );
if($count[0]>0)
return true;
else
return false;
}
/**
* function used to check weather users are firends or not
*/
function is_friend($uid,$fid)
{
global $db;
$count = $db->count($this->dbtbl['contacts'],"contact_id",
" (userid='$uid' AND contact_userid='$fid') OR (userid='$fid' AND contact_userid='$uid')" );
if($count[0]>0)
return true;
else
return false;
}
/**
* Function used to check weather user has already requested friendship or not
*/
function is_requested_friend($uid,$fid,$type='out',$confirm=NULL)
{
global $db;
$query = "";
if($confirm)
$query = " AND confirmed='$confirm' ";
if($type=='out')
$count = $db->count($this->dbtbl['contacts'],"contact_id"," userid='$uid' AND contact_userid='$fid' $query" );
else
$count = $db->count($this->dbtbl['contacts'],"contact_id"," userid='$fid' AND contact_userid='$uid' $query" );
if($count[0]>0)
return true;
else
return false;
}
/**
* Function used to confirm friend
*/
function confirm_friend($uid,$rid,$msg=TRUE)
{
global $cbemail,$db;
if(!$this->is_requested_friend($rid,$uid,'out','no'))
{
if($msg)
e("Either user has not requested you friend request or you have already confirmed it");
}else
{
$db->update($this->dbtbl['contacts'],array('confirmed'),array("yes")," userid='$rid' AND contact_userid='$uid' " );
if($msg)
e("Friend has been confirmed","m");
//Sending friendship confirmation email
$tpl = $cbemail->get_template('friend_confirmation_email');
$friend = $this->get_user_details($rid);
$sender = $this->get_user_details($uid);
$more_var = array
(
'{reciever}' => $friend['username'],
'{sender}' => $sender['username'],
'{sender_link}'=> $this->profile_link($sender),
);
if(!is_array($var))
$var = array();
$var = array_merge($more_var,$var);
$subj = $cbemail->replace($tpl['email_template_subject'],$var);
$msg = nl2br($cbemail->replace($tpl['email_template'],$var));
//Now Finally Sending Email
cbmail(array('to'=>$friend['email'],'from'=>WEBSITE_EMAIL,'subject'=>$subj,'content'=>$msg));
}
}
/**
* Function used to confirm request
*/
function confirm_request($rid,$uid=NULL)
{
global $db;
if(!$uid)
$uid = userid();
$result = $db->select($this->dbtbl['contacts'],"*"," contact_id='$rid'");
$result = $result[0];
if($db->num_rows==0)
e("No friend request found");
elseif($uid!=$result['contact_userid'])
e("You cannot confirm this request");
elseif($result['confirmed']=='yes')
e("Friend request is already confirmed");
else
{
$this->confirm_friend($uid,$result['userid']);
}
}
/**
* Function used to get user contacts
*/
function get_contacts($uid,$group=0,$confirmed=NULL)
{
global $db;
$query = "";
if($confirmed)
$query = " AND comfirmed='$confirmed' ";
$result = $db->select($this->dbtbl['contacts'],"*"," userid='$uid' OR contact_userid='$uid' $query AND contact_group_id='$group' ");
if($db->num_rows>0)
return $result;
else
return false;
}
/**
* Function used to get pending contacts
*/
function get_pending_contacts($uid,$group=0)
{
global $db;
$result = $db->select($this->dbtbl['contacts'],"*"," userid='$uid' AND confirmed='no' AND contact_group_id='$group' ");
if($db->num_rows>0)
return $result;
else
return false;
}
/**
* Function used to get pending contacts
*/
function get_requested_contacts($uid,$group=0)
{
global $db;
$result = $db->select($this->dbtbl['contacts'],"*"," contact_userid='$uid' AND confirmed='no' AND contact_group_id='$group' ");
if($db->num_rows>0)
return $result;
else
return false;
}
/**
* Function used to remove user from contact list
* @param fid {id of friend that user wants to remove}
* @param uid {id of user who is removing other from friendlist}
*/
function remove_contact($fid,$uid=NULL)
{
global $db;
if(!$uid)
$uid = userid();
if(!$this->is_friend($fid,$uid))
e("User is not in your contact list");
else
{
$db->Execute("DELETE from ".$this->dbtbl['contacts']." WHERE
(userid='$uid' AND contact_userid='$fid') OR (userid='$fid' AND contact_userid='$uid')" );
e("User has been removed from your contact list","m");
}
}
/**
* Funcion used to increas user total_watched field
*/
function increment_watched_vides($userid)
{
global $db;
$db->update($this->dbtbl['users'],array('total_watched'),array('|f|total_watched+1')," userid='$userid'");
}
/**
* Old Function : GetNewMsgs
@ -865,7 +1070,7 @@ class userquery extends CBCategory{
return false;
}
/**
* Function used to reset user password
* it has two steps
@ -1361,6 +1566,26 @@ class userquery extends CBCategory{
}
function count_channel_comments($id){ return $this->count_profile_comments($id); }
/**
* Function used to count total comments made by users
*/
function count_comments_by_user($uid)
{
global $db;
$total_comments = $db->count('comments',"comment_id","userid='$uid'");
return $total_comments;
}
/**
* Function used to update user comments
*/
function update_comments_by_user($uid)
{
global $db;
$total_comments = $this->count_comments_by_user($id);
$db->update("users",array("total_comments"),array($total_comments)," userid='$id'");
}
/**
* Function used to update user comments count
*/
@ -2333,7 +2558,10 @@ class userquery extends CBCategory{
*/
function get_channel_action_links($u)
{
return array(lang('Send Message')=>'sm',lang('Add as friend')=>'aaf',lang('Block user')=>'bu');
return array(lang('Send Message')=>array('link'=>'javascript:void(0)','onclick'=>"add_friend('".$u['userid']."','result_cont')"),
lang('Add as friend')=>array('link'=>'javascript:void(0)','onclick'=>"add_friend('".$u['userid']."','result_cont')"),
lang('Block user')=>array('link'=>'javascript:void(0)','onclick'=>"add_friend('".$u['userid']."','result_cont')")
);
}
@ -2379,6 +2607,12 @@ class userquery extends CBCategory{
'Uploaded Videos'=>'manage_videos.php',
'Favorite Videos'=>'manage_videos.php?mode=favorites',
),
'Groups' =>array
(
'Manage Groups'=>'manage_groups.php',
'Create new group'=>'create_group.php',
'Joined Groups'=>'manage_groups.php?mode=joined',
),
'Playlist'=>array
(
'Manage Playlists'=>'manage_playlists.php',
@ -2390,6 +2624,11 @@ class userquery extends CBCategory{
'Notifications' => 'private_message.php?mode=notification',
'Sent' => 'private_message.php?mode=sent',
'Compose New'=> 'private_message.php?mode=new_msg',
),
'Contacts' =>array
(
'Manage contacts' => 'manage_contacts.php?mode=manage',
'Add new group'=> 'manage_contacts.php?mode=new_group',
)
);

View file

@ -31,8 +31,11 @@ define('GARBAGE_TIMEOUT',COOKIE_TIMEOUT);
ini_set('session.gc_maxlifetime', GARBAGE_TIMEOUT);
session_set_cookie_params(COOKIE_TIMEOUT,'/');
/*
$sessdir = '/tmp/'.$_SERVER['HTTP_HOST'];
//IGNORE CB ERRORS
$ignore_cb_errors = FALSE;
/*$sessdir = '/tmp/'.$_SERVER['HTTP_HOST'];
if (!is_dir($sessdir)) { mkdir($sessdir, 0777); }
ini_set('session.save_path', $sessdir);*/
@ -55,7 +58,11 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
require_once('classes/image.class.php');
require_once('classes/upload.class.php');
require_once('classes/stats.class.php');error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED);
#WTF
require_once('classes/stats.class.php');
#WTF
error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED);
#WTF
require_once('classes/ads.class.php');
require_once('classes/form.class.php');
@ -81,7 +88,7 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
$calcdate = new CalcDate();
$signup = new signup();
$Upload = new Upload();
$groups = new Groups();
$cbgroup = new CBGroups();
$stats = new stats();
$adsObj = new AdsManager();
$formObj = new formObj();
@ -270,6 +277,10 @@ error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED);
//Defining Group Thumbs directory
define('GP_THUMB_DIR',BASEDIR.'/images/groups_thumbs');
define('GP_THUMB_URL',BASEURL.'/images/groups_thumbs');
//TOPIC ICON DIR
define('TOPIC_ICON_DIR',BASEDIR.'/images/icons/topic_icons');
define('TOPIC_ICON_URL',BASEURL.'/images/icons/topic_icons');
include 'functions.php';
include 'plugin.functions.php';
@ -363,7 +374,7 @@ $Smarty->assign_by_ref('myquery', $myquery);
$Smarty->assign_by_ref('userquery', $userquery);
$Smarty->assign_by_ref('signup', $signup);
$Smarty->assign_by_ref('Upload', $Upload);
$Smarty->assign_by_ref('groups', new groups());
$Smarty->assign_by_ref('cbgroup', $cbgroup);
$Smarty->assign_by_ref('Stats', $stats);
$Smarty->assign_by_ref('db', $db);
$Smarty->assign_by_ref('adsObj', $adsObj);
@ -389,6 +400,7 @@ $Smarty->register_function('AD','getAd');
$Smarty->register_function('get_thumb','getSmartyThumb');
$Smarty->register_function('getThumb','getSmartyThumb');
$Smarty->register_function('videoLink','videoSmartyLink');
$Smarty->register_function('group_link','group_link');
$Smarty->register_function('show_rating','show_rating');
$Smarty->register_function('ANCHOR','ANCHOR');
$Smarty->register_function('FUNC','FUNC');

View file

@ -2,18 +2,23 @@
/**
* ALL LINKS ARE DEFINED HERE
* YOU CAN CHANGE THEM IF REQUIRED
* ARRAY( [name]=> Array([Non SEO Link] [SEO Link])) - Without BASEURL
* ARRAY( [name]=> Array([Non SEO Link], [SEO Link])) - Without BASEURL
*/
$Cbucket->links = array
(
'signup' =>array('signup.php','signup'),
'channels' =>array('channels.php','channels'),
'groups' =>array('groups.php','groups'),
'inbox' =>array('private_message.php?mode=inbox','private_message.php?mode=inbox'),
'login' =>array('signup.php','login'),
'logout' =>array('logout.php','logout'),
'videos' =>array('videos.php','videos'),
'channels' =>array('channels.php','channels'),
'my_account'=>array('myaccount.php','my_account'),
'groups' =>array('groups.php','groups'),
'my_videos' =>array('manage_videos.php','manage_videos.php'),
'notifications'=>array('private_message.php?mode=notification','private_message.php?mode=notification'),
'signup' =>array('signup.php','signup'),
'upload' =>array('upload.php','upload'),
'videos' =>array('videos.php','videos'),
);

View file

@ -7,7 +7,7 @@
# Function: Various
# Author: Arslan Hassan
# Language: PHP
# License: CBLA @ [url]http://cbla.cbdev.org/[/url]
# License: CBLA @ [url]http://clip-bucket.com/cbla[/url]
# Version: 2
# Last Modified: Monday, March 23, 2009 / 01:08 AM GMT+1 (fwhite)
# Notice: Please maintain this section
@ -185,6 +185,7 @@
/**
* Function used to send emails
* @Author : Arslan Hassan
* this is a very basic email function
* you can extend or replace this function easily
* read our docs.clip-bucket.com
@ -665,6 +666,43 @@
return video_link($vdetails);
}
/**
* Group Link
*/
function group_link($params)
{
$grp = $params['details'];
$id = $grp['group_id'];
$name = $grp['group_name'];
$url = $grp['group_url'];
if($params['type']=='' || $params['type']=='group')
{
if(SEO==yes)
return BASEURL.'/group/'.$url;
else
return BASEURL.'/view_group.php?url='.$url;
}
if($params['type']=='view_members')
{
return BASEURL.'/view_group_members.php?url='.$url;
if(SEO==yes)
return BASEURL.'/group_members/'.$url;
else
return BASEURL.'/view_group_members.php?url='.$url;
}
if($params['type']=='view_videos')
{
return BASEURL.'/view_group_videos.php?url='.$url;
if(SEO==yes)
return BASEURL.'/group_videos/'.$url;
else
return BASEURL.'/view_group_videos.php?url='.$url;
}
}
/**
* FUNCTION USED TO GET ADVERTISMENT
* @param : array(Ad Code, LIMIT);
@ -792,6 +830,20 @@
return $cats;
}
break;
case "group":
case "groups":
{
global $cbgroup;
if($with_all)
$all_cat = array(array('category_id'=>'all','category_name'=>'All'));
$cats = $cbgroup->get_categories();
if($all_cat)
$cats = array_merge($all_cat,$cats);
return $cats;
}
break;
}
}
function getSmartyCategoryList($params,&$Smarty)
@ -1081,7 +1133,7 @@
/**
* Function used to check weather user access or not
*/
function has_access($acces,$check_only=FALSE)
function has_access($access,$check_only=TRUE)
{
global $userquery;
return $userquery->login_check($access,$check_only);
@ -1866,6 +1918,14 @@
return $userquery->duplicate_email($user);
}
/**
* function used to check weather group URL exists or not
*/
function group_url_exists($url)
{
global $cbgroup;
return $cbgroup->group_url_exists($url);
}
/**
@ -2210,6 +2270,8 @@
*/
function call_watch_video_function($vdo)
{
global $userquery;
$funcs = get_functions('watch_video_functions');
if(is_array($funcs) && count($funcs)>0)
{
@ -2223,6 +2285,80 @@
}
increment_views($vdo['videoid']);
if(userid())
$userquery->increment_watched_vides(userid());
}
/**
* Funcion used to call functions
* when user view channel
* ie in view_channel.php
*/
function call_view_channel_functions($u)
{
$funcs = get_functions('view_channel_functions');
if(is_array($funcs) && count($funcs)>0)
{
foreach($funcs as $func)
{
if(!function_exists($func))
{
$func($u);
}
}
}
increment_views($u['userid'],"channel");
}
/**
* Funcion used to call functions
* when user view topic
* ie in view_topic.php
*/
function call_view_topic_functions($tdetails)
{
$funcs = get_functions('view_topic_functions');
if(is_array($funcs) && count($funcs)>0)
{
foreach($funcs as $func)
{
if(!function_exists($func))
{
$func($tdetails);
}
}
}
increment_views($tdetails['topic_id'],"topic");
}
/**
* Funcion used to call functions
* when user view group
* ie in view_group.php
*/
function call_view_group_functions($gdetails)
{
$funcs = get_functions('view_group_functions');
if(is_array($funcs) && count($funcs)>0)
{
foreach($funcs as $func)
{
if(!function_exists($func))
{
$func($gdetails);
}
}
}
increment_views($gdetails['group_id'],"group");
}
@ -2246,6 +2382,38 @@
setcookie('video_'.$id,'watched',time()+3600);
}
}
break;
case 'u':
case 'user':
default:
{
if(!isset($_COOKIE['user_'.$id])){
$db->update("users",array("profile_hits"),array("|f|profile_hits+1")," userid='$id'");
setcookie('user_'.$id,'watched',time()+3600);
}
}
break;
case 't':
case 'topic':
default:
{
if(!isset($_COOKIE['topic_'.$id])){
$db->update("group_topics",array("total_views"),array("|f|total_views+1")," topic_id='$id'");
setcookie('topic_'.$id,'watched',time()+3600);
}
}
break;
break;
case 'g':
case 'group':
default:
{
if(!isset($_COOKIE['group_'.$id])){
$db->update("groups",array("total_views"),array("|f|total_views+1")," group_id='$id'");
setcookie('group_'.$id,'watched',time()+3600);
}
}
break;
}
}
@ -2649,8 +2817,7 @@
{
switch($type)
{
case 'video':
default:
case 'video':case 'videos':case 'v':
{
if(!isset($_GET['sort']))
$_GET['sort'] = 'most_recent';
@ -2681,6 +2848,22 @@
return BASEURL.'/channels.php?cat='.$data['category_id'].'&sort='.$_GET['sort'].'&time='.$_GET['time'].'&page='.$_GET['page'].'&seo_cat_name='.$_GET['seo_cat_name'];
}
break;
default:
{
if(!isset($_GET['sort']))
$_GET['sort'] = 'most_recent';
if(!isset($_GET['time']))
$_GET['time'] = 'all_time';
if(!isset($_GET['page']))
$_GET['page'] = 1;
if(SEO=='yes')
return BASEURL.'/'.$type.'/'.$data['category_id'].'/'.SEO($data['category_name']).'/'.$_GET['sort'].'/'.$_GET['time'].'/'.$_GET['page'];
else
return BASEURL.'/'.$type.'.php?cat='.$data['category_id'].'&sort='.$_GET['sort'].'&time='.$_GET['time'].'&page='.$_GET['page'].'&seo_cat_name='.$_GET['seo_cat_name'];
}
break;
}
}
@ -2693,7 +2876,8 @@
switch($type)
{
case 'video':
default:
case 'videos':
case 'v':
{
if(!isset($_GET['cat']))
$_GET['cat'] = 'all';
@ -2751,6 +2935,38 @@
return BASEURL.'/channels.php?cat='.$_GET['cat'].'&sort='.$sorting.'&time='.$time.'&page='.$_GET['page'].'&seo_cat_name='.$_GET['seo_cat_name'];
}
break;
default:
{
if(!isset($_GET['cat']))
$_GET['cat'] = 'all';
if(!isset($_GET['time']))
$_GET['time'] = 'all_time';
if(!isset($_GET['sort']))
$_GET['sort'] = 'most_recent';
if(!isset($_GET['page']))
$_GET['page'] = 1;
if(!isset($_GET['seo_cat_name']))
$_GET['seo_cat_name'] = 'All';
if($mode == 'sort')
$sorting = $sort;
else
$sorting = $_GET['sort'];
if($mode == 'time')
$time = $sort;
else
$time = $_GET['time'];
if(SEO=='yes')
return BASEURL.'/'.$type.'/'.$_GET['cat'].'/'.$_GET['seo_cat_name'].'/'.$sorting.'/'.$time.'/'.$_GET['page'];
else
return BASEURL.'/'.$type.'.php?cat='.$_GET['cat'].'&sort='.$sorting.'&time='.$time.'&page='.$_GET['page'].'&seo_cat_name='.$_GET['seo_cat_name'];
}
break;
}
}
@ -2824,5 +3040,28 @@
}else
return true;
}
/**
* Function used to ingore errors
* that are created when there is wrong action done
* on clipbucket ie inavalid username etc
*/
function ignore_errors()
{
global $ignore_cb_errors;
$ignore_cb_errors = TRUE;
}
/**
* Function used to set $ignore_cb_errors
* back to TRUE so our error catching system
* can generate errors
*/
function catch_error()
{
global $ignore_cb_errors;
$ignore_cb_errors = FALSE;
}
?>

View file

@ -1,56 +1,43 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
****************************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
*******************************************************************************
*/
define("THIS_PAGE","invite_group");
define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$pages->page_redir();
$userquery->logincheck();
$url = mysql_clean($_GET['url']);
include('group_inc.php');
$details = $groups->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
if(empty($user)){
$user = $_COOKIE['username'];
}
include('group_check.php');
//Getting User Contacts
$sql = "SELECT * from contacts WHERE username = '".$_SESSION['username']."'";
$rs = $db->Execute($sql);
$videos = $rs->getrows();
Assign('contacts',$videos);
//Sending Message
if(isset($_POST['send'])){
$subj = $user.' '.$LANG['grp_inv_msg1'].' '.$details['group_name'];
$url = BASEURL.view_group_link.$details['group_url'];
$msg = $groups->SendInvitation($user,$group,$subj,$url);
$details = $cbgroup->group_details_url($url);
assign('group',$details);
if(!$cbgroup->is_owner($details))
e("You cannot invite members");
else
{
if($details)
{
assign('friends',$userquery->get_contacts(userid(),0));
}
//Chceking Logged in user is group user or not
if(!$groups->is_joined($_SESSION['username'],$group)){
Assign('join','yes');
}else{
Assign('join','no');
//Inviting Friends
if(isset($_POST['invite_friends']))
{
$cbgroup->invite_members($_POST['friend'],$details['group_id']);
}
Assign('groups',$details);
@Assign('subtitle',$details['group_name'].' '.$LANG['group']);
@Assign('msg',$msg);
@Assign('show_group',$show_group);
Template('header.html');
Template('message.html');
Template('group_header.html');
Template('invite_group.html');
Template('footer.html');
assign('mode',"invite_group");
template_files('view_group.html');
display_it();
}
?>

View file

@ -263,33 +263,19 @@ var page = baseurl+'/ajax.php';
}
function go_hq(vid)
{
var flashvars = {
htmlPage: document.location,
settingsFile: "http://localhost/clipbucket/2.x/2/upload/player/cbplayer/settings.php?hqid="+vid
};
var params = {
allowFullScreen: "true"
};
swfobject.embedSWF("http://localhost/clipbucket/2.x/2/upload/player/cbplayer/videoPlayer.swf",
"videoPlayer", "600", "350", "9.0.115",
"swfobject/expressInstall.swf", flashvars
, params);
}
/**
* Function used to delete video
* Function used to delete any item with confirm message
*/
function delete_video(obj,vid,msg,url)
function delete_item(obj,id,msg,url)
{
$("#"+obj+'-'+vid).click(function () {
$("#"+obj+'-'+id).click(function () {
if (confirm(msg)) {
document.location = url;
}
});
}
function delete_video(obj,id,msg,url){ return delete_item(obj,id,msg,url); }
/**
@ -430,6 +416,25 @@ var page = baseurl+'/ajax.php';
},'text');
}
function add_friend(uid,result_cont)
{
$.post(page,
{
mode : 'add_friend',
uid : uid,
},
function(data)
{
if(!data)
alert("No data");
else
{
$("#"+result_cont).css("display","block");
$("#"+result_cont).html(data);
}
},'text');
}
function rate_comment(cid,thumb)
{
@ -689,4 +694,19 @@ var page = baseurl+'/ajax.php';
{
if(!$.cookie("quick_list_box"))
$.cookie("quick_list_box","show")
}
}
function get_group_info(Div,li)
{
if( $(Div).css("display")=="none")
{
$("#group_info_cont > div").slideUp();
$("#group_info_cont "+Div).slideDown();
$(".group_detail_tabs .selected").removeClass("selected");
$(li).addClass("selected");
}
}

View file

@ -1,71 +1,98 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
******************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
******************************************************************
*/
require_once('includes/config.inc.php');
require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
$user = $_COOKIE['username'];
$udetails = $userquery->get_user_details(userid());
assign('user',$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));
//Removoing Favourite Video
if(isset($_POST['remove_user'])){
$contactid = $_POST['contactid'];
$msg = $myquery->RemoveUser($contactid,$user);
$mode = $_GET['mode'];
switch($mode)
{
case 'request':
case 'normal':
case 'view':
case 'manage':
default:
{
if($mode="request" && isset($_GET['confirm']))
{
$confirm = mysql_clean($_GET['confirm']);
$userquery->confirm_request($confirm);
}
if($mode="delete" && isset($_GET['userid']))
{
$userid = mysql_clean($_GET['userid']);
$userquery->remove_contact($userid);
}
assign("mode","manage");
}
break;
}
//Getting Videos List
$limit = CLISTPP;
Assign('limit',$limit);
$page = clean(@$_GET['page']);
if(empty($page) || $page == 0 || !is_numeric($page)){
$page = 1;
}
$from = $page-1;
$from = $from*$limit;
$query_limit = "limit $from,$limit";
////Getting Videos List
// $limit = CLISTPP;
// Assign('limit',$limit);
// $page = clean(@$_GET['page']);
// if(empty($page) || $page == 0 || !is_numeric($page)){
// $page = 1;
// }
// $from = $page-1;
// $from = $from*$limit;
// $query_limit = "limit $from,$limit";
//
// $sql = "SELECT * FROM contacts WHERE username='".$user."' ORDER BY date_added DESC $query_limit";
// $sql_p = "SELECT * FROM contacts WHERE username='".$user."' ORDER BY date_added DESC ";
// $data = $db->Execute($sql);
// $contact = $data->getrows();
// $total_contact = $data->recordcount()+0;
//
// for($id=0;$id<$total_contact;$id++){
// $udata = $userquery->GetUserData_username($contact[$id]['friend_username']);
// $contact[$id]['avatar'] = $udata['avatar'];
// }
//
// Assign('contacts',$contact);
//
////Pagination
// $query = mysql_query($sql_p);
// Assign('grand_total',mysql_num_rows($query));
// $total_rows = mysql_num_rows($query);
// $page_id=1;
// $id = 1;
// //$all_pages[0]['page'] = $page_id;
// $records = $total_rows/$limit;
// $pages = round($records+0.49,0);
//
//
//$show_pages = ShowPagination($pages,$page,@$link);
//Assign('show_pages',$show_pages);
//
//Assign('pages',$pages);
//Assign('cur_page',$page);
//Assign('nextpage',$page+1);
//Assign('prepage',$page-1);
//Assign('total_pages',$page_id);
//subtitle('contacts');
//Assign('msg',@$msg);
//Template('header.html');
//Template('message.html');
//Template('manage_contacts.html');
//Template('footer.html');
$sql = "SELECT * FROM contacts WHERE username='".$user."' ORDER BY date_added DESC $query_limit";
$sql_p = "SELECT * FROM contacts WHERE username='".$user."' ORDER BY date_added DESC ";
$data = $db->Execute($sql);
$contact = $data->getrows();
$total_contact = $data->recordcount()+0;
for($id=0;$id<$total_contact;$id++){
$udata = $userquery->GetUserData_username($contact[$id]['friend_username']);
$contact[$id]['avatar'] = $udata['avatar'];
}
Assign('contacts',$contact);
//Pagination
$query = mysql_query($sql_p);
Assign('grand_total',mysql_num_rows($query));
$total_rows = mysql_num_rows($query);
$page_id=1;
$id = 1;
//$all_pages[0]['page'] = $page_id;
$records = $total_rows/$limit;
$pages = round($records+0.49,0);
$show_pages = ShowPagination($pages,$page,@$link);
Assign('show_pages',$show_pages);
Assign('pages',$pages);
Assign('cur_page',$page);
Assign('nextpage',$page+1);
Assign('prepage',$page-1);
Assign('total_pages',$page_id);
subtitle('contacts');
Assign('msg',@$msg);
Template('header.html');
Template('message.html');
Template('manage_contacts.html');
Template('footer.html');
template_files('manage_contacts.html');
display_it();
?>

View file

@ -14,12 +14,12 @@ $user = $_SESSION['username'];
$url = mysql_clean($_GET['url']);
//Updating Group
if(isset($_POST['update'])){
$msg = $groups->UpdateGroup();
$msg = $cbgroup->UpdateGroup();
}
include('group_inc.php');
$details = $groups->GetDetails($url);
$details = $cbgroup->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
if(empty($user)){
@ -33,7 +33,7 @@ if(isset($_POST['update'])){
Assign('owner','yes');
}
//Chceking Logged in user is group user or not
if(!$groups->is_joined($_SESSION['username'],$group)){
if(!$cbgroup->is_joined($_SESSION['username'],$group)){
Assign('join','yes');
}else{
Assign('join','no');
@ -42,11 +42,11 @@ if(isset($_POST['update'])){
//Removing A Video
if(isset($_POST['remove'])){
$msg = $groups->RemoveMembers($group);
$msg = $cbgroup->RemoveMembers($group);
}
//Approve Videos
if(isset($_POST['approve'])){
$msg = $groups->ApproveMembers($group);
$msg = $cbgroup->ApproveMembers($group);
}
//Getting Videos List

View file

@ -16,11 +16,11 @@ $manage_vids = TRUE;
$url = mysql_clean($_GET['url']);
//Updating Group
if(isset($_POST['update'])){
$msg = $groups->UpdateGroup();
$msg = $cbgroup->UpdateGroup();
}
include('group_inc.php');
$details = $groups->GetDetails($url);
$details = $cbgroup->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
if(empty($user)){
@ -34,7 +34,7 @@ if(isset($_POST['update'])){
Assign('owner','yes');
}
//Chceking Logged in user is group user or not
if(!$groups->is_joined($_SESSION['username'],$group)){
if(!$cbgroup->is_joined($_SESSION['username'],$group)){
Assign('join','yes');
}else{
Assign('join','no');
@ -44,11 +44,11 @@ Assign('groups',$details);
//Removing A Video
if(isset($_POST['remove'])){
$msg = $groups->RemoveVideos($group);
$msg = $cbgroup->RemoveVideos($group);
}
//Approve Videos
if(isset($_POST['approve'])){
$msg = $groups->ApproveVideos($group);
$msg = $cbgroup->ApproveVideos($group);
}
//Getting Videos List

View file

@ -1,104 +1,166 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
require_once('includes/config.inc.php');
define("THIS_PAGE",'manage_videos');
require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
$user = $_SESSION['username'];
$udetails = $userquery->get_user_details(userid());
assign('user',$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));
//Leaving Groups
if(isset($_POST['leave'])){
$query = mysql_query("SELECT * FROM group_members WHERE username = '".$user."'");
while($data=mysql_fetch_array($query)){
if($_POST[$data['group_id']] == 'yes'){
$groups->LeaveGroup($user,$data['group_id']);
$mode = $_GET['mode'];
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,VLISTPP);
switch($mode)
{
case 'manage':
default:
{
if($_GET['gid_delete'])
{
$gid = $_GET['gid_delete'];
$cbgroup->delete_group($gid);
}
assign('mode','manage');
$usr_groups = $cbgroup->get_groups(array('user'=>userid()));
assign('usr_groups',$usr_groups);
}
break;
case 'manage_members':
{
assign('mode','manage_members');
$gid = mysql_clean($_GET['gid']);
$gdetails = $cbgroup->get_group_details($gid);
//Activating Member Members
if(isset($_POST['activate_pending']))
{
$total = count($_POST['users']);
for($i=0;$i<$total;$i++)
{
if($_POST['users'][$i]!='')
$cbgroup->member_actions($gid,$_POST['users'][$i],'activate');
}
}
$msg = $LANG['grp_rmv_msg'];
}
//Remove Groups
if(isset($_POST['remove'])){
$query = mysql_query("SELECT * FROM groups WHERE username='".$user."'");
while($data=mysql_fetch_array($query)){
if($_POST[$data['group_id']] == 'yes'){
$groups->DeleteGroup($data['group_id']);
//Deactivation Members
if(isset($_POST['disapprove_members']))
{
$total = count($_POST['users']);
for($i=0;$i<$total;$i++)
{
if($_POST['users'][$i]!='')
$cbgroup->member_actions($gid,$_POST['users'][$i],'deactivate');
}
}
$msg = $LANG['grp_del_msg'];
}
//Deleting Members
if(isset($_POST['delete_members']))
{
$total = count($_POST['users']);
for($i=0;$i<$total;$i++)
{
if($_POST['users'][$i]!='')
$cbgroup->member_actions($gid,$_POST['users'][$i],'delete');
}
}
if($gdetails)
{
assign("group",$gdetails);
//Getting Group Members (Active Only)
$gp_mems = $cbgroup->get_members($gdetails['group_id'],"yes");
assign('gp_mems',$gp_mems);
//Getting Videos List
$limit = GLISTPP;
Assign('limit',$limit);
$page = clean($_GET['page']);
if(empty($page) || $page == 0 || !is_numeric($page)){
$page = 1;
}else
e("Group does not exist");
}
$from = $page-1;
$from = $from*$limit;
$query_limit = "limit $from,$limit";
//Getting Order
$show = mysql_clean($_GET['show']);
if($show == 'owned'){
Assign('show','Owned');
$sql = "SELECT * FROM groups WHERE username='".$user."' $orderby $query_limit ";
$sql_p = "SELECT * FROM groups WHERE username='".$user."' ";
}else{
Assign('show','Joined');
$sql = "SELECT * FROM group_members WHERE username='".$user."' $orderby $query_limit ";
$sql_p = "SELECT * FROM group_members WHERE username='".$user."' ";
break;
case 'manage_videos':
{
assign('mode','manage_videos');
$gid = mysql_clean($_GET['gid']);
$gdetails = $cbgroup->get_group_details($gid);
//Activating Member Members
if(isset($_POST['activate_videos']))
{
$total = count($_POST['check_vid']);
for($i=0;$i<$total;$i++)
{
if($_POST['check_vid'][$i]!='')
$cbgroup->video_actions($gid,$_POST['check_vid'][$i],'activate');
}
}
//Deactivation Members
if(isset($_POST['disapprove_videos']))
{
$total = count($_POST['check_vid']);
for($i=0;$i<$total;$i++)
{
if($_POST['check_vid'][$i]!='')
$cbgroup->video_actions($gid,$_POST['check_vid'][$i],'deactivate');
}
}
//Deleting Members
if(isset($_POST['delete_videos']))
{
$total = count($_POST['check_vid']);
for($i=0;$i<$total;$i++)
{
if($_POST['check_vid'][$i]!='')
$cbgroup->video_actions($gid,$_POST['check_vid'][$i],'delete');
}
}
if($gdetails)
{
assign("group",$gdetails);
//Getting Group Videos (Active Only)
$grp_vids = $cbgroup->get_group_videos($gid,"yes");
assign('grp_vids',$grp_vids);
}else
e("Group does not exist");
}
break;
$data = $db->Execute($sql);
$groups = $data->getrows();
$total_groups = $data->recordcount()+0;
for($id=0;$id<$total_groups;$id++){
$query = mysql_query("SELECT * FROM groups WHERE group_id='".$groups[$id]['group_id']."'");
$group_details = mysql_fetch_array($query);
$groups[$id]['group_name'] = $group_details['group_name'];
$groups[$id]['dateadded'] = $group_details['dateadded'];
$groups[$id]['username'] = $group_details['username'];
$groups[$id]['group_url'] = $group_details['group_url'];
$groups[$id]['group_thumb'] = $group_details['group_thumb'];
$groups[$id]['approved'] = $group_details['approved'];
case 'joined':
{
//Leaving Groups
if(isset($_POST['leave_groups']))
{
$total = count($_POST['check_gid']);
for($i=0;$i<$total;$i++)
$cbgroup->leave_group($_POST['check_gid'][$i],userid());
}
assign('mode','joined');
$mem_grps = $cbgroup->user_joined_groups(userid());
assign('usr_groups',$mem_grps);
}
Assign('groups',$groups);
//Pagination
$query = mysql_query($sql_p);
Assign('grand_total',mysql_num_rows($query));
$total_rows = mysql_num_rows($query);
$page_id=1;
$id = 1;
$records = $total_rows/$limit;
$pages = round($records+0.49,0);
break;
}
$show_pages = ShowPagination($pages,$page,'order='.$order);
Assign('show_pages',$show_pages);
Assign('link','order='.$order);
Assign('pages',$pages);
Assign('cur_page',$page);
Assign('nextpage',$page+1);
Assign('prepage',$page-1);
Assign('total_pages',$page_id);
subtitle('manage_video');
Assign('msg',$msg);
Template('header.html');
Template('message.html');
Template('manage_groups.html');
Template('footer.html');
template_files('manage_groups.html');
display_it();
?>

View file

@ -39,12 +39,13 @@ if(!function_exists('bb_to_html'))
}
//Registering Action that will be applied while displaying comment and or description
register_action(array('bb_to_html'=>array('comment','description','pm_compose_box')));
register_action(array('bb_to_html'=>array('comment','description','pm_compose_box','before_topic_post_box')));
//Registerin Anchors , that will be displayed before compose boxes
register_anchor("<script>edToolbar('comment_box'); </script>",'before_compose_box');
register_anchor("<script>edToolbar('comment_box-reply'); </script>",'before_reply_compose_box');
register_anchor("<script>edToolbar('desc'); </script>",'before_desc_compose_box');
register_anchor("<script>edToolbar('pm_content'); </script>",'before_pm_compose_box');
register_anchor("<script>edToolbar('topic_post'); </script>",'before_topic_post_box');
//Adding JS Code
$Cbucket->addJS(array('bbcode_js/ed.js'=>'global'));

View file

@ -5,7 +5,7 @@
Author: Arslan Hassan
ClipBucket Version: 2
Plugin Version: 1.0
Website: http://labguru.com/
Website: http://clip-bucket.com/
*/
@ -68,12 +68,13 @@ if(!function_exists('validate_embed_code'))
*/
function validate_embed_code($val)
{
global $LANG;
if(empty($val) || $val=='none')
{
return 'none';
}else{
//Striping Slasshes as they are not required
$val = stripslashes($val);
//Removing spaces and non required code
$val = preg_replace(array("/\r+/","/\n+/","/\t+/"),"",$val);
//Removing Links
@ -86,15 +87,15 @@ if(!function_exists('validate_embed_code'))
$val = preg_replace('/<img (.*) \/>/','',$val);
if(!stristr($val,'<embed')&&!stristr($val,'<object') &&!stristr($val,'<div'))
e($LANG['embed_code_invalid_err']);
e(lang('embed_code_invalid_err'));
//Replacing Widht and Height
$pattern = array
('/width="([0-9]+)"/ui',"/width='([0-9]+)'/ui",'/height="([0-9]+)"/ui',"/height='([0-9]+)'/ui",
'/width:([0-9]+)px/ui','/height:([0-9]+)px/ui');
("/width=\"([0-9]+)\"/Ui","/width='([0-9]+)'/Ui","/height=\"([0-9]+)\"/Ui","/height='([0-9]+)'/Ui",
"/width:([0-9]+)px/Ui","/height:([0-9]+)px/Ui");
$replace = array
('width="{Width}"','width="{Width}"','height="{Height}"','height="{Height}"',
'/width:{Width}px/ui','/height:{Height}px/ui');
'width:{Width}px','height:{Height}px');
$val = preg_replace($pattern,$replace,$val);

View file

@ -8,10 +8,10 @@
{section name=gp_list loop=$gps}
{assign var=owner value=$userquery->GetUserData($gps[gp_list].group_owner)}
{assign var=stats value=$groups->group_stats($gps[gp_list].group_id)}
{assign var=stats value=$cbgroup->group_stats($gps[gp_list].group_id)}
<div class="clearfix" style="width:800px;border:1px solid #ccc; background:#f3f3f3; padding:6px; margin:0px auto 20px; position:relative;">
<div style="padding:3px; border:1px solid lightblue; float:left; margin-right:10px; background:#FFF;">
<img src="{$gp_thumbs_url}/{$groups->get_gp_thumb($gps[gp_list].group_image)}" />
<img src="{$gp_thumbs_url}/{$cbgroup->get_gp_thumb($gps[gp_list].group_image)}" />
</div>
<small style="display:block;"><strong>{$gps[gp_list].group_name}</strong></small>
<small style="display:block;">{$gps[gp_list].group_description}</small>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

View file

@ -0,0 +1,34 @@
<div style="width:900px; margin:auto">
<div class="simple_container">
<h2>{lang code='usr_activation_title'}</h2>
<hr align="center" width="100%" size="1" noshade="noshade" />
<div style="margin-bottom:10px">Please enter your user username and activation code in order to activate your account, please check your inbox for Activation code, if you do not have activation code, please request by filling next form</div>
<form action="" method="post" name="Actvation Code" id="Actvation Code" class="cbform">
<label for="av_username" class="label">{lang code='username'}</label>
<input type="text" name="av_username" id="av_username" /><br />
<div class="clearfix"></div>
<label for="avcode" class="label">{lang code='usr_activation_code_tl'}</label>
<input type="text" name="avcode" id="avcode" />
<div class="clearfix"></div>
<label class="label">&nbsp;</label>
<input type="submit" name="activate_user" class="cb_button_2" value="{lang code='activate'}" />
</form>
</div>
<div class="simple_container">
<h2>{lang code='usr_actiavation_msg1'}</h2>
<hr align="center" width="100%" size="1" noshade="noshade" />
<div style="margin-bottom:10px">Please enter your email address to request your activation code</div>
<form action="" method="post" name="Actvation Code" id="Actvation Code" class="cbform">
<label for="av_email" class="label">{lang code='email'}</label>
<input type="text" name="av_email" id="av_email" /><br />
<div class="clearfix"></div>
<label class="label">&nbsp;</label>
<input name="request_avcode" type="submit" class="cb_button_2" id="request_avcode" value="{lang code='request'}" />
</form>
</div>
</div>

View file

@ -0,0 +1,21 @@
<div class="group_view">
{include file="$style_dir/blocks/group/group_header.html" group=$group}
<h2>Add Videos To Group</h2>
<form name="add_group_videos" id="add_group_videos" method="post" action="">
{foreach from=$usr_vids item=video}
{if $cbgroup->is_group_video($video.videoid,$group.group_id)}
{assign var='check_this' value='yes'}
{else}
{assign var='check_this' value=''}
{/if}
{include file="$style_dir/blocks/video.html" video=$video display_type='add_type'}
{/foreach}
<div class="clearfix"></div>
<div align="center">
<input type="submit" name="add_videos" id="add_videos" value="Add Videos">
</div>
</form>
</div>

View file

@ -0,0 +1,30 @@
<div>
<div class="add_topic_container">
<h2>Add New Topic</h2>
<form name="form1" method="post" action="{group_link details=$group}" class="topic_form">
{assign var='form_fields' value=$cbgroup->load_add_topic_form_fields()}
{foreach from=$form_fields item=field}
<label for="{$field.id}" class="label">{$field.title}</label>
{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
{/foreach}
<div class="topic_icon_cont">
<fieldset>
<legend>Topic Icon</legend>
{assign var=topic_icons value=$cbgroup->get_topic_icons()}
{if $topic_icons}
{foreach from=$topic_icons item=icon}
<label><img src="{$icon.url}"><br>
<input type="radio" name="topic_icon" value="{$icon.file}" {if $smarty.post.topic_icon ==$icon.file} checked{/if} ></label>
{/foreach}
<div class="clearfix"></div>
{/if}
</fieldset>
</div>
<div align="left" style="padding:5px 0px"><button name="add_topic" id="add_topic" value="submit" class="cb_button_2">Add topic</button></div>
</form>
</div>
</div>

View file

@ -0,0 +1,130 @@
<!-- GROUP HEADER STARTS HERE -->
<div class="group_top_cont">
<!-- Group Left Column -->
<div class="grp_left_column">
<div class="group_thumb_cont" > <a href="{group_link details=$group}"><img src="{$cbgroup->get_group_thumb($group)}" border="0" /></a>
</div>
<div class="group_option_container">
<span class="grp_opt_title">Group option</span>
<ul>
{assign var=join_link value=$cbgroup->group_opt_link($group,'join')}
{if $join_link}<li>{$join_link}</li>{/if}
{assign var=invite_link value=$cbgroup->group_opt_link($group,'invite')}
{if $invite_link}<li>{$invite_link}</li>{/if}
{assign var=leave_link value=$cbgroup->group_opt_link($group,'leave')}
{if $leave_link}<li>{$leave_link}</li>{/if}
{assign var=add_videos_link value=$cbgroup->group_opt_link($group,'add_videos')}
{if $add_videos_link}<li>{$add_videos_link}</li>{/if}
{assign var=manage_videos_link value=$cbgroup->group_opt_link($group,'manage_videos')}
{if $manage_videos_link}<li>{$manage_videos_link}</li>{/if}
{assign var=manage_members_link value=$cbgroup->group_opt_link($group,'manage_members')}
{if $manage_members_link}<li>{$manage_members_link}</li>{/if}
{assign var=remove_group_link value=$cbgroup->group_opt_link($group,'remove_group')}
{if $remove_group_link}<li>{$remove_group_link}</li>{/if}
</ul>
</div>
</div>
<!-- Group Left Column End-->
<!-- Group Right Column -->
<div class="grp_right_column">
<div class="group_title">
<div class="group_detail_tabs">
<ul>
<li class="selected" onclick="get_group_info('#info',this)">Info</li>
<li onclick="get_group_info('#members',this)">Members</li>
<li onclick="get_group_info('#videos',this)">Videos</li>
</ul>
<div class="clearfix"></div>
</div>
</div>
<div class="group_details">
<div id="group_info_cont">
<!-- Group Information-->
<div id="info" class="grp_info">
<div class="info_cont">
<div class="info_title"><span onclick="$('#basic_info').slideToggle()">Basic Info</span></div>
<div id="basic_info">
<span><span>Group Name </span> <span>{$group.group_name}</span></span>
<div class="clearfix"></div>
{assign var=owner value=$userquery->get_user_details($group.userid)}
<span><span>Group Owner </span> <span><a href="{$userquery->profile_link($owner)}">{$owner.username}</a></span></span>
<div class="clearfix"></div>
<span><span>Total Members </span> <span>{$group.total_members|number_format}</span></span>
<div class="clearfix"></div>
<span><span>Total Videos </span> <span>{$group.total_videos|number_format}</span></span>
<div class="clearfix"></div>
<span><span>Total Topics </span> <span>{$group.total_topics|number_format}</span></span>
<div class="clearfix"></div>
<span><span>Views </span> <span>{$group.total_views|number_format}</span></span>
<div class="clearfix"></div>
<span><span>Group Url </span> <span>
<input type="text" value="{group_link details=$group}" class="grp_url" onclick="this.select()"/></span></span>
<div class="clearfix"></div>
</div>
</div>
<div class="info_cont">
<div class="info_title"><span onclick="$('#more_details').slideToggle()">More Details</span></div>
<div id="more_details" style="display:none">
<span><span>Description </span> <span>{$group.group_description}</span></span>
<div class="clearfix"></div>
<span><span>Tags </span> <span>{$group.group_tags|tags:group}</span></span>
<div class="clearfix"></div>
<span><span>Category </span> <span>{$group.category|categories:group}</span></span>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- Group Information-->
<!-- Group members-->
<div id="members" class="grp_info" style="display:none">
{assign var=members value=$cbgroup->get_members($group.group_id)}
{foreach from=$members item=member}
{include file="$style_dir/blocks/user.html" user=$member block_type='medium'}
{/foreach}
<div class="clearfix"></div>
<div align="right"><a href="{group_link details=$group type='view_members'}">View All Members</a></div>
</div>
<!-- Group members-->
<!-- Group videos-->
<div id="videos" class="grp_info" style="display:none">
{assign var=gpvids value=$cbgroup->get_group_videos($group.group_id,'yes',6)}
{foreach from=$gpvids item=video}
{include file="$style_dir/blocks/video.html" video=$video}
{/foreach}
<div class="clearfix"></div>
<div align="right"><a href="{group_link details=$group type='view_videos'}">View All Videos</a></div>
</div>
<!-- Group videos-->
</div>
</div>
</div>
<!-- Group Right Column Ends-->
<div class="clearfix"></div>
</div>
<!-- GROUP HEADER ENDS HERE -->

View file

@ -0,0 +1,41 @@
<!-- Getting list of topics -->
{if !$topics}
{assign var=topics value=$cbgroup->get_group_topics($group.group_id)}
{/if}
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="topic_table_head">
<tr>
<td width="40" align="left">&nbsp;</td>
<td align="left">Topic Title</td>
<td width="150" align="left">Views</td>
<td width="100" align="left">Replies</td>
<td width="100" align="left">Last Reply</td>
</tr>
</table>
{if $topics}
{foreach from=$topics item=topic}
{assign var=poster value=$userquery->get_user_details($topic.userid)}
{if $topic.last_poster}
{assign var=last_poster value=$userquery->get_user_details($topic.last_poster)}
{else}
{assign var=last_poster value=''}
{/if}
<div class="topic_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="40" align="left"><img src="{$cbgroup->get_topic_icon($topic)}" /></td>
<td align="left"><span class="topic_title"><a href="{$cbgroup->topic_link($topic)}">{$topic.topic_title}</a></span>by <a href="{$userquery->profile_link($poster)}">{$poster.username}</a> 4 days ago</td>
<td width="150" align="left">{$topic.total_views|number_format}</td>
<td width="100" align="left">{$topic.total_replies|number_format}</td>
<td width="100" align="left">{if $last_poster}{$topic.last_post_time|niceTime}<br />
by <a href="{$userquery->profile_link($last_poster)}">{$last_poster.username}</a>{else}Never{/if}</td>
</tr>
</table>
</div>
{/foreach}
{else}
<div align="center"><em><strong>No Topics</strong></em></div>
{/if}

View file

@ -0,0 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,38 @@
{if $control =='full'}
<div class="account_vid_list" style="background-color:#{$bg}">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="check_gid[]" id="check_gid-{$group.group_id}" value="{$group.group_id}" />
<label for="checkbox"></label></td>
<td valign="middle">
<div style="padding-left:10px; float:left;width:290px">
<img src="{$cbgroup->get_group_thumb($group,small)}" width="40" height="30" border="0" class="acc_usr_video_thumb" />{$group.group_name|truncate:100}<br />
<span class="video_control"><a href="{group_link details=$group}">view</a> - <a href="{$baseurl}/edit_group.php?gid={$group.group_id}">edit</a>- <a href="{$baseurl}/manage_groups.php?mode=manage_members&gid={$group.group_id}">manage</a> - <a href="javascript:void(0)" onmousedown="delete_item('delete_icon_a','{$group.group_id}','Are you sure you want to remove this group ?','?mode=manage&amp;gid_delete={$group.group_id}')" id="delete_icon_a-{$group.group_id}">delete</a></span>
<div class="clearfix"></div></div></td>
<td width="100">{$group.date_added|date_format}</td>
<td width="100">{$group.total_members|number_format}</td>
<td width="100">{$group.total_topics|number_format}</td>
<td width="100" class="last_td">{$group.active}</td>
</tr>
</table>
</div>
{/if}
{if $control =='basic'}
<div class="account_vid_list" style="background-color:#{$bg}">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="check_gid[]" id="check_gid-{$group.group_id}" value="{$group.group_id}" />
<label for="checkbox"></label></td>
<td valign="middle">
<div style="padding-left:10px; float:left;width:290px">
<img src="{$cbgroup->get_group_thumb($group,small)}" width="40" height="30" border="0" class="acc_usr_video_thumb" />{$group.group_name|truncate:100}<br />
<span class="video_control"><a href="{group_link details=$group}">view</a></span>
<div class="clearfix"></div></div></td>
<td width="100">{$group.date_added|date_format}</td>
<td width="100">{$group.total_members|number_format}</td>
<td width="100">{$group.total_topics|number_format}</td>
</tr>
</table>
</div>
{/if}

View file

@ -0,0 +1,13 @@
<div class="manage_contacts_tbl">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"><input type="checkbox" name="users[]" id="check_userd-{$user.userid}" value="{$user.userid}" /></td>
<td width="50" height="50" align="center" valign="middle"><a href="{$userquery->profile_link($user)}"><img src="{$userquery->getUserThumb($user)}" alt="{$user.username}" width="40" height="40" border="0"></a></td>
<td><a href="{$userquery->profile_link($user)}">{$user.username}</a></td>
<td width="100">{$user.profile_hits|number_format}</td>
<td width="100">{$status}
</td>
<td width="50" align="center" valign="middle">{if $del_link}<a href="{$del_link}"><img src="{$imageurl}/cancel.png" width="16" height="16" border="0" /></a>{/if}</td>
</tr>
</table>
</div>

View file

@ -14,8 +14,8 @@
</td>
<td width="100">{$video.date_added|date_format}</td>
<td width="100">{$video.views|number_format}</td>
<td width="100">{$video.comments_count|number_format}</td>
<td width="100" class="last_td">{$video.status}</td>
<td width="100" class="last_td">{$video.comments_count|number_format}</td>
</tr>
</table>
</div>
@ -28,7 +28,7 @@
<td width="25"><input type="checkbox" name="check_vid[]" id="check_vid-{$video.videoid}" value="{$video.videoid}" />
<label for="checkbox"></label></td>
<td valign="middle">
<div style="padding-left:10px; float:left;width:300px">
<div style="padding-left:10px; float:left;width:290px">
<img src="{getThumb vdetails=$video}" width="40" height="30" border="0" class="acc_usr_video_thumb" />{$video.title|truncate:100}<br />
<span class="video_control"><a href="{videoLink vdetails=$video}">view</a> - <a href="{$baseurl}/edit_video.php?vid={$video.videoid}">edit</a> - <a href="javascript:void(0)" onmousedown="delete_video('delete_icon_a','{$video.videoid}','{lang code="confirm_del_video"}','?mode=uploaded&amp;vid_delete={$video.videoid}')" id="delete_icon_a-{$video.videoid}">delete</a></span>
<div class="clearfix"></div></div>
@ -64,4 +64,24 @@
</tr>
</table>
</div>
{/if}
{if $control=='basic'}
<div class="account_vid_list" style="background-color:#{$bg}">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="check_vid[]" id="check_vid-{$video.videoid}" value="{$video.videoid}" />
<label for="checkbox"></label></td>
<td valign="middle">
<div style="padding-left:10px; float:left;width:300px">
<a href="{videoLink vdetails=$video}"><img src="{getThumb vdetails=$video}" width="40" height="30" border="0" class="acc_usr_video_thumb" />{$video.title|truncate:100}</a><br />
<div class="clearfix"></div></div></td>
<td width="100">{$video.date_added|date_format}</td>
<td width="100">{$video.views|number_format}</td>
<td width="100">{$video.comments_count|number_format}</td>
</tr>
</table>
</div>
{/if}

View file

@ -0,0 +1,13 @@
<div class="grp_manage_links">
<ul>
<li><a href="{$baseurl}/edit_group.php?url={$group.group_id}">Edit Group</a></li>
<li><a href="{group_link details=$group}">View Group</a></li>
<li><a href="{$baseurl}/manage_groups.php?mode=manage_members&gid={$group.group_id}">
Manage members</a></li>
<li><a href="{$baseurl}/manage_groups.php?mode=manage_videos&gid={$group.group_id}">Manage videos</a></li>
<li><a href="javascript:void(0)" onClick="
if (confirm('Are you sure you want to delete this group?'))
document.location = '{$baseurl}/manage_groups.php??mode=delete&gid={$group.group_id}';">Delete Group</a></li>
</ul>
<div class="clearfix"></div>
</div>

View file

@ -81,4 +81,6 @@
</div>
</div>
{/if}
{/if}
<div class="clearfix" style="height:10px"></div>

View file

@ -14,4 +14,12 @@ Last active : {$user.last_active|nicetime} </div>
<div><a href="{$userquery->profile_link($user)}">{$user.username}</a></div>
<a href="{$userquery->profile_link($user)}"><img src="{$userquery->getuserthumb($user)}" border="0" class="user_mid_thumb"></a>
</div>
{/if}
{if $block_type =='medium'}
<div class="user_block_med" id="user-{$user.userid}">
<div class="thumb_container_medium" ><a href="{$userquery->profile_link($user)}"><img src="{$userquery->getuserthumb($user)}" border="0" class="user_thumb_medium"></a>
</div>
<div class="prof_title"><a href="{$userquery->profile_link($user)}">{$user.username}</a></div>
{$user.total_videos|number_format} videos {$user.profile_hits|number_format} views</div>
{/if}

View file

@ -1,7 +1,12 @@
{if $cur_class==''}
{assign var=cur_class value=$smarty.cookies.current_style}
{/if}
<!-- Video Box -->
{if $display_type =='normal' || $display_type==''}
<div class="vertical">
<div class="{if $cur_class}{$cur_class}{else}vertical{/if}">
<div class="the_vid_container">
<div class="video_thumb">
<a href="{videoLink vdetails=$video}"><img src="{getThumb vdetails=$video}" width="110" height="66" border="0" {ANCHOR place="video_thumb"} /></a>
<div class="duration">{$video.duration|SetTime}</div>
@ -16,19 +21,33 @@
</div> <!--LVL1 END-->
<div class="lvl2 clearfix">
<div class="desc">{$video.description}</div>
<div class="desc">{$video.description|description|truncate:100}</div>
<div class="length">Time: <span>{$video.duration|SetTime:false}</span></div>
</div> <!--LVL2 END-->
<div class="lvl3 clearfix">
<div class="views"><span>{$video.views}</span> view(<strong>s</strong>)</div>
<div class="comments"><a href="#"><img src="{$imageurl}/dot.gif" width="16" height="12" class="com_img" /> {$video.comments_count} Comment(<strong>s</strong>)</a></div>
</div> <!--LVL3 END-->
<div class="lvl4 clearfix">
<div class="uploaded"><a href="{$userquery->profile_link($video.userid)}">{$userquery->get_user_field_only($video.userid,'username')}</a></div>
<div class="uploaded">
<a href="{$userquery->profile_link($video.userid)}">{$userquery->get_user_field_only($video.userid,'username')}</a>
</div>
</div> <!--LVL4 END-->
</div> <!--DETAILS_BLOCK END-->
<!--LVL5 -->
<div class="lvl5">
<div class="uploaded">uploaded by <a href="{$userquery->profile_link($video.userid)}">{$userquery->get_user_field_only($video.userid,'username')}</a> {$video.date_added|niceTime}
</div>
<div class="comments"><span>{$video.comments_count}</span> Comment(<strong>s</strong>)</div>
<div class="clearfix"></div>
</div><!--LVL5 END-->
</div> <!--DETAILS_BLOCK END-->
<div class="clearfix"></div>
</div>
</div>
{if $only_once}
@ -94,4 +113,62 @@
<div class="vid_sp"></div>
</div>
{/if}
{if $display_type=='add_type'}
<div class="vertical">
<div class="the_vid_container">
<div class="video_thumb">
<label for="check_video_{$video.videoid}"><img src="{getThumb vdetails=$video}" width="110" height="66" border="0" /></label>
{if $check_type=='array'}
<input type="checkbox" name="check_video[]" id="check_video_{$video.videoid}" style="position:absolute; bottom:0px; left:0px" {if $check_this} checked="checked"{/if} value="{$video.videoid}" />
{else}
<input type="checkbox" name="check_video_{$video.videoid}" id="check_video_{$video.videoid}" style="position:absolute; bottom:0px; left:0px" {if $check_this} checked="checked"{/if} value="yes" />
{/if}
<div class="duration">{$video.duration|SetTime}</div>
</div> <!--VIDEO_THUMB END-->
<div class="details_block">
<div class="lvl1 clearfix">
<div class="title"><a href="{videoLink vdetails=$video}">{$video.title|truncate:30}</a></div>
{show_rating class='rating' rating=$video.rating ratings=$video.rated_by total='10'}
</div> <!--LVL1 END-->
<div class="lvl2 clearfix">
<div class="desc">{$video.description|description|truncate:100}</div>
<div class="length">Time: <span>{$video.duration|SetTime:false}</span></div>
</div> <!--LVL2 END-->
<div class="lvl3 clearfix">
<div class="views"><span>{$video.views}</span> view(<strong>s</strong>)</div>
</div> <!--LVL3 END-->
<div class="lvl4 clearfix">
<div class="uploaded">
<a href="{$userquery->profile_link($video.userid)}">{$userquery->get_user_field_only($video.userid,'username')}</a>
</div>
</div> <!--LVL4 END-->
<!--LVL5 -->
<div class="lvl5">
<div class="uploaded">uploaded by <a href="{$userquery->profile_link($video.userid)}">{$userquery->get_user_field_only($video.userid,'username')}</a> {$video.date_added|niceTime}
</div>
<div class="comments"><span>{$video.comments_count}</span> Comment(<strong>s</strong>)</div>
<div class="clearfix"></div>
</div><!--LVL5 END-->
</div> <!--DETAILS_BLOCK END-->
<div class="clearfix"></div>
</div>
</div>
{if $only_once}
<div class="clearfix"></div>
{/if}
{/if}

View file

@ -0,0 +1,52 @@
{assign var='requiredFields' value=$cbgroup->load_required_fields()}
{assign var='optionFields' value=$cbgroup->load_other_fields()}
{assign var='customFields' value=$cbgroup->custom_group_fields}
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="header1">{$LANG.grp_crt_grp}</td>
</tr>
<tr>
<td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="66%" valign="top"><form name="form1" method="post" action="">
<table width="90%" border="0" cellspacing="0" cellpadding="5">
{foreach from=$requiredFields item=field}
<tr>
<td width="117" align="right" valign="top" class="header3">{$field.title}* :</td>
<td class="tips">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}
{foreach from=$customFields item=field}
<tr>
<td width="117" align="right" valign="top" class="header3">{$field.title}* :</td>
<td class="tips">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}{foreach from=$optionFields item=field}
<tr>
<td width="117" align="right" valign="top" class="header3">{$field.title}* :</td>
<td class="tips">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}
<tr>
<td align="right" valign="top" class="header2">&nbsp;</td>
<td><label>
<input type="submit" name="create_group" value="{$LANG.grp_crt_grp}" id="button">
</label></td>
</tr>
</table>
</form>
</td>
<td width="34%" align="center" valign="top">{$ads.ad_336x280}</td>
</tr>
</table></td>
</tr>
</table>

View file

@ -0,0 +1,91 @@
<div>
{include file="$style_dir/blocks/manage/account_left.html"}
<div class="account_box">
{include file="$style_dir/blocks/manage/account_head.html" user=$user}
<!-- EDITING {$v.title} -->
<h2>Edit Group</h2>
{* Loading Form Fields *}
{assign var='requiredFields' value=$cbgroup->load_required_fields($group,true)}
{assign var='optionFields' value=$cbgroup->load_other_fields($group)}
<div class="account_form">
<form method="post" enctype="multipart/form-data" name="edit_video">
{* GETTING THUMBS INFO *}
<fieldset class="fieldset">
<legend>Thumbs</legend>
<div style="width:140px; float:left" align="center">
<img src="{$cbgroup->get_group_thumb($group)}" border="1" style="margin:4px;max-height:120px; max-width:120px;" />
</div>
<div style="width:500px; float:left">
<li>{$LANG.grp_must_be} JPG | GIF | PNG</li>
<li>{$LANG.grp_90x90}</li>
<li>{$LANG.grp_thumb_warn}</li>
<input type="file" name="thumb_file" id="thumb_file" />
</div>
<div class="clearfix"></div>
</fieldset>
{* GROUP THUMBS ENDS *}
{* Group Information Starts *}
<fieldset class="fieldset">
<legend>Video Information - All fields are required</legend>
{foreach from=$requiredFields item=field}
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="{$field.id}">{$field.title}</label></strong></div>
<div class="account_field">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</div>
<div class="clearfix"></div>
</div>
{/foreach}
</fieldset>
{* Group Information Ends *}
{* Others Information Starts *}
<fieldset class="fieldset">
<legend>Sharing Options</legend>
{foreach from=$optionFields item=field}
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="{$field.id}">{$field.title}</label></strong></div>
<div class="account_field">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</div>
<div class="clearfix"></div>
</div>
{/foreach}
</fieldset>
{* Others Information Ends *}
<div align="right"><button name="update_group" id="button" value="submit" class="cb_button">Update Group</button></div>
</form>
</div>
<!-- ENDING EDITING {$v.title} -->
</div>
<div class="clearfix"></div>
</div>

View file

@ -0,0 +1,63 @@
<div style="width:900px; margin:auto">
{if $mode=='' || $mode=='reset_pass' }
<div class="simple_container">
<h2>{lang code='user_forgot_message'}<span class="h2_inner_link"> &#8212; <a href="{$baseurl}/forgot.php?mode=recover_username">Click here to recover username</a></span></h2>
<hr align="center" width="100%" size="1" noshade="noshade" />
<div style="margin-bottom:10px">{lang code=user_pass_forgot_msg'}</div>
<form action="" method="post" name="Actvation Code" id="Actvation Code" class="cbform">
<label for="forgot_username" class="label">{lang code='username'}</label>
<input type="text" name="forgot_username" id="forgot_username" /><br />
<div class="clearfix"></div>
{assign var=captcha value=func->get_captcha()}
{if $captcha}
{if $captcha.show_field}
<label class="label" for="verification_code">Verification Code</label>
{load_captcha captcha=$captcha load=field field_params = ' id="verification_code" '}
{/if}
<div class="clearfix"></div>
<label class="label">&nbsp;</label>
<div style="display:block; float:left; margin-bottom:10px">
{load_captcha captcha=$captcha load=function}
</div>
{/if}
<div class="clearfix"></div>
<label class="label">&nbsp;</label>
<input name="reset" type="submit" class="cb_button_2" id="reset" value="{lang code='user_reset'}" />
</form>
</div>
{/if}
{if $mode=='recover_username'}
<!-- Forgot Username --->
<div class="simple_container">
<h2>{lang code='user_reocover_user'}<span class="h2_inner_link"> &#8212; <a href="{$baseurl}/forgot.php?mode=reset_pass">Click here to reset password</a></span></h2>
<form action="" method="post" name="Actvation Code" id="Actvation Code" class="cbform">
<label for="forgot_email" class="label">{lang code='<span class="tips">email</span>'}</label>
<input type="text" name="forgot_email" id="forgot_email" /><br />
<div class="clearfix"></div>
{assign var=captcha value=func->get_captcha()}
{if $captcha}
{if $captcha.show_field}
<label class="label" for="verification_code">Verification Code</label>
{load_captcha captcha=$captcha load=field field_params = ' id="verification_code" '}
{/if}
<div class="clearfix"></div>
<label class="label">&nbsp;</label>
<div style="display:block; float:left; margin-bottom:10px">
{load_captcha captcha=$captcha load=function}
</div>
{/if}
<div class="clearfix"></div>
<label class="label">&nbsp;</label>
<input name="recover_username" type="submit" class="cb_button_2" id="recover_username" value="{lang code='user_recover'}" />
</form>
</div>
{/if}
</div>

View file

@ -5,7 +5,8 @@
<!-- ClipBucket v2 -->
<meta name="copyright" content="ClipBucket - PHPBucket ClipBucket 2007 - {$smarty.now|date_format:"%Y"}" />
<meta name="author" content="Arslan Hassan - http://clip-bucket.com/Arslan-Hassan" />
<link rel="shortcut icon" href="{$baseurl}/favicon.ico">
<link rel="icon" type="image/ico" href="{$baseurl}/favicon.ico">
<meta name="keywords" content="{$meta_keywords}" />
<meta name="description" content="{$meta_description}" />
<meta name="distribution" content="global" />
@ -15,7 +16,12 @@
<link href="{$theme}/main.css" rel="stylesheet" type="text/css" />
<!-- Setting Template Variables -->
{php}
if(!$_COOKIE['current_style'])
$_COOKIE['current_style'] = 'vertical';
{/php}
<!-- Setting Template Variables -->
<script language="javascript">
@ -175,6 +181,7 @@ $(document).ready(function() {
$('#grid').click(
function() {
$('.horizantal').removeClass('horizantal').addClass('vertical');
$.cookie("current_style","vertical")
$('.vid_sp').hide();
}
);
@ -182,6 +189,7 @@ $(document).ready(function() {
$('#list').click(
function() {
$('.vertical').removeClass('vertical').addClass('horizantal');
$.cookie("current_style","horizantal")
$('.vid_sp').show();
}
);

View file

@ -0,0 +1,53 @@
<!-- Listing Categories -->
{include file="$style_dir/blocks/category_list.html" type='groups'}
<!-- Listing Categories End -->
<div style="width:620px; float:left" class="vid_page_conainer" >
<div class="sort_cont">
<ul>
<li>Sort :</li>
{assign var=sorting_links value=func->sorting_links()}
{foreach from=$sorting_links item=name key=sort}
<li {if $smarty.get.sort==$sort} class="selected"{/if}><a href="{link name=sort sort=$sort type=groups}" >{$name}</a></li>
{/foreach}
</ul>
<div class="clearfix"></div>
</div>
<div class="time_cont">
{assign var=time_links value=func->time_links()}
{foreach from=$time_links item=name key=sort name=times}
<a href="{link name=time sort=$sort type=groups}" {if $smarty.get.time==$sort } class="selected"{/if}>{$name}</a> {if !$smarty.foreach.times.last}|{/if}
{/foreach}
</div>
{section name=glist loop=$groups}
{assign var=owner value=$userquery->get_user_details($groups[glist].userid)}
<div class="group_block">
<a href="{group_link details=$groups[glist]}"><img src="{$cbgroup->get_group_thumb($groups[glist])}" class="group_thumb" /></a>
<span class="group_name"><strong><a href="{group_link details=$groups[glist]}">{$groups[glist].group_name}</a></strong></span>
<span> views : <strong>{$groups[glist].total_views|number_format}</strong></span>
<span>total members :<strong>{$groups[glist].total_views|number_format}</strong></span>
<span>total videos : <strong>{$groups[glist].total_videos|number_format}</strong></span>
<span>discussions : <strong>{$groups[glist].total_members|number_format}</strong></span>
<span>owner : <strong><a href="{$userquery->profile_link($owner)}">{$owner.username}</a></strong></span>
</div>
{/section}
</div>
<div class="vert_add_box">
<div style="width:160px; margin:auto; margin-top:5px">
{AD place='ad_160x600'}
</div>
</div>
<div class="clearfix" style="margin-bottom:10px"></div>
{include file="$style_dir/blocks/pagination.html"}

View file

@ -20,7 +20,7 @@
<div style="width:40px; height:40px; background:#EEE; margin:0px; padding:0px;"><img src="{$userquery->getUserThumb($udetails,'small')}" class="mid_user_thumb" /></div>
</div>
<div class="txt">Hello {$userquery->username} | <a href="{link name='logout'}">Logout</a></div>
<div class="links"><a href="#">Inbox ({$cbpm->get_new_messages()})</a> | <a href="#">Messages ({$cbpm->get_new_messages('','notification')})</a> | <a href="{link name='my_account'}">Account</a> | <a href="#">Videos</a></div>
<div class="links"><a href="{link name='inbox'}">Inbox ({$cbpm->get_new_messages()})</a> | <a href="{link name='notifications'}">Messages ({$cbpm->get_new_messages('','notification')})</a> | <a href="{link name='my_account'}">Account</a> | <a href="{link name='my_videos'}">Videos</a></div>
{/if}
</div> <!--USER_LOGIN CLASS END-->
@ -41,7 +41,12 @@
<li><a href="{$baseurl}" {current_page page='home'}>Home</a></li>
<li><a href="{link name='videos'}" {current_page page='videos'}>Videos</a></li>
<li><a href="{link name='channels'}" {current_page page='channels'}>Channels</a></li>
<li><a href="{link name='groups'}" {current_page page='groups'}>Groups</a></li>
{if !userid()}
<li><a href="{link name='signup'}" {current_page page='signup'}>Signup</a></li>
{else}
<li><a href="{link name='upload'}" {current_page page='upload'}>Upload</a></li>
{/if}
</ul>
</div> <!--TOP_TABS END-->

View file

@ -84,7 +84,7 @@ SetId('Featured');
<div class="box">
<div class="top_bg">
<h2>Top 10 Users</h2>
{get_users assign=topusers limit=10}
{get_users assign=topusers limit=10 order=' total_videos DESC '}
{section name=tusers loop=$topusers}
<div class="top_user">
<div class="user_no">{$smarty.section.tusers.iteration}</div>

View file

@ -0,0 +1,5 @@
{$user.username}, your about to join {$gpDetails.group_name}.
<form name="j_group" action="" id="j_group" method="post">
<input type="submit" name="join_group" value="Join Group" class="button" />
</form>

View file

@ -0,0 +1,56 @@
<div>
{include file="$style_dir/blocks/manage/account_left.html"}
<div class="account_box">
{include file="$style_dir/blocks/manage/account_head.html" user=$user}
<h2>Manage Contacts</h2>
<h3>Friends</h3>
{assign var=friends value=$userquery->get_contacts($user.userid,0)}
{if $friends}
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="manage_contacts_tbl_head">
<tr>
<td width="15"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td width="50">&nbsp;</td>
<td>Username</td>
<td width="100">views</td>
<td width="100">&nbsp;</td>
<td width="50">&nbsp;</td>
</tr>
</table>
{foreach from=$friends item=friend}
{if $user.userid!=$friend.userid}
{assign var=user_detail value=$userquery->get_user_details($friend.userid)}
{else}
{assign var=user_detail value=$userquery->get_user_details($friend.contact_userid)}
{/if}
<div class="manage_contacts_tbl">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"><input type="checkbox" name="friend[]" id="check_userd-{$user_detail.userid}" value="{$user_detail.userid}" /></td>
<td width="50" height="50" align="center" valign="middle"><a href="{$userquery->profile_link($user_detail)}"><img src="{$userquery->getUserThumb($user_detail)}" alt="{$user_detail.username}" width="40" height="40" border="0"></a></td>
<td><a href="{$userquery->profile_link($user_detail)}">{$user_detail.username}</a></td>
<td width="100">{$user_detail.profile_hits|number_format}</td>
<td width="100">{if $friend.contact_userid==userid() && $friend.confirmed!='yes'}
<span class="cb_fb_style_button"><a href="?mode=requests&confirm={$friend.contact_id}">Confirm</a></span>{/if}
{if $friend.userid==userid() && $friend.confirmed!='yes'}
<span class="cb_pending">Pending</span>
{/if}
</td>
<td width="50" align="center" valign="middle"><a href="?mode=delete&userid={$user_detail.userid}"><img src="{$imageurl}/cancel.png" width="16" height="16" border="0" /></a></td>
</tr>
</table>
</div>
{/foreach}
{else}
<div><em><strong>No Contacts</strong></em></div>
{/if}
</div>
</div>

View file

@ -0,0 +1,281 @@
<div>
{include file="$style_dir/blocks/manage/account_left.html"}
<div class="account_box">
{include file="$style_dir/blocks/manage/account_head.html" user=$user}
<!-- Manage Groups -->
{if $mode=='manage'}
<h2>Manage Groups</h2>
<div align="right" style="float:right; display:inline">
<form id="form1" name="form1" method="get" action="">
<input name="query" type="text" class="search_field" id="query" value="{$smarty.get.query|form_val}" />
<input name="input" type="submit" class="search_field_button" value="search"/>
<input name="mode" value="{$mode}" type="hidden" />
</form>
<div class="clearfix"></div>
</div>
<form name="videos_manager" method="post">
<div style="float:left; width:300px">
<img src="{$imageurl}/dot.gif" class="arrow_pointing" style="margin-left:20px; margin-right:10px;" /><input type="submit" name="delete_videos" id="delete_videos" value="Delete" class="small_button" />
</div>
<div class="clearfix"></div>
<div class="account_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
</td>
<td>Title</td>
<td width="100">Date added</td>
<td width="100">Members</td>
<td width="100">Topics</td>
<td width="100" class="last_td">Active</td>
</tr>
</table>
</div>
{assign var='bg' value='fff'}
{section name=ugrps loop=$usr_groups}
{include file="$style_dir/blocks/manage/account_group.html" group=$usr_groups[ugrps] control='full' bg=$bg}
{if $bg=='fff'}
{assign var='bg' value='EFF5F8'}
{else}
{assign var='bg' value='fff'}
{/if}
{sectionelse}
<div align="center" style="padding:5px"><strong><em>You do not have any group</em></strong></div>
{/section}
{include file="$style_dir/blocks/manage/user_account_pagination.html"}
</form>
{/if}
<!-- Manage Groups Ends Here-->
<!-- Manage Joined Groups -->
{if $mode=='joined'}
<h2>Manage Groups</h2>
<form name="videos_manager" method="post">
<div style="float:left; width:300px">
<img src="{$imageurl}/dot.gif" class="arrow_pointing" style="margin-left:20px; margin-right:10px;" /><input type="submit" name="leave_groups" id="delete_videos" value="Leave Groups" class="small_button" />
</div>
<div class="clearfix" style="margin-bottom:10px"></div>
<div class="account_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
</td>
<td>Title</td>
<td width="100">Date added</td>
<td width="100">Members</td>
<td width="100" class="last_td">Topics</td>
</tr>
</table>
</div>
{assign var='bg' value='fff'}
{section name=ugrps loop=$usr_groups}
{include file="$style_dir/blocks/manage/account_group.html" group=$usr_groups[ugrps] control='basic' bg=$bg}
{if $bg=='fff'}
{assign var='bg' value='EFF5F8'}
{else}
{assign var='bg' value='fff'}
{/if}
{sectionelse}
<div align="center" style="padding:5px"><strong><em>You do not have any group</em></strong></div>
{/section}
{include file="$style_dir/blocks/manage/user_account_pagination.html"}
</form>
{/if}
<!-- Manage Groups Ends Here -->
<!-- Manage Group $group.group_name Members-->
{if $mode=='manage_members' && $group}
{include file="$style_dir/blocks/manage/group_manage_links.html"}
<h2>Manage Group Members - {$group.group_name}</h2>
<!-- Getting List of pending memebrs , if any -->
{assign var=grp_pend_mems value=$cbgroup->get_members($group.group_id,"no")}
{if $grp_pend_mems}
<form name="pending_members" id="pending_members" action="" method="post">
<h2>Pending Members({$grp_pend_mems|@count})</h2>
<div style="float:left; width:300px">
<img src="{$imageurl}/dot.gif" class="arrow_pointing" style="margin-left:20px; margin-right:10px;" />
<input type="submit" name="activate_pending" id="activate_pending" value="Approve" class="small_button" />
<input type="submit" name="delete_members" id="delete_members" value="Delete" class="small_button" />
</div>
<div class="clearfix" style="margin-bottom:10px"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="manage_contacts_tbl_head">
<tr>
<td width="15"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td width="50">&nbsp;</td>
<td>Username</td>
<td width="100">views</td>
<td width="100">&nbsp;</td>
<td width="50">&nbsp;</td>
</tr>
</table>
{section name=pmems loop=$grp_pend_mems}
{include file="$style_dir/blocks/manage/account_user.html" user=$grp_pend_mems[pmems] status='pending'}
{/section}
</form>
{/if}
<!-- Ending listing pending members -->
<!-- Listing ALl Active Members -->
{if $gp_mems}
<form name="pending_members" id="pending_members" action="" method="post">
<h2>Active Members ({$gp_mems|@count})</h2>
<div style="float:left; width:300px">
<img src="{$imageurl}/dot.gif" class="arrow_pointing" style="margin-left:20px; margin-right:10px;" />
<input type="submit" name="disapprove_members" id="disapprove_members" value="Disapprove" class="small_button" />
<input type="submit" name="delete_members" id="delete_members" value="Delete" class="small_button" />
</div>
<div class="clearfix" style="margin-bottom:10px"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="manage_contacts_tbl_head">
<tr>
<td width="15"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td width="50">&nbsp;</td>
<td>Username</td>
<td width="100">views</td>
<td width="100">&nbsp;</td>
<td width="50">&nbsp;</td>
</tr>
</table>
{section name=amems loop=$gp_mems}
{include file="$style_dir/blocks/manage/account_user.html" user=$gp_mems[amems] status='active'}
{/section}
</form>
{/if}
<!-- Ending Listing all active members -->
{/if}
<!-- Manage Group $group.group_name Members End -->
<!-- Manage Group $group.group_name Videos -->
{if $mode=='manage_videos' && $group}
{include file="$style_dir/blocks/manage/group_manage_links.html" }
<h2>Manage Group Videos - {$group.group_name}</h2>
<!-- Getting List of pending videos , if any -->
{assign var=grp_pend_videos value=$cbgroup->get_group_videos($group.group_id,"no")}
{if $grp_pend_videos}
<form name="pending_members" id="pending_members" action="" method="post">
<h2>Pending Videos ({$grp_pend_videos|@count})</h2>
<div style="float:left; width:300px">
<img src="{$imageurl}/dot.gif" class="arrow_pointing" style="margin-left:20px; margin-right:10px;" />
<input type="submit" name="activate_videos" id="activate_videos" value="Approve" class="small_button" />
<input type="submit" name="delete_videos" id="delete_videos" value="Delete" class="small_button" />
</div>
<div class="clearfix" style="margin-bottom:10px"></div>
<div class="account_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
</td>
<td>Title</td>
<td width="100">Date added</td>
<td width="100">Views</td>
<td width="100">Comments</td>
</tr>
</table>
</div>
{assign var='bg' value='fff'}
{section name=plist loop=$grp_pend_videos}
{include file="$style_dir/blocks/manage/account_video.html" video=$grp_pend_videos[plist] bg=$bg control="basic" }
{if $bg=='fff'}
{assign var='bg' value='EFF5F8'}
{else}
{assign var='bg' value='fff'}
{/if}
{sectionelse}
<div align="center" style="padding:5px"><strong><em>You do not have any favorite video</em></strong></div>
{/section}
</form>
{/if}
<!-- Ending listing pending videos -->
<!-- Listing ALl Active Members -->
{if $grp_vids}
<form name="pending_members" id="pending_members" action="" method="post">
<h2>Active Videos ({$grp_vids|@count})</h2>
<div style="float:left; width:300px">
<img src="{$imageurl}/dot.gif" class="arrow_pointing" style="margin-left:20px; margin-right:10px;" />
<input type="submit" name="disapprove_videos" id="disapprove_videos" value="Disapprove" class="small_button" />
<input type="submit" name="delete_videos" id="delete_videos" value="Delete" class="small_button" />
</div>
<div class="clearfix" style="margin-bottom:10px"></div>
<div class="account_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
</td>
<td>Title</td>
<td width="100">Date added</td>
<td width="100">Views</td>
<td width="100">Comments</td>
</tr>
</table>
</div>
{assign var='bg' value='fff'}
{section name=plist loop=$grp_vids}
{include file="$style_dir/blocks/manage/account_video.html" video=$grp_vids[plist] bg=$bg control="basic" }
{if $bg=='fff'}
{assign var='bg' value='EFF5F8'}
{else}
{assign var='bg' value='fff'}
{/if}
{sectionelse}
<div align="center" style="padding:5px"><strong><em>You do not have any favorite video</em></strong></div>
{/section}
</form>
{/if}
<!-- Ending Listing all active members -->
{/if}
<!-- Manage Group $group.group_name Videos -->
</div>
</div>

View file

@ -91,8 +91,7 @@
<td>Title</td>
<td width="100">Date added</td>
<td width="100">Views</td>
<td width="100">Comments</td>
<td width="100" class="last_td">Status</td>
<td width="100" class="last_td">Comments</td>
</tr>
</table>
</div>

View file

@ -46,6 +46,5 @@
{/if}
</div>
</div>

View file

@ -68,7 +68,7 @@
{assign var='channel_action_links' value=$userquery->get_channel_action_links($u)}
<ul class="channel_action_links">
{foreach from=$channel_action_links item=link key=link_title}
<li><a href="{$link}">{$link_title}</a></li>
<li><a href="{$link.link}" onClick="{$link.onclick}">{$link_title}</a></li>
{/foreach}
</ul>
</div>

View file

@ -0,0 +1,104 @@
<div class="group_view">
{include file="$style_dir/blocks/group/group_header.html" group=$group}
{if $mode=='' || $mode=='main'}
<div style="margin-top:10px">
<div style="float:left; width:500px"><h2 style="margin:0px; margin:0px">Discussions ({$group.total_topics|number_format})</h2></div>
<div style="float:right; width:250px" align="right">
<span class="add_topic" onclick="$('#add_topic_cont').slideToggle()">
<img src="{$imageurl}/group/add.png" /> ADD NEW TOPIC<span class="clearfix"></span></span>
</div>
<div class="clearfix"></div>
</div>
<div id="add_topic_cont" style="display:none;">
{include file="$style_dir/blocks/group/add_topic.html" group=$group}
</div>
{include file="$style_dir/blocks/group/group_topics.html" group=$group}
{/if}
{if $mode=='invite_group'}
<!-- Inviting Members to Group -->
<h2>Invite Members</h2>
<div style="display:inline; margin:auto">
<div style="width:600px;margin:auto">
{if $friends}
<form name="invite_friends" id="invite_friends" action="" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="manage_contacts_tbl_head">
<tr>
<td width="15"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td width="50">&nbsp;</td>
<td>Username</td>
<td width="100">views</td>
</tr>
</table>
{foreach from=$friends item=friend}
{if userid()!=$friend.userid}
{assign var=user_detail value=$userquery->get_user_details($friend.userid)}
{else}
{assign var=user_detail value=$userquery->get_user_details($friend.contact_userid)}
{/if}
<div class="manage_contacts_tbl">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"><input type="checkbox" name="friend[]" id="check_userd-{$user_detail.userid}" value="{$user_detail.userid}" /></td>
<td width="50" height="50" align="center" valign="middle"><a href="{$userquery->profile_link($user_detail)}"><img src="{$userquery->getUserThumb($user_detail)}" alt="{$user_detail.username}" width="40" height="40" border="0"></a></td>
<td><a href="{$userquery->profile_link($user_detail)}">{$user_detail.username}</a></td>
<td width="100">{$user_detail.profile_hits|number_format}</td>
</tr>
</table>
</div>
{/foreach}
<div align="left" style="margin-top:10px"><input type="submit" name="invite_friends" class="cb_button" value="{lang code='invite'}"></div>
</form>
{else}
No Contact
{/if}
</div>
</div>
<!-- Inviting Members to Group -->
{/if}
{* LISTING VIDEOS *}
{if $mode=='view_videos'}
<!-- Listing Group Videos Only -->
<h2>{$group.group_name} Videos ({$group.total_videos})</h2>
<div id="style_change" style="margin-top:10px">Change Style of Listing
<div id="grid" title="Change To Grid Style"></div>
<div id="list" title="Change to List Style"></div>
</div>
{section name=v_list loop=$videos}
{include file="$style_dir/blocks/video.html" video=$videos[v_list]}
{/section}
<div class="clearfix"></div>
<!-- Listing Group Videos end-->
{/if}
{* LISTING VIDEOS END*}
{* LISTING MEMBERS *}
{if $mode=='view_members'}
<!-- Listing members -->
<h2>{$group.group_name} Members ({$group.total_members})</h2>
{section name=u_list loop=$users}
{include file="$style_dir/blocks/user.html" user=$users[u_list]}
{/section}
<div class="clearfix"></div>
<!-- Listing Members -->
{/if}
{* LISTING MEMBERS END *}
</div>

View file

@ -0,0 +1,21 @@
<div class="group_view">
{include file="$style_dir/blocks/group/group_header.html" group=$group}
{assign var=topic_starter value=$userquery->get_user_details($topic.userid)}
<div class="topic_container">
{include file="$style_dir/blocks/user.html" user=$topic_starter block_type='medium'}
<div class="topic_detail_cont">
<div class="topic_title"><img src="{$cbgroup->get_topic_icon($topic)}" style="float:left" />{$topic.topic_title}<span class="date"> &#8212; {$topic.date_added|niceTime}</span><span class="clearfix"></span></div>
{$topic.topic_post}
</div>
<div class="clearfix"></div>
</div>
<div class="topic_comments">
{include file="$style_dir/blocks/comments/comments.html" id=$topic.topic_id type=t}
</div>
<hr width="100%" size="1" noshade>
{include file="$style_dir/blocks/comments/add_comment.html" id=$topic.topic_id type=t}
</div>

View file

@ -7,7 +7,7 @@ Style name: ClipBucket v2(New)
@import url("view_channel.css");
@import url("rating.css");
body,html { background:url(../images/main_bg.png) repeat-x; background-color:#fff; margin:0px; padding:0px; font-family:Verdana,Tahoma,Arial,sans-serif; color:#555; font-size:12px; }
body,html { background:url(../images/main_bg.png) repeat-x; background-color:#fff; margin:0px; padding:0px; font-family:Verdana,Tahoma,Arial,sans-serif; color:#333; font-size:11px; }
/* CLEARS */
.clearfix { }
@ -159,31 +159,39 @@ span.remember { font-size:10px; }
#grid:hover,#list:hover { cursor:pointer; border:1px solid #aaa; }
/* HORIZATAL LISTING STYLE */
.horizantal { margin:0px; padding:0px; clear:both; }
.horizantal .details_block { float:right; width:79%; }
.horizantal .lvl1, .horizantal .lvl2, .horizantal .lvl3, .horizantal .lvl4 { clear:right; margin-top:8px;; }
.horizantal { margin:0px; padding:0px; clear:both;}
.horizantal .details_block { float:right; width:79%; margin-bottom:10px; }
.horizantal .lvl1, .horizantal .lvl2, .horizantal .lvl3, .horizantal .lvl4 { clear:right; }
.horizantal .the_vid_container{border-bottom:#ccc 1px solid; margin-bottom:5px}
.horizantal .lvl1 { margin:0px; padding:0px; }
.horizantal .lvl1 .title { float:left; color:#0099cc; }
.horizantal .lvl1 .rating { float:right; width:50px; }
.horizantal .lvl2 .desc { font-size:11px; width:80%; float:left; }
.horizantal .lvl2 .desc { font-size:11px; width:80%; float:left; margin-bottom:5px}
.horizantal .lvl2 .length { font-size:10px; width:14.5%; float:right; }
.horizantal .lvl2 .length span { font-weight:bold; color:#0099cc; }
.horizantal .lvl3 .views { font-size:10px; float:left; margin-right:30px; }
.horizantal .lvl3 .views { font-size:10px; float:right;}
.horizantal .lvl3 .views span { color:#0099cc; }
.horizantal .lvl3 .comments { font-size:10px; }
.horizantal .lvl3 .comments a,.lvl3 .comments a:visited { text-decoration:none; }
.horizantal .lvl3 .comments a .com_img { border:0px none; vertical-align:sub; background:url(../images/blocks.png) right -86px no-repeat; }
.horizantal .lvl5 .comments { font-size:10px; float:right}
.horizantal .lvl5 .comments span{ color:#0099cc; }
.horizantal .lvl5 .comments a,.lvl3 .comments a:visited { text-decoration:none; }
.horizantal .lvl4 .uploaded { font-size:10px; }
.horizantal .lvl4{ display:none}
.horizantal .lvl5 .uploaded { font-size:11px; float:left}
.vertical a,.horizantal a{text-decoration:none; font-weight:bold}
/* VERTICAL LISTING STYLE */
.vertical { width:118px; margin:0px 6px 10px 0px; padding:0px 0px 10px; float:left; height:150px }
.vertical .details_block { float:none; width:100%; }
.vertical .lvl1, .vertical .lvl2, .vertical .lvl3, .vertical .lvl4 { margin:5px; display:block; }
.vertical .lvl1, .vertical .lvl2, .vertical .lvl3, .vertical .lvl4 { display:block; }
.vertical .lvl1 .title { font-size:11px; }
.vertical .lvl1 .rating { margin-top:5px; width:50px; }
@ -191,9 +199,10 @@ span.remember { font-size:10px; }
.vertical .lvl3 { font-size:10px; }
.vertical .lvl3 .views span { font-weight:lighter; }
.vertical .lvl3 .comments { display:none; }
.vertical .lvl4 { font-size:10px; }
.vertical .lvl5{display:none}
/* SIDEBAR INDEX */
.box { background:#FFF; border:1px solid #b6e2fe; padding:2px; width:300px; margin:0px auto 10px; border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px }
@ -263,11 +272,11 @@ span.remember { font-size:10px; }
.my_account_left{width:180px; float:left; }
.my_account_left ul{margin:0px; padding:0px; display:block;}
.my_account_left li{margin:0px; padding:0px; list-style:none; display:block; margin:5px; margin-left:0px}
.my_account_left .li{font-size:12px; font-weight:bold; display:block; margin-bottom:10px}.my_account_left .li .heading{ display:block; width:170px; background-image:url(../images/blocks.png); background-position:-0px -160px; background-repeat:no-repeat; height:20px; line-height:20px; padding-left:5px; color:#333}
.my_account_left .li{font-size:12px; font-weight:bold; display:block; margin-bottom:10px}.my_account_left .li .heading{ display:block; width:170px; background-image:url(../images/blocks.png); background-position:-0px -160px; background-repeat:no-repeat; height:20px; line-height:20px; padding-left:5px; color:#333; margin-left:5px; color:#fff}
.my_account_left .li li{font-weight:normal; padding-left:5px; border-left:3px #ccc solid; margin-left:5px}
.my_account_left .li li:hover{border-left:3px #999 solid;}
.my_account_left .li a{display:block; text-decoration:none; font-family:tahoma; font-weight:bold}
.my_account_left .li a:hover{color:#003366}
.my_account_left .li a{display:block; text-decoration:none; font-family:tahoma; font-weight:bold; color:#333}
.my_account_left .li a:hover{color:#0066cc}
.account_box{float:right; width:780px;border-left:5px #999 solid; padding-left:10px; margin-right:10px}
.account_option_box{display:block; width:225px; margin:10px; padding:10px;float:left; background-color:#EFF5F8; border-radius:5px; -moz-border-radius:5px;-webkit-border-radius:5px;}
@ -472,13 +481,16 @@ display:inline-block; width:18px; height:18px; line-height:18px; text-align:cent
.comment{ background:#fff url(../images/watch_video_details_bg.png) repeat-x; background-position:bottom;min-height:60px; padding:5px; border:1px solid #eee; font-family:tahoma; font-size:11pxl; margin-bottom:10px }
.comment .user_com_thumb{ float:inherit; max-width:60px; max-height:80px; border:2px solid #fff}
.comment .user_com_thumb_con{width:65px;float:left;}
.comment .comm_other{float:right; width:585px; margin-right:5px}
.comment .comm_other{float:left; margin-right:5px}
.comment .user_bar{background:url(../images/nav_grads.png) 0px -240px repeat-x; height:18px; line-height:18px; padding:0px 5px 0px 5px}
.comment .user_bar,.comment .user_bar a{color:#fff; font-size:11px; text-decoration:none;}
.comment .comment_cont{float:left; width:515px; padding:3px;}
.comment .comment_rating_cont{ float:right; width:60px; margin-top:10px}
.comment .comment_rating_cont .comment_rating{font-size:16px; font-weight:bold;font-family:arial; text-align:center; display:block}
.comment .thumb_down{background:url(../images/icons.png) ; width:24px; height:25px; display:inline-block; text-indent:-50000px; margin-right:5px; cursor:pointer}
.topic_comments .comment .comment_cont{ width:820px}
.comment .thumb_up{background:url(../images/icons.png) -24px 0px; width:24px; height:25px; display:inline-block; text-indent:-50000px;cursor:pointer}
.desc_cont{}
.upper_quote{background-image:url(../images/icons.png); background-position:0px -125px; height:32px; width:34px; display:inline-block; }
@ -501,8 +513,8 @@ display:inline-block; width:18px; height:18px; line-height:18px; text-align:cent
.watch_video_box .watch_video_box_thumb{border:1px solid #999; padding:2px; display:inline-block; margin:auto; position:relative}
.watch_video_box_thumb .duration{background-color:#333; color:#fff; font-size:8px; padding:1px; position:absolute; right:2px; bottom:2px}
.watch_vids_head,.watch_vids_head_closed{background-image:url(../images/watch_video_bars.png); width:270px; height:26px; background-repeat:no-repeat; display:block; padding-left:30px; line-height:26px; color:#fff; font-size:14px; color:#fff; font-weight:bold; margin-top:10px; cursor:pointer}
.watch_vids_head_closed{ background-position:0px -26px; color:#0099cc}
.watch_vids_head,.watch_vids_head_closed{background-image:url(../images/watch_video_bars.png); width:270px; height:26px; background-repeat:no-repeat; display:block; padding-left:30px; line-height:26px; color:#fff; font-size:14px; color:#fff; font-weight:bold; margin-top:10px; cursor:pointer;background-position:0px -26px;}
.watch_vids_head_closed{ background-position:0px -0px; color:#0099cc}
.watch_vids_cont{width:300px; overflow:hidden; padding-bottom:10px; margin-bottom:10px; border-bottom:1px solid #CCC; padding-top:10px}
@ -569,8 +581,10 @@ display:inline-block; width:18px; height:18px; line-height:18px; text-align:cent
* Channel and user
*/
.user_block{ display:block; width:120px; height:180px; float:left; margin:10px; font-size:10px}
.user_block .thumb_container{ width:120px; height:120px; overflow:hidden; border:1px solid #99ccff; padding:1px; display:inline-table; vertical-align:middle}
.user_block_med{display:block; width:80px; height:130px; float:left; margin:0px 10px 10px 0px; font-size:10px}
.user_block .thumb_container,.user_block_med .thumb_container_medium{ width:120px; height:120px; overflow:hidden; border:1px solid #99ccff; padding:1px; display:inline-table; vertical-align:middle}.user_block_med .thumb_container_medium{width:80px; height:80px}
.user_thumb_normal{width:120px; height:120px}
.user_thumb_medium{width:80px; height:80px}
.prof_title a{font-weight:bold; text-decoration:none}
@ -597,4 +611,107 @@ display:inline-block; width:18px; height:18px; line-height:18px; text-align:cent
.cbform .label{width:150px; float:left; display:block; text-align:right; margin-right:10px}
.cbform input[type=textfield],.cbform input[type=text]{border:1px solid #999; margin:0px; width:200px; float:left; margin-bottom:6px; height:23px; line-height:23px; padding-top:0px; padding-bottom:0px;}
.h2_inner_link,.h2_inner_link a{font-size:13px; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; text-decoration:none; color:#0099cc}
.h2_inner_link,.h2_inner_link a{font-size:13px; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; text-decoration:none; color:#0099cc}
/**
* Groups CSS
*/
.group_view{width:980px; margin:auto;}
.group_top_cont{background:#FFF url(../images/simple_gradient.png) repeat-x bottom; border:1px solid #f0f0f0; padding:5px;border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;}
.grp_left_column{float:left; width:150px; padding-right:10px}
.grp_right_column{float:right; width:800px;}
.group_thumb_cont{ margin:auto}
.group_thumb_cont img{border:#99ccff 2px solid;}
.group_title{display:block; background-color:#333; color:#fff;border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; padding:5px; font-size:14px; font-weight:bold; font-family:tahoma; margin-bottom:10px; padding-bottom:0px}
.group_details{}
.group_option_container{}
.group_option_container ul{margin:0px; padding:0px}
.group_option_container .grp_opt_title{background-color:#0066cc; color:#fff; display:block; padding:4px; margin-top:5px}
.group_option_container ul li{list-style:none;}
.group_detail_tabs{}
.group_detail_tabs ul{padding:0px; margin:10px 0px 0px 0px;}
.group_detail_tabs ul li{float:left; display:inline-block; padding:2px 5px; list-style:none; text-align:center; margin:0px 5px; border-bottom:none; cursor:pointer; font-size:16px; font-weight:bold; font-family:Arial, Helvetica, sans-serif}
.group_detail_tabs ul .selected{color:#09c; background:#fff}
.grp_info .info_cont{margin-bottom:10px}
.grp_info .info_title{border-bottom:1px solid #abc0c7; height:10px; margin-bottom:10px}
.grp_info .info_title span{line-height:20px; font-family:Tahoma; color:#333; font-weight:bold; background-color:#FFF; padding-right:8px; display:inline}
.info_cont span{display:block; margin-bottom:5px; cursor:pointer}
.info_cont span:hover{color:#06c}
.info_cont span span:first-child{width:100px; float:left; color:#666}
.info_cont span span:last-child{width:500px; float:left; color:#333}
.info_cont span .grp_url{border:1px solid #999; padding:0px; color:#999; width:300px}
.group_info span{display:block}
.topic_table_head{background:#FFF url(../images/simple_gradient.png) repeat-x bottom; border:1px solid #f0f0f0; font-weight:bold}
.topic_table td, .topic_table_head td{padding:4px 2px; color:#333; font-family:Tahoma;}
.topic_table:nth-child(2n+1){background-color:#f7f7f7}
.topic_title{font-weight:bold; display:block}
.topic_title a{font-weight:bold; display:block; color:#333; text-decoration:none}
.topic_title a:hover{color:#06c}
.add_topic{padding:5px; height:18px; line-height:16px; display:inline-block; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; background-color:#E6F0FF; margin-bottom:5px; cursor:pointer;font-weight:bold;}
.add_topic:hover{color:#06c}
.add_topic img{display:inline; float:left; margin-right:5px 0px; }
.add_topic_container{width:700px; margin:auto;background:#FFF url(../images/simple_gradient.png) repeat-x bottom; border:1px solid #f0f0f0; padding:5px; margin-bottom:10px}
.topic_form .label{ display:block; font-size:12px; font-weight:bold; font-family:tahoma}
.topic_form input[type=text],.topic_form textarea,.topic_form input[type=select]{width:600px; border:1px solid #999; padding:3px; margin-bottom:10px}
.topic_icon_cont{width:600px; padding:3px}
.topic_icon_cont fieldset{margin:0px; border:1px solid #999;border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;}
.topic_icon_cont label{display:block; width:70px; text-align:center; float:left; margin-bottom:5px}
.topic_container{margin-top:10px}
.topic_detail_cont{float:right; width:890px}
.topic_detail_cont .topic_title{font-size:14px; font-weight:bold; line-height:32px; border-bottom:1px solid #dedcdc}
.topic_detail_cont .topic_title img{ margin-right:10px}
.topic_detail_cont .topic_title .date{font-size:11px; font-weight:normal; color:#999}
.topic_post{ border-bottom:1px dashed #b9b9b9 ; padding-bottom:5px; margin-bottom:5px}
.topic_post .topic_post_user{float:left; width:75px}
.topic_post .topic_post_cont{float:left}
.topic_post:last-child{border-bottom:none}
.topic_post .topic_poster{display:block; color:#999}
.topic_post .topic_poster a{font-weight:bold; font-family:tahoma; text-decoration:none}
.manage_contacts_tbl_head{border:1px solid #c2c2c2; border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px; background-image:url(../images/gradients.png); background-position:0px -36px; height:19px}
.manage_contacts_tbl{border-bottom:1px solid #999;}
.manage_contacts_tbl:nth-child(2n+1){background-color:#F5F5F5}
.manage_contacts_tbl_head td{ padding-left:3px; font-weight:bold}
.manage_contacts_tbl_head td:nth-child(2),.manage_contacts_tbl_head td:nth-child(3){border-right:1px solid #c2c2c2;}
.manage_contacts_tbl_head td:last-child{border-right:none}
.manage_contacts_tbl td{padding-left:3px; }
.grp_manage_links li, .cb_fb_style_button{background:url(../images/nav_grads.png) -0px -223px repeat-x; height:18px; line-height:18px; display:inline-block; padding:0px 5px; border:1px solid #999}
.grp_manage_links li a,.cb_fb_style_button,.cb_fb_style_button a{ color:#333;font-weight:bold; font-family:tahoma; font-size:11px; text-decoration:none}
.cb_pending{color:#333; font-style:italic; }
.grp_manage_links li{border-right:none}
.grp_manage_links li:last-child{border-right:1px solid #999}
.grp_manage_links ul{display:inline-block; float:right; padding:0px; margin:0x;}
.grp_manage_links li{float:left;}
/**
* Groups Block
*/
.group_block{float:left; width:45%; height:80px; margin:0px 20px 10px 0px; padding:5px}
.group_block:hover{background-color:#EEE}
.group_block:nth-child(2n){margin-right:0px; margin-left:15px}
.group_block .group_thumb{width:110px; height:80px; border:1px solid #333; padding:1px; display:block; float:left; margin-right:10px}
.group_block,.group_block a{font-size:10px; font-family:tahoma }
.group_block span{display:block;}
.group_block .group_name,.group_block .group_name a{font-size:12px; text-decoration:none}

View file

@ -26,7 +26,7 @@
<td width="136" rowspan="4" align="center" valign="middle">
<div id="VDOthumb02">
<a href="{$view_group_link}{$groups[g_list].group_url}">
<img src="{$groups->getThumb($groups[g_list].group_thumb)}" width="120" height="90" border="0" align="left" /></a>
<img src="{$cbgroup->getThumb($groups[g_list].group_thumb)}" width="120" height="90" border="0" align="left" /></a>
<div id="icon_play01"></div>
</div></td>
<td colspan="2" class="header3"><label>

83
upload/video_convert.php Normal file
View file

@ -0,0 +1,83 @@
<?php
/**
* Written by : Arslan Hassan
* Software : ClipBucket v2
* License : CBLA
**/
ini_set('mysql.connect_timeout','6000');
include(dirname(__FILE__)."/../includes/config.inc.php");
$SYSTEM_OS = $row['sys_os'] ? $row['sys_os'] : 'linux';
//Including FFMPEG CLASS
require_once(BASEDIR.'/includes/classes/conversion/ffmpeg.win32.php');
//Get Vido
$queue_details = get_queued_video(TRUE);
//Setting up details, moving files
$tmp_file = $queue_details['cqueue_name'];
$tmp_ext = $queue_details['cqueue_tmp_ext'];
$ext = $queue_details['cqueue_ext'];
if(!empty($tmp_file)){
$temp_file = TEMP_DIR.'/'.$tmp_file.'.'.$tmp_ext;
$orig_file = CON_DIR.'/'.$tmp_file.'.'.$ext;
//copy($temp_file,$orig_file);
rename($temp_file,$orig_file);
$configs = array
(
'use_video_rate' => true,
'use_video_bit_rate' => true,
'use_audio_rate' => true,
'use_audio_bit_rate' => true,
'use_audio_codec' => true,
'format' => 'flv',
'video_codec'=>'libx264',
'audio_codec'=>'libfaac',
'audio_rate'=>22050,
'audio_bitrate'=>128000,
'video_bitrate'=>512000,
'video_width'=>400,
'video_height'=>300,
'resize'=>'max'
);
/**
* Calling Functions before converting Video
*/
if(get_functions('before_convert_functions'))
{
foreach(get_functions('before_convert_functions') as $func)
{
if(@function_exists($func))
$func();
}
}
$ffmpeg = new ffmpeg($orig_file);
$ffmpeg->configs = $configs;
$ffmpeg->gen_thumbs = TRUE;
$ffmpeg->gen_big_thumb = TRUE;
$ffmpeg->tmp_dir = TEMP_DIR;
$ffmpeg->input_ext = $ext;
$ffmpeg->output_file = VIDEOS_DIR.'/'.$tmp_file.'.flv';
$ffmpeg->hq_output_file = VIDEOS_DIR.'/'.$tmp_file.'.mp4';
$ffmpeg->log_file = LOGS_DIR.'/'.$tmp_file.'.log';
//$ffmpeg->remove_input=TRUE;
$ffmpeg->ClipBucket();
//Converting File In HD Format
$ffmpeg->convert_to_hd();
unlink($ffmpeg->input_file);
//exec(php_path()." -q ".BASEDIR."/actions/verify_converted_videos.php &> /dev/null &");
}
?>

View file

@ -36,6 +36,9 @@ if($udetails)
{
$userquery->add_comment($_POST['comment'],$udetails['userid']);
}
//Calling view channel functions
call_view_channel_functions($udetails);
assign("u",$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));

View file

@ -1,149 +1,50 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
****************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
****************************************************************
*/
define("THIS_PAGE","view_group");
define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$pages->page_redir();
$url = $_GET['url'];
$details = $groups->group_details_url($url);
$userdata = $userquery->GetUserData($details['group_owner']);
$user = $_SESSION['userid'];
include('group_check.php');
//Assign Variables
assign('groupdata',$details);
assign('ownerdata',$userdata);
$url = mysql_clean($_GET['url']);
$details = $cbgroup->group_details_url($url);
assign('group',$details);
if($details)
{
//adding group topic
if(isset($_POST['add_topic']))
{
$array = $_POST;
$array['group_id'] = $details['group_id'];
$cbgroup->add_topic($array);
if(!error()) $_POST = NULL;
}
//Joining Group
if($_GET['join'])
$cbgroup->join_group($details['group_id'],userid());
//Leaving
if($_GET['leave'])
$cbgroup->leave_group($details['group_id'],userid());
//Getting list of topics
$topics = $cbgroup->get_topics(array('group'=>$details['group_id']));
assign('topics',$topics);
//Calling all functions when a topic is called
call_view_group_functions($details);
}
template_files('view_group.html');
display_it();
// include('group_inc.php');
// $details = $groups->group_details_url($url);
// $group = $details['group_id'];
// @$user = $_SESSION['username'];
// if(empty($user)){
// @$user = $_COOKIE['username'];
// }
// $MustJoin = 'No';
//
//
////assigning Tags
//$tags = $details['group_tags'];
//$tags = explode(" ", $tags );
//Assign("tags",$tags);
//
////Delete Topic
//if(isset($_POST['delete_topic'])){
// $msg = $groups->DeleteTopic($_POST['delete_topic']);
//}
//
////Approving Topics
//if(isset($_POST['approve_topic'])){
// $topic = $_POST['approve_topic'];
// $groups->ApproveTopic($topic);
//}
////Getting Group Other Details
//$details['members'] = $groups->CountMembers($group);
//$details['videos'] = $groups->CountVideos($group);
//$details['topics'] = $groups->CountTopics($group);
//$details['posts'] = $groups->CountGroupPosts($group);
//
////Adding Topics
//if(isset($_POST['add_topic'])){
//$userquery->logincheck();
//$topic = mysql_clean($_POST['topic']);
//$group = $details['group_id'];
//$video = mysql_clean($_POST['video']);
//if($details['post_type'] == '1'){
//$approved = 'no';
//}else{
//$approved = 'yes';
//}
//$msg = $groups->AddTopic($topic,$group,$video,$approved);
//}
//
////Getting Topic List
//$sql = "Select * FROM group_topics WHERE group_id = '".$details['group_id']."' AND approved='yes' ORDER BY last_reply DESC";
//if(@$_SESSION['username'] == $details['username']){
//$sql = "Select * FROM group_topics WHERE group_id = '".$details['group_id']."' ORDER BY last_reply DESC";
//}
//$data = $db->Execute($sql);
//$total_topic = $data->recordcount() + 0;
//$topics = $data->getrows();
// for($id=0;$id<$total_topic;$id++){
// $topics[$id]['replies'] = $groups->CountReplies($topics[$id]['topic_id']);
// }
//Assign('topics',$topics);
//
////Getting User Videos
// $sql = "SELECT * from video WHERE username = '".@$_SESSION['username']."'";
// $rs = $db->Execute($sql);
// $videos = $rs->getrows();
// Assign('videos',$videos);
//
////Setting Up Topic Form
//if($details['post_type'] == '0' || $details['post_type'] == '1' && !empty($_SESSION['username'])){
// Assign('show_form','yes');
// Assign('user_name',@$_SESSION['username']);
//}else{
// Assign('user_name',@$_SESSION['username']);
// Assign('show_form','no');
//}
//if(empty($_SESSION['username']) || !$groups->is_joined($user,$group) || !$groups->is_active($user,$group)){
//Assign('show_form','no');
// if(!$groups->is_active($user,$group)){
// Assign('active','no');
// }
// if(!$groups->is_joined($user,$group)){
// Assign('joined','no');
// }
//}
//if($details['username'] == @$_SESSION['username'] && !empty($_SESSION['username'])){
// Assign('user_name',$_SESSION['username']);
// Assign('show_form','yes');
//}
//
////Getting Group Videos
//$sql = "Select * FROM group_videos WHERE group_id = '".$details['group_id']."' AND approved='yes' ORDER BY date_added DESC LIMIT 0,6";
//$data = $db->Execute($sql);
//$total_videos = $data->recordcount() + 0;
//$videos = $data->getrows();
// for($id=0;$id<$total_videos;$id++){
// $data = $myquery->GetVideDetails($videos[$id]['videokey']);
// $flv = $data['flv'];
// $videos[$id]['thumb'] = GetThumb($flv);
// $videos[$id]['title'] = $data['title'];
// $videos[$id]['url'] = VideoLink($data['videokey'],$data['title']);
// }
//Assign('videos',$videos);
//
//
////Getting Category
//$query = mysql_query("SELECT * FROM category WHERE categoryid='".$details['group_category']."'");
//$data = mysql_fetch_array($query);
//$details['category'] = $data['category_name'];
//
////Chceking Logged in user is group user or not
// if(!$groups->is_joined(@$_SESSION['username'],$group)){
// Assign('join','yes');
// }else{
// Assign('join','no');
// }
//Assign('groups',$details);
//
//
//
//Assign('subtitle',$details['group_name'].' Group');
//@Assign('msg',$msg);
//@Assign('show_group',$show_group);
//Template('header.html');
//Template('message.html');
//Template('group_header.html');
//Template('view_group.html');
//Template('footer.html');
?>

View file

@ -1,106 +1,32 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
****************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
****************************************************************
*/
require_once('includes/config.inc.php');
$userquery->logincheck();
define("THIS_PAGE","view_group_members");
define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$pages->page_redir();
$user = $_SESSION['username'];
$url = mysql_clean($_GET['url']);
include('group_inc.php');
$details = $groups->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
if(empty($user)){
$user = $_COOKIE['username'];
}
$MustJoin = 'No';
include('group_check.php');
Assign('groups',$details);
$url = mysql_clean($_GET['url']);
//Removing A Video
if(isset($_POST['remove'])){
$msg = $groups->RemoveVideos($group);
}
//Approve Videos
if(isset($_POST['approve'])){
$msg = $groups->ApproveVideos($group);
$details = $cbgroup->group_details_url($url);
assign('group',$details);
if($details)
{
//Getting List of all videos
$videos = $cbgroup->get_members($details['group_id'],"yes");
assign("users",$videos);
assign("mode","view_members");
}
//Getting Videos List
$limit = 5;
Assign('limit',$limit);
@$page = clean($_GET['page']);
if(empty($page) || $page == 0 || !is_numeric($page)){
$page = 1;
}
$from = $page-1;
$from = $from*$limit;
$query_limit = "limit $from,$limit";
@$show=mysql_clean($_GET['show']);
Assign('show',$show);
if($show != 'unapproved'){
$filter = " AND active = 'yes' ";
}else{
$filter = " AND active = 'no' ";
}
$orderby = @$orders[$order];
$sql = "SELECT * FROM group_members WHERE group_id='".$group."' AND active = 'yes' $query_limit";
$sql_p = "SELECT * FROM group_members WHERE group_id='".$group."' AND active = 'yes' ";
$data = $db->Execute($sql);
$users = $data->getrows();
$total_users = $data->recordcount()+0;
for($id=0;$id<$total_users;$id++){
$query = mysql_query("SELECT * FROM users WHERE username='".$users[$id]['username']."'");
$data = mysql_fetch_array($query);
$users[$id]['username'] = $data['username'];
$users[$id]['profile_hits'] = $data['profile_hits'];
$users[$id]['avatar'] = $data['avatar'];
$users[$id]['total_videos'] = $data['total_videos'];
}
Assign('total_users',$total_users);
Assign('users',$users);
//Pagination
$query = mysql_query($sql_p);
Assign('grand_total',mysql_num_rows($query));
$total_rows = mysql_num_rows($query);
$page_id=1;
$id = 1;
$records = $total_rows/$limit;
$pages = round($records+0.49,0);
@$show_pages = ShowPagination($pages,$page,'?url='.$url.'&order='.$order);
Assign('show_pages',$show_pages);
Assign('link','?url='.$url.'&order='.@$order);
Assign('pages',$pages);
Assign('cur_page',$page);
Assign('nextpage',$page+1);
Assign('prepage',$page-1);
Assign('total_pages',$page_id);
Assign('subtitle',$details['group_name'].' - Members');
@Assign('msg',$msg);
@Assign('show_group',$show_group);
Template('header.html');
Template('message.html');
Template('group_header.html');
Template('view_group_members.html');
Template('footer.html');
template_files('view_group.html');
display_it();
?>

View file

@ -1,109 +1,32 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
****************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
****************************************************************
*/
require_once('includes/config.inc.php');
$userquery->logincheck();
define("THIS_PAGE","view_group_videos");
define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$pages->page_redir();
$user = $_SESSION['username'];
$url = mysql_clean($_GET['url']);
include('group_inc.php');
$details = $groups->GetDetails($url);
$group = $details['group_id'];
$user = $_SESSION['username'];
if(empty($user)){
$user = $_COOKIE['username'];
}
$MustJoin = 'No';
include('group_check.php');
Assign('groups',$details);
$url = mysql_clean($_GET['url']);
//Removing A Video
if(isset($_POST['remove'])){
$msg = $groups->RemoveVideos($group);
}
//Approve Videos
if(isset($_POST['approve'])){
$msg = $groups->ApproveVideos($group);
$details = $cbgroup->group_details_url($url);
assign('group',$details);
if($details)
{
//Getting List of all videos
$videos = $cbgroup->get_group_videos($details['group_id'],"yes");
assign("videos",$videos);
assign("mode","view_videos");
}
//Getting Videos List
$limit = VLISTPP;
Assign('limit',$limit);
@$page = clean($_GET['page']);
if(empty($page) || $page == 0 || !is_numeric($page)){
$page = 1;
}
$from = $page-1;
$from = $from*$limit;
$query_limit = "limit $from,$limit";
@$show=mysql_clean($_GET['show']);
Assign('show',$show);
if($show != 'unapproved'){
$filter = " AND approved = 'yes' ";
}else{
$filter = " AND approved = 'no' ";
}
@$orderby = $orders[$order];
$sql = "SELECT * FROM group_videos WHERE group_id='".$group."' AND approved = 'yes' $query_limit";
$sql_p = "SELECT * FROM group_videos WHERE group_id='".$group."' AND approved = 'yes'";
$data = $db->Execute($sql);
$videos = $data->getrows();
$total_videos = $data->recordcount()+0;
for($id=0;$id<$total_videos;$id++){
$data = $myquery->GetVideDetails($videos[$id]['videokey']);
$flv = $data['flv'];
$videos[$id]['thumb'] = GetThumb($flv);
$videos[$id]['title'] = $data['title'];
$videos[$id]['duration'] = SetTime($data['duration']);
$videos[$id]['views'] = $data['views'];
$videos[$id]['show_rating'] = pullRating($data['videoid'],false,false,false,'novote');
$videos[$id]['url'] = VideoLink($videos[$id]['videokey'],$videos[$id]['title']);
}
Assign('total_videos',$total_videos);
Assign('videos',$videos);
//Pagination
$query = mysql_query($sql_p);
Assign('grand_total',mysql_num_rows($query));
$total_rows = mysql_num_rows($query);
$page_id=1;
$id = 1;
$records = $total_rows/$limit;
$pages = round($records+0.49,0);
@$show_pages = ShowPagination($pages,$page,'?url='.$url.'&order='.$order);
Assign('show_pages',$show_pages);
Assign('link','?url='.$url.'&order='.@$order);
Assign('pages',$pages);
Assign('cur_page',$page);
Assign('nextpage',$page+1);
Assign('prepage',$page-1);
Assign('total_pages',$page_id);
subtitle('manage_video');
@Assign('msg',$msg);
@Assign('show_group',$show_group);
Template('header.html');
Template('message.html');
Template('group_header.html');
Template('view_group_videos.html');
Template('footer.html');
template_files('view_group.html');
display_it();
?>

View file

@ -1,77 +1,28 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
****************************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
****************************************************************************
*/
require 'includes/config.inc.php';
$pages->page_redir();
$topic = mysql_clean($_GET['tid']);
if(!$groups->is_topic($topic) || $topic == 'Array'){
$msg = $LANG['grp_tpc_err4'];
$show_group_topic = 'No';
}else{
$topic_details = $groups->GetTopic($topic);
$group = $topic_details['group_id'];
$user = $_SESSION['username'];
if(empty($user)){
$user = $_COOKIE['username'];
}
$details = $groups->GetDetailsid($group);
$MustJoin = 'No';
include('group_check.php');
//Delete Posts
if(isset($_POST['delete_topic'])){
$groups->DeletePost($_POST['delete_topic']);
$tid = $_GET['tid'];
$tdetails = $cbgroup->get_topic_details($tid);
if($tdetails)
{
$grp_details = $cbgroup->get_group_details($tdetails['group_id']);
assign('group',$grp_details);
assign('topic',$tdetails);
//Calling all functions when a topic is called
call_view_topic_functions($tdetails);
}
//Adding Comments / Posts
if(isset($_POST['add_comment'])){
$comment = mysql_clean($_POST['comment']);
$reply_to = $_POST['reply_to'];
$msg = $groups->AddComment($comment,$topic,$reply_to);
}
//Getting Comments
$sql = "Select * FROM group_posts WHERE topic_id = '".$topic."'";
$data = $db->Execute($sql);
$total_replies = $data->recordcount() + 0;
$comments = $data->getrows();
Assign('comments',$comments);
//setting Comment Form Display setting
if(!empty($_SESSION['username'])){
Assign('show_form','yes');
Assign('user_name',$_SESSION['username']);
}
if(empty($_SESSION['username'])){
Assign('show_form','no');
Assign('user_name',$_SESSION['username']);
}
if(!$groups->is_Joined($user,$group) && $_SESSION['username'] != $details['username']){
Assign('joined','no');
Assign('show_form','no');
}elseif($_SESSION['username'] == $details['username'] || $groups->is_Joined($user,$group)){
Assign('joined','yes');
$show_form = 'yes';
Assign('show_form','yes');
}
Assign('groups',$details);
Assign('topic',$topic_details);
}
Assign('subtitle',$LANG['grp_title_topic'].$topic_details['topic_title']);
Assign('msg',$msg);
Assign('show_group_topic',$show_group_topic);
Template('header.html');
Template('message.html');
Template('group_header.html');
Template('view_topic.html');
Template('footer.html');
template_files('view_topic.html');
display_it();
?>

View file

@ -46,7 +46,7 @@ if(video_playable($vkey))
if(isset($_POST['add_comment']))
{
$cbvideo->add_comment($_POST['comment'],$vdo['videoid']);
$vdo['comments_count'] = $cxvid->count_video_comments;
$vdo['comments_count'] = $cbvid->count_video_comments;
}
//Adding Video To Favorites