Removed : actual_upload.php and ActualUpload.php

Added : User Ban System
Added : New User My account
Added  : Video Manage System
Added : Favorite Manage System
Added : Private Messaging System
This commit is contained in:
Arslan Hassan 2009-11-04 10:27:40 +00:00
parent 187a122bdf
commit fdc6ebbd82
88 changed files with 4254 additions and 1552 deletions

View file

@ -1,32 +0,0 @@
<?php
error_reporting(0);
require_once('includes/conversion.conf.php');
//Rename File
$filename = $_GET['flv'];
$new_name = substr($filename, 0, strrpos($filename, '.'));
$ext = substr($_FILES['Filedata']['name'], strrpos($_FILES['Filedata']['name'],'.') + 1);
$newfilename = $new_name.".".$ext;
//Upload Path
$filepath = getcwd()."/files/temp/";
if(!file_exists($filepath)) {
mkdir($filepath,0777);
}
//CHMOD File
chmod(BASEDIR."/files/temp", 0777);
chmod(BASEDIR."/files/original", 0777);
chmod(BASEDIR."/files/videos", 0777);
//Copying File..
if(move_uploaded_file($_FILES['Filedata']['tmp_name'], $filepath.$newfilename)){
$php_path = PHP_PATH;
$ffmpeg = new ffmpeg();
$ffmpeg->ConvertFile($newfilename,$filename);
}
?>

View file

@ -7,10 +7,11 @@
require'../includes/admin_config.php';
$userquery->login_check('admin_access');
if(isset($_POST['update_player_size']))
if($_POST['update_player_size']=='yes')
{
$height = mysql_clean($_POST['height']);
$width = mysql_clean($_POST['width']);
$config_name = mysql_clean($_POST['width']);
if(!is_numeric($height) || $height <=100)
$height = 100;
if(!is_numeric($width) || $width <=100)
@ -19,4 +20,17 @@ if(isset($_POST['update_player_size']))
$myquery->Set_Website_Details('player_width',$width);
echo "Player size has been updated";
}
if($_POST['update_channel_player_size']=='yes')
{
$height = mysql_clean($_POST['height']);
$width = mysql_clean($_POST['width']);
$config_name = mysql_clean($_POST['width']);
if(!is_numeric($height) || $height <=100)
$height = 100;
if(!is_numeric($width) || $width <=100)
$width = 100;
$myquery->Set_Website_Details('channel_player_height',$height);
$myquery->Set_Website_Details('channel_player_width',$width);
echo "Channel Player size has been updated";
}
?>

View file

@ -1,42 +0,0 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , (c) PHPBucket.com |
****************************************************************************************************
*/
$snatch_system = 'curl';
require_once('includes/conversion.conf.php');
$ffmpeg = new ffmpeg();
//Uploading File
if(isset($_POST['upload_file'])) {
$_SESSION['is_upload'] = "Success";
$Upload->UploadProcess();
$filename = $_POST['flvname'];
$new_name = substr($filename, 0, strrpos($filename, '.'));
$ext = substr($_FILES['filename']['name'], strrpos($_FILES['filename']['name'],'.') + 1);
$newfilename = $new_name.".".$ext;
$path = BASEDIR."/files/temp/".$newfilename;
copy($_FILES['filename']['tmp_name'], $path);
setcookie('flv_upload',$filename);
$php_path = PHP_PATH;
$ffmpeg->ConvertFile($newfilename,$filename);
redirect_to(BASEURL.'/videouploadsuccess.php?show=success');
} elseif(isset($_POST['snatch_file'])) {
$Upload->UploadProcess();
$file = $_POST['file'];
$flvname = $_POST['flvname'];
$php_path = PHP_PATH;
exec("$php_path cUrldownload.php $file $flvname >> ".BASEDIR."/logs/logs.txt &");
redirect_to(BASEURL.'/videouploadsuccess.php?show=success');
}
?>

View file

@ -8,40 +8,6 @@
*/
require'../includes/admin_config.php';
$userquery->admin_login_check();
$pages->page_redir();
$page = $pages->show_admin_page(clean(@$_GET['settings']));
if(!empty($page)){
$pages->redirect($page);
}
if(@$_GET['msg']){
$msg = clean(@$_GET['msg']);
}
$user = mysql_clean(@$_GET['userid']);
//Check User Exists or Not
if($userquery->Check_User_Exists($user)){
//Update User
if(isset($_POST['button'])){
$msg = $signup->Admin_Edit_User();
}
//Get User Details
$data = $userquery->GetUserData($user);
CBTemplate::assign('data',$data);
}else{
$msg[] = "User Doesn't Exist";
}
//Assing Template
CBTemplate::assign('country',$signup->country());
CBTemplate::assign('msg',@$msg);
CBTemplate::display(LAYOUT.'/header.html');
CBTemplate::display(LAYOUT.'/leftmenu.html');
CBTemplate::display(LAYOUT.'/message.html');
CBTemplate::display(LAYOUT.'/edit_member.html');
CBTemplate::display(LAYOUT.'/footer.html');
header('location:view_user.php?uid='.$_GET['uid']);
?>

View file

@ -1,40 +1,16 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
require'../includes/admin_config.php';
$userquery->admin_login_check();
$userquery->login_check('member_moderation');
$pages->page_redir();
$page = $pages->show_admin_page(clean(@$_GET['settings']));
if(!empty($page)){
$pages->redirect($page);
}
if(@$_GET['msg']){
$msg = clean(@$_GET['msg']);
}
//Show Requested Options
$property_values = array( 'showall' => 'Show All',
'inactive' => 'Inactive Only',
'active' => 'Active Only',
'addmember' => 'Add Member',
'search' => 'Search Members'
);
$view = clean(@$_GET['view']);
if(empty($view)){ $view = 'showall'; }
while(list($property['value'],$property['name']) = each($property_values)){
if($property['value'] == $view){
CBTemplate::assign("property",$property);
}
}
//-------TIME TO DO SOME ACTION-------//
//Delete User
@ -154,151 +130,20 @@ if(isset($_GET['unban'])){
//-------TIME END TO DO SOME ACTION-------//
//Form Processing And Validation
//User Registration Form Processing and Validation
if(isset($_POST['button'])){
$msg = $signup->Admin_Add_User();
}
//Assigning Default Values in Form
@$values= array(
'default_uname' => mysql_clean($_POST['username']),
'default_email' => mysql_clean($_POST['email']),
'default_pass' => pass_code(mysql_clean($_POST['password'])),
'default_fname' => mysql_clean($_POST['fname']),
'default_lname' => mysql_clean($_POST['lname']),
'default_gender' => mysql_clean($_POST['gender']),
'default_level' => mysql_clean($_POST['level']),
'default_m' => $_POST['month'],
'default_d' => $_POST['day'],
'default_y' => $_POST['year'],
'default_ht' => mysql_clean($_POST['hometown']),
'default_city' => mysql_clean($_POST['city']),
'default_country' => $_POST['country'],
'default_zip' => mysql_clean($_POST['zip'])
);
while(list($name,$value) = each($values)){
CBTemplate::assign($name,$value);
}
//Getting Member List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,RESULTS);
$users = $db->select("users",'*',$cond,$get_limit,"doj DESC");
Assign('users', $users);
//Collecting Data for Pagination
$total_rows = $db->count('users','*',$cond);
$total_pages = count_pages($total_rows,VLISTPP);
//Pagination
$pages->paginate($total_pages,$page);
@$values_search= array(
'search_uname' => mysql_clean($_GET['username']),
'search_email' => mysql_clean($_GET['email']),
'search_fname' => mysql_clean($_GET['fname']),
'search_lname' => mysql_clean($_GET['lname']),
'search_country' => mysql_clean($_GET['country']),
'search_status' => mysql_clean($_GET['status']),
'search_sort' => mysql_clean($_GET['sort']),
'search_order' => mysql_clean($_GET['order'])
);
while(list($name,$value) = each($values_search)){
CBTemplate::assign($name,$value);
}
//Jump To The page
if(isset($_POST['display_page'])){
redirect_to($_POST['page_number']);
}
//Users Array
$limit = RESULTS;
Assign('limit',$limit);
$page = clean(@$_GET['page']);
if(empty($page) || $page == 0){
$page = 1;
}
$from = $page-1;
$from = $from*$limit;
$query_limit = "limit $from,$limit";
$order = "ORDER BY doj DESC";
$sql = "SELECT * from users $order $query_limit";
$sql_p = "SELECT * from users";
if(empty($view) || $view == 'showall'){
$sql = "SELECT * from users $order $query_limit";
}
if($view == 'inactive'){
$sql = "SELECT * from users WHERE usr_status='ToActivate' $order $query_limit";
$sql_p = "SELECT * from users WHERE usr_status='ToActivate'";
}
if($view == 'active'){
$sql = "SELECT * from users WHERE usr_status='OK' $order $query_limit";
$sql_p = "SELECT * from users WHERE usr_status='OK'";
}
//Search
if(isset($_GET['search'])){
$username = mysql_clean($_GET['username']);
$email = mysql_clean($_GET['email']);
$fname = mysql_clean($_GET['fname']);
$lname = mysql_clean($_GET['lname']);
$country = mysql_clean($_GET['country']);
$status = mysql_clean($_GET['status']);
$sort = mysql_clean($_GET['sort']);
$order = mysql_clean($_GET['order']);
if($order == 'ASC'){
if($sort == 'username'){$orderby = 'ORDER BY username ASC';}
if($sort == 'doj'){ $orderby = 'ORDER BY doj ASC';}
if($sort == 'country'){ $orderby = 'ORDER BY country ASC';}
if($sort == 'lname'){ $orderby = 'ORDER BY last_name ASC';}
if($sort == 'fname'){ $orderby = 'ORDER BY first_name ASC';}
}else{
if($sort == 'username'){$orderby = 'ORDER BY username DESC';}
if($sort == 'doj'){ $orderby = 'ORDER BY doj DESC';}
if($sort == 'country'){ $orderby = 'ORDER BY country DESC';}
if($sort == 'lname'){ $orderby = 'ORDER BY last_name DESC';}
if($sort == 'fname'){ $orderby = 'ORDER BY first_name DESC';
}
}
$sql = "SELECT * from users ";
$sql .= "WHERE username like '%$username%' AND
email like '%$email%' AND
first_name like '%$fname%' AND
last_name like '%$lname%' AND
country like '%$country%' AND
usr_status like '%$status%'
$orderby $query_limit
";
$sql_p = "SELECT * from users WHERE username like '%$username%' AND
email like '%$email%' AND
first_name like '%$fname%' AND
last_name like '%$lname%' AND
country like '%$country%' AND
usr_status like '%$status%'
$orderby ";
}
//Assing User Data Values
$rs = $db->Execute($sql);
$total = $rs->recordcount() + 0;
$users = $rs->getrows();
for($id=0;$id<$total;$id++){
$users[$id]['age'] = $calcdate->age($users[$id]['dob']);
$users[$id]['total_videos'] = $userquery->TotalVideos($users[$id]['username']);
$users[$id]['total_friends'] = $userquery->TotalFriends($users[$id]['username']);
$users[$id]['total_groups'] = $userquery->TotalGroups($users[$id]['username']);
}
Assign('total', $total + 0);
Assign('user', $users);
//Pagination #A Tough Job#
if($view == 'search'){
@$link = '&amp;username=' .mysql_clean($_GET['username']). '&amp;email=' .mysql_clean($_GET['email']).'&amp;fname=' .mysql_clean($_GET['fname']).'&amp;lname=' .mysql_clean($_GET['lname']).'&amp;country='.mysql_clean($_GET['country']).'&amp;status='.mysql_clean($_GET['status']).'&amp;sort='.mysql_clean($_GET['sort']).'&amp;order='.mysql_clean($_GET['order']).'&amp;search='.mysql_clean($_GET['search']);
Assign('link',$link);
}
Assign('msg',@$msg);
Template('header.html');
Template('leftmenu.html');
Template('message.html');
Template('members.html');
Template('footer.html');
template_files('members.html');
display_it();
?>

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

@ -13,9 +13,12 @@
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200" valign="top">{include file="$style_dir/left_menu.html" }
<td colspan="2" valign="top" style="max-width:150px"><a href="javascript:void(0)" onclick="$('#left_menu').animate({literal}{width:'toggle'}{/literal},250);">Toggle Menu</a></td>
</tr>
<tr>
<td valign="top" style="max-width:250px">{include file="$style_dir/left_menu.html" }
</td>
<td valign="top">
<td width="100%" valign="top" >
{foreach from=$template_files item=file}
{include file="$style_dir/$file" }
{/foreach}</td>

View file

@ -1,4 +1,5 @@
<div class="left_menu">
<div class="left_menu" id="left_menu">
{assign var='menu' value = $Cbucket->AdminMenu}
{foreach from=$menu key=name item=menu}
<!-- *********************************Start {$name} Menu****************************** -->

View file

@ -29,14 +29,15 @@ Website : <a href="{$curplayer.website}">{$curplayer.website}</a></td>
</style>
<script type="text/javascript">
function update_player_size(width,height)
function update_player_size(width,height,normal_player,channel_player)
{
var page = baseurl+'/actions/update_configs.php';
$.post(page,
{
width : width,
height : height,
update_player_size:'yes'
update_player_size : normal_player,
update_channel_player_size:channel_player
},
function(data)
{
@ -56,11 +57,27 @@ Website : <a href="{$curplayer.website}">{$curplayer.website}</a></td>
minWidth: 100,
grid: 10,
resize:function(event,ui){$("#width").val(ui.size.width);$("#height").val(ui.size.height);},
stop:function(event,ui){update_player_size(ui.size.width,ui.size.height)}
stop:function(event,ui){update_player_size(ui.size.width,ui.size.height,'yes','')}
});
$("#width").change(function () {$('#resizable').css("width",this.value+'px') ; update_player_size(this.value,$("#height").val()) });
$("#height").change(function () {$('#resizable').css("height",this.value+'px'); update_player_size($("#width").val(),this.value) });
$("#width").change(function () {$('#resizable').css("width",this.value+'px') ; update_player_size(this.value,$("#height").val(),'yes','') });
$("#height").change(function () {$('#resizable').css("height",this.value+'px'); update_player_size($("#width").val(),this.value,'yes','') });
});
$(function() {
$("#resizable-channel").resizable({
maxHeight: 800,
maxWidth: 600,
minHeight: 100,
minWidth: 100,
grid: 10,
resize:function(event,ui){$("#channel_width").val(ui.size.width);$("#channel_height").val(ui.size.height);},
stop:function(event,ui){update_player_size(ui.size.width,ui.size.height,'','yes')}
});
$("#channel_width").change(function () {$('#resizable-channel').css("width",this.value+'px') ; update_player_size(this.value,$("#channel_height").val(),'','yes') });
$("#channel_height").change(function () {$('#resizable-channel').css("height",this.value+'px'); update_player_size($("#channel_width").val(),this.value,'','yes') });
});
</script>
{/literal}
@ -74,6 +91,19 @@ Website : <a href="{$curplayer.website}">{$curplayer.website}</a></td>
<label for="height">Height</label>
<input type="text" name="height" id="height" value="{$Cbucket->configs.player_height}" />
</div>
Channel Player
<div class="demo">
<div id="resizable-channel" class="ui-widget-content" style="width:{$Cbucket->configs.channel_player_width}px; height:{$Cbucket->configs.channel_player_height}px">
<h3 class="ui-widget-header">Actual Player Size</h3>
</div>
<label for="width">Width</label>
<input type="text" name="width" id="channel_width" value="{$Cbucket->configs.channel_player_width}" />
<label for="height">Height</label>
<input type="text" name="height" id="channel_height" value="{$Cbucket->configs.channel_player_height}" />
</div>
</div>
<hr size="1" noshade />

View file

@ -0,0 +1,70 @@
<span class="page_title">Member Manager</span>
<!-- Displaying Members -->
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center" valign="middle" class="left_head">
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td width="50" class="head_sep_left">UID</td>
<td class="head"><div class="head_sep_left" style="width:250px">User Details</div></td>
<td width="50" class="right_head">&nbsp;</td>
</tr>
</table>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
{foreach from=$users item=u}
<tr class="video_opt_td" bgcolor="{$bgcolor}">
<td width="30" align="center" valign="top" class="video_opt_td"> <input name="check_user[]" type="checkbox" id="check_user" value="{$videos[list].videoid}" /></td>
<td width="50" align="center" valign="top" class="video_opt_td">{$u.userid}</td>
<td valign="top" class="video_opt_td"
onmouseover="$('#usr_opt-{$u.userid}').show()"
onmouseout="$('#usr_opt-{$u.userid}').hide()" >
<div style="float:left; width:35px; margin-left:10px"><img src="{$userquery->getUserThumb($u,'small')}" class="mid_user_thumb" /></div>
<a href="#" target="_blank" style="text-indent:10px">
{$u.username}
</a> &#8212;
<span class="vdo_sets">Email:<strong><span style="text-transform:none">{$u.email}</span> </strong> &#8226;
Status:<strong>{$u.usr_status}</strong> &#8226;
Level:<strong>{$u.level|get_user_level}</strong> &#8226;
Last Active:<strong>{$u.last_active}</strong>
</span>
<br />style="display:none"
<div id="usr_opt-{$u.userid}" class="vid_opts">
<a href="view_user.php?uid={$u.userid}">View</a> or
<a href="view_user.php?uid={$u.userid}">Edit</a> |
{if $u.usr_status == Ok}
<a href="?deactivate={$u.userid}">Deactivate</a>
{elseif $u.usr_status == ToActivate}
<a href="?activate={$u.userid}">Activate</a>
{/if} |
{if $u.ban_status == yes}
<a href="?unban={$u.userid}">Unban Member</a>
{/if}
{if $u.ban_status == no}
<a href="?ban={$u.userid}">Ban Member</a>
{/if}|
<a href="?editor_pick={$videos[list].videoid}">Add To Editor's Pick</a> |
<a href="view_conversion_log.php?file_name={$videos[list].file_name}">File conversion details</a> |
<a href="?delete_user={$u.userid}">Delete</a>
</div>
</td>
<td width="50" valign="top" class="video_opt_td">&nbsp;</td>
</tr>
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{/foreach}
</table>
<!-- DIsplaying Videos Ends-->
{include file="$style_dir/blocks/pagination.html" }

View file

@ -2,7 +2,7 @@
{assign var=msg value=$eh->message_list}
{assign var=err value=$eh->error_list}
{if $err.0 neq ''}
{if $err.0 neq '' || $err.1 neq ''}
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFF0FA">

View file

@ -30,7 +30,7 @@
<!-- DIsplaying Videos -->
<form name="video_manage" method="post">
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center" valign="middle"><img src="{$imageurl}/arrow_return.png" width="25" height="25"></td>
<td height="50" style="padding-left:15px">
@ -45,7 +45,7 @@
</table>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center" valign="middle" class="left_head">
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
@ -59,7 +59,7 @@
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
{assign var = bgcolor value = ""}
{section name=list loop=$videos}
<tr class="video_opt_td" bgcolor="{$bgcolor}">
@ -106,7 +106,7 @@
</table>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center" valign="middle"><img src="{$imageurl}/arrow_return_invert.png" width="25" height="25"></td>
<td height="50" style="padding-left:15px">

View file

@ -0,0 +1,313 @@
<span class="page_title">Edit User</span>
{assign var="user_fields" value=$userquery->load_profile_fields($p)}
{assign var="user_custom_profile_fields" value=$userquery->load_custom_profile_fields($p)}
{assign var="user_custom_signup_fields" value=$userquery->load_custom_signup_fields($p)}
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="15" align="center" valign="middle" class="left_head">&nbsp;</td>
<td class="head">User Info</td>
<td width="50" class="right_head">&nbsp;</td>
</tr>
</table></td>
<td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="15" align="center" valign="middle" class="left_head">&nbsp;</td>
<td class="head">User Stats</td>
<td width="50" class="right_head">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td width="50%" valign="top">
<fieldset class="fieldset">
<legend>ClipBucket User Info</legend>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
<tr>
<td width="200"><strong>User Id</strong></td>
<td>
<input disabled="disabled" name="uid" type="text" id="uid" value="{$u.userid}" />
<input name="userid" type="hidden" id="userid" value="{$u.userid}" size="45" />
</td>
</tr>
<tr>
<td width="200"><strong>User name</strong></td>
<td>
<input name="username" type="text" id="username" value="{$u.username}" />
<input name="dusername" type="hidden" id="dusername" value="{$u.username}" />
<input name="admin_manager" type="hidden" value="yes" />
</td>
</tr>
<tr>
<td width="200"><strong>Email</strong></td>
<td><input name="email" type="text" id="email" value="{$u.email}" /><input name="demail" type="hidden" id="demail" value="{$u.email}" /></td>
</tr>
<tr>
<td><strong>User Level</strong></td>
<td><label for="level"></label>
<select name="level" id="level">
{assign var=levels value=$userquery->get_levels()}
{foreach from=$levels item=level}
<option value="{$level.user_level_id}" {if $u.level==$level.user_level_id} selected="selected"{/if}>{$level.user_level_name}</option>
{/foreach}
</select></td>
</tr>
<tr>
<td><strong>Country</strong></td>
<td>
<select name="country" id="country">
{assign var='countries' value=$Cbucket->get_countries(iso2)}
{foreach from=$countries item=country key=code}
<option value="{$code}" {if $u.country==$code} selected="selected"{/if}>{$country}</option>
{/foreach}
</select></td>
</tr>
<tr>
<td><strong>Gender</strong></td>
<td>
<label>
<input type="radio" name="sex" value="male" id="sex_0" {if $u.sex == male} checked="checked"{/if} />
Male</label>
<label>
<input type="radio" name="sex" value="female" id="sex_1" {if $u.sex == female} checked="checked"{/if}/>
Female</label>
</p></td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset">
<legend>Profile Details</legend>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
{foreach from=$user_fields item=field}
<tr>
<td width="200"><strong>{$field.title}</strong></td>
<td>{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}
</table>
</fieldset>
<fieldset class="fieldset">
<legend>User Custom Signup Fields</legend>
{if $user_custom_signup_fields}
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
{foreach from=$user_custom_signup_fields item=field}
<tr>
<td width="200"><strong>{$field.title}</strong></td>
<td>{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}</td>
<br>
{$field.hint_2}
</tr>
{/foreach}
</table>
{else}<div align="center"><em>No custom field found</em></div>{/if}
</fieldset>
</td>
<td width="50%" align="left" valign="top"><fieldset class="fieldset">
<legend>User Activity</legend>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
<tr>
<td width="200"><strong>Date of birth</strong></td>
<td>{$u.dob}</td>
</tr>
<tr>
<td><strong>Joined - IP</strong></td>
<td>{$u.doj|date_format} - {$u.signup_ip}</td>
</tr>
<tr>
<td><strong>Last Login - Login IP</strong></td>
<td>{$u.last_logged} - {$u.ip}</td>
</tr>
<tr>
<td><strong>Last Active - Online </strong></td>
<td>{$u.last_active} - {$u.last_active|is_online}</td>
</tr>
<tr>
<td><strong>Profile Views</strong></td>
<td><label for="profile_hits"></label>
<input name="profile_hits" type="text" id="profile_hits" value="{$u.profile_hits}" /></td>
</tr>
<tr>
<td><strong>Videos Watched</strong></td>
<td><input name="total_watched" type="text" id="total_watched" value="{$u.total_watched}" /></td>
</tr>
<tr>
<td><strong>Videos Uploaded</strong></td>
<td><input name="total_videos" type="text" id="total_watched2" value="{$u.total_videos}" /></td>
</tr>
<tr>
<td><strong>Total Profile Comments</strong></td>
<td><input name="total_comments" type="text" id="total_watched3" value="{$u.total_comments}" /></td>
</tr>
<tr>
<td><strong>Profile Rating</strong></td>
<td><input name="rating" type="text" id="total_watched4" value="{$u.rating}" />
0-10</td>
</tr>
<tr>
<td><strong>Profile Rated by</strong></td>
<td><input name="rated_by" type="text" id="total_watched5" value="{$u.rated_by}" /></td>
</tr>
<tr>
<td><strong>Subscribers</strong></td>
<td><input name="subscribers" type="text" id="total_watched6" value="{$u.subscribers}" /></td>
</tr>
</table>
</fieldset><fieldset class="fieldset">
<legend>Recent Activity Log</legend>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40" align="center" valign="middle" class="left_head">ID</td>
<td width="50" class="head_sep_left">UID</td>
<td width="100" class="head"><div class="head_sep_left" style="width:100px">Username</div></td>
<td width="100" class="head"><div class="head_sep_left" style="width:100px">Date</div></td>
<td class="head"><div class="head_sep_left" style="width:100px">Detail</div></td>
<td width="10" class="right_head">&nbsp;</td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
{assign var="logs" value=$userquery->get_user_action_log($u.userid,10)}
{section loop=$logs name=log}
<tr>
<td width="40" align="center" valign="middle" class="">{$logs[log].action_id}</td>
<td width="50" class="" style="padding-left:10px">{$logs[log].action_userid}</td>
<td width="100" class=""><div class="" style="width:100px">{$logs[log].action_username}</div></td>
<td width="100" class=""><div class="" style="width:100px">{$logs[log].date_added}</div></td>
<td class=""><div class="">Type : {$logs[log].action_type} &#8211;{if $logs[log].action_details!=''}{$logs[log].action_details} &#8211;{/if} Success : {$logs[log].action_success} &#8211 {$logs[log].action_ip}</div></td>
</tr>
{sectionelse}
<!--<tr><td><em>No user action log found</em></td></tr>-->
{/section}
</table>
</fieldset><fieldset class="fieldset">
<legend>User Avatar and Background</legend><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="center" valign="top"><img src="{$userquery->getUserThumb($u)}" class="mid_user_thumb" style="max-width:95px"/></td>
<td valign="top"><strong>User Avatar/Profile Pic</strong><br />
Please select image file<br />
<label for="avatar_file"></label>
<input type="file" name="avatar_file" id="avatar_file" />
OR<br />
Please Enter Image URL<br />
<label for="avatar_url"></label>
<input name="avatar_url" type="text" id="avatar_url" value="{$u.avatar_url}" />
<br />
<input name="delete_avatar" type="checkbox" id="delete_avatar" value="yes" />
<label for="delete_avatar">Delete This Image - (if user has profile pic)</label>
<input type="hidden" name="avatar_file_name" value="{$u.avatar}" />
</td>
</tr>
<tr>
<td colspan="2" align="center" style="border-bottom:1px solid #CCC">&nbsp;</td>
</tr>
<tr>
<td height="125" align="center" valign="top">{if $userquery->getUserBg($u)}<img src="{$userquery->getUserBg($u)}" style="max-width:95px"/>{else}No Bg{/if}</td>
<td valign="top"><strong>User Background Image
</strong><br />
Please Select Image File
<br />
<input type="file" name="background_file" id="background_file" />
OR<br />
Please Enter Image URL<br />
<label for="avatar_url"></label>
<input name="background_url" type="text" id="background_url" value="{$u.background_url}" />
OR<br />
Please Enter Background Color<br />
<input name="background_color" type="text" id="background_color" value="{$u.background_color}" />
<input type="hidden" name="bg_file_name" value="{$u.background}" />
<br />
Background Repeat Type (if using image as a background)<br />
<label for="background_repeat"></label>
<select name="background_repeat" id="background_repeat" >
<option value="repeat" {if $u.background_repeat=='repeat'} selected="selected"{/if}>repeat</option>
<option value="repeat-x" {if $u.background_repeat=='repeat-x'} selected="selected"{/if}>repeat-x</option>
<option value="repeat-y" {if $u.background_repeat=='repeat-y'} selected="selected"{/if}>repeat-y</option>
<option value="no-repeat" {if $u.background_repeat=='no-repeat'} selected="selected"{/if}>no-repeat</option>
</select>
<br />
{if $userquery->getUserBg($u)}<input name="delete_bg" type="checkbox" id="delete_bg" value="yes" /><label for="delete_bg">Delete This Image</label>{/if}</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset">
<legend>User Custom Profile Fields</legend> {if $user_custom_profile_fields}
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
{foreach from=$user_custom_profile_fields item=field}
<tr>
<td width="200"><strong>{$field.title}</strong></td>
<td>{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}</td>
<br>
{$field.hint_2}
</tr>
{/foreach}
</table>{else}<div align="center"><em>No custom field found</em></div>{/if}
</fieldset>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><label for="update_user"></label>
<input type="submit" name="update_user" id="update_user" value="Submit" /></td>
<td>&nbsp;</td>
</tr>
</table>
<br />
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="head_title">Profile Comments</td>
</tr>
<tr>
<td colspan="2" align="center">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center">{assign var=id value=$u.userid}{include file="$style_dir/blocks/comments.html" type=pr id=$u.userid link="uid=$id"}</td>
</tr>
</table>
<br />
</form>

View file

@ -135,4 +135,6 @@ padding-left:5px; font-size:16px; font-weight:bold; font-family:Arial, Helvetica
.templates_container .template_box:hover{background-color:#F3E8FF}
.preview_thumb{max-width:175px; max-height:175px}
.preview_thumb{max-width:175px; max-height:175px}
.mid_user_thumb{max-width:30px; min-height:30px}

View file

@ -1,7 +1,7 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************

View file

@ -0,0 +1,33 @@
<?php
/**
* View User Details
* @author:Arslan
* @Since : Oct 16 09
*/
require'../includes/admin_config.php';
$pages->page_redir();
$userquery->login_check('admin_access');
$uid = $_GET['uid'];
$udetails = $userquery->get_user_details($uid);
if($udetails)
{
if(isset($_POST['update_user']))
{
$userquery->update_user($_POST);
if(!error())
$udetails = $userquery->get_user_details($uid);
}
assign('u',$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));
}else{
e("No User Found");
$CBucket->show_page = false;
}
template_files("view_user.html");
display_it();
?>

View file

@ -7,96 +7,21 @@
****************************************************************************************************
*/
require 'includes/config.inc.php';
$pages->page_redir();
subtitle('channels');
$userquery->perm_check('view_channel',true);
//Getting Order
@$order = $_GET['order'];
if(empty($order) || is_array($_GET['order'])){
$order = "ra";
}
$orders = array(
"mv" => "ORDER BY profile_hits DESC",
"fr" => "WHERE featured='yes'",
"ra" => "ORDER BY doj DESC",
"vd" => "ORDER BY total_videos DESC",
"ct" => "ORDER BY total_comments DESC"
);
@$show_order = array(
"mv" => $LANG['mostly_viewed'],
"fr" => $LANG['featured'],
"ra" => $LANG['recently_added'],
"vd" => $LANG['most_videos'],
"ct" => $LANG['most_comments']
);
Assign('show_order',$show_order[$order]);
//Setting Up Queries
$limit = CLISTPP;
Assign('limit',$limit);
@$page = clean($_GET['page']);
if(empty($page) || $page == 0 || !is_numeric($page) || $page < 0){
$page = 1;
}
$from = $page-1;
$from = $from*$limit;
$query_limit = "limit $from,$limit";
$orderby = $orders[$order];
//Getting Video List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,VLISTPP);
$users = $db->select("users",'*',$cond,$get_limit,"doj DESC");
Assign('users', $users);
//$sql = "SELECT * FROM users WHERE usr_status='Ok' $orderby $query_limit";
//$sql_p = "SELECT * FROM users WHERE usr_status='Ok' $orderby";
$sql = "SELECT * FROM users $orderby $query_limit";
$sql_p = "SELECT * FROM users $orderby ";
//Collecting Data for Pagination
$total_rows = $db->count('users','*',$cond);
$total_pages = count_pages($total_rows,VLISTPP);
$user_data = $db->Execute($sql);
$total_users = $user_data->recordcount() + 0;
$users = $user_data->getrows();
for($id=0;$id<$total_users;$id++){
$sql = "Select * FROM channel_comments WHERE channel_user='".$users[$id]['username']."'";
$rs = $db->Execute($sql);
$users[$id]['total_comments'] = $rs->recordcount() + 0;
$sql = "Select * FROM video WHERE username='".$users[$id]['username']."'";
$rs = $db->Execute($sql);
$users[$id]['total_videos'] = $rs->recordcount() + 0;
}
Assign('users',$users);
//Pagination
$link = '?order='.$order;
Assign('link',$link);
$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);
@Assign('msg',$msg);
Template('header.html');
Template('message.html');
Template('channels.html');
Template('footer.html');
$pages->paginate($total_pages,$page);
template_files('channels.html');
display_it();
?>

View file

@ -1,13 +0,0 @@
<?php
require_once('includes/conversion.conf.php');
// Get arguments from the argv array
$newfilename = $_SERVER['argv'][1];
$filename = $_SERVER['argv'][2];
if(!empty($filename)){
$ffmpeg = new ffmpeg();
$ffmpeg->ConvertFile($newfilename,$filename);
}
?>

92
upload/edit_account.php Normal file
View file

@ -0,0 +1,92 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
require 'includes/config.inc.php';
$userquery->logincheck();
//Updating Profile
if(isset($_POST['update_profile']))
{
$array = $_POST;
$array['userid'] = userid();
$userquery->update_user($array);
}
//Updating Avatar
if(isset($_POST['update_avatar_bg']))
{
$array = $_POST;
$array['userid'] = userid();
$userquery->update_user_avatar_bg($array);
}
//Changing Email
if(isset($_POST['change_email']))
{
$array = $_POST;
$array['userid'] = userid();
$userquery->change_email($array);
}
//Changing User Password
if(isset($_POST['change_password']))
{
$array = $_POST;
$array['userid'] = userid();
$userquery->change_password($array);
}
//Banning Users
if(isset($_POST['ban_users']))
{
$userquery->ban_users($_POST['users']);
}
$mode = $_GET['mode'];
switch($mode)
{
case 'profile_settings':
default:
{
assign('mode','profile_settings');
}
break;
case 'avatar_bg':
{
assign('mode','avatar_bg');
}
break;
case 'change_email':
{
assign('mode','change_email');
}
break;
case 'change_password':
{
assign('mode','change_password');
}
break;
case 'ban_users':
{
assign('mode','ban_users');
}
break;
}
$udetails = $userquery->get_user_details(userid());
assign('user',$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));
template_files('edit_account.html');
display_it();
?>

View file

@ -1,60 +1,41 @@
<?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');
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']));
$videoid = $_REQUEST['videoid'];
$vid = mysql_clean($_GET['vid']);
//get video details
$vdetails = $cbvid->get_video_details($vid);
if($userquery->CheckVideoOwner($videoid,$user) == 1 || $is_admin == 1)
if($vdetails['userid'] != userid())
{
//Getting Video Id
if($myquery->VideoExists($videoid)){
//Updating Video
if(isset($_POST['update'])){
$msg = $Upload->ValidateUploadForm();
if(empty($msg)){
$msg = $myquery->UpdateVideo($videoid);
}
}
$data = $myquery->GetVideoDetails($videoid);
//Assigning Thumbs
$data['thumb1'] = GetThumb($data['flv'],1);
$data['thumb2'] = GetThumb($data['flv'],2);
$data['thumb3'] = GetThumb($data['flv'],3);
$data['url'] = VideoLink($data['videokey'],$data['title']);
Assign('data',$data);
Assign('country',$signup->country());
}else{
$msg = $LANG['class_vdo_del_err'];
Assign('show_form','no');
}
//Assigning Category List
$sql = "SELECT * from category";
$rs = $db->Execute($sql);
$total_categories = $rs->recordcount() + 0;
$category = $rs->getrows();
Assign('category', $category);
e(lang('no_edit_video'));
$Cbucket->show_page = false;
}else{
Assign('subtitle',$LANG['title_edit_video'].$data['title']);
@Assign('msg',$msg);
Template('header.html');
Template('message.html');
Template('edit_video.html');
Template('footer.html');
}
else
{
header( 'Location: '.videos_link.'' ) ;
//Updating Video Details
if(isset($_POST['update_video'])){
$Upload->validate_video_upload_form();
if(empty($eh->error_list))
{
$_POST['videoid'] = $vid;
$cbvid->update_video();
$cbvid->set_default_thumb($vid,mysql_clean(post('default_thumb')));
}
}
assign('v',$vdetails);
}
template_files('edit_video.html');
display_it();
?>

View file

@ -34,6 +34,9 @@ class cbactions
var $fav_tbl = 'favorites';
var $flag_tbl = 'flags';
var $type_tbl = 'videos';
var $type_id_field = 'videoid';
/**
* Class variable ie $somevar = SomeClass;
* $obj_class = 'somevar';
@ -107,10 +110,12 @@ class cbactions
/**
* Function used to check weather object already added to favorites or not
*/
function fav_check($id)
function fav_check($id,$uid=NULL)
{
global $db;
$results = $db->select($this->fav_tbl,"favorite_id"," id='".$id."' AND userid='".userid()."'");
if(!$uid)
$uid =userid();
$results = $db->select($this->fav_tbl,"favorite_id"," id='".$id."' AND userid='".$uid."' AND type='".$this->type."'");
if($db->num_rows>0)
return true;
else
@ -222,7 +227,7 @@ class cbactions
//Setting Emails
$emails = implode(',',$emails_array);
//Now Finally Sending Email
cbmail(array('to'=>$emails,'from'=>username(),'subject'=>$subj,'content'=>$msg));
cbmail(array('to'=>$emails,'from'=>username(),'subject'=>$subj,'content'=>$msg,'use_boundary'=>true));
}
}else{
e(sprintf(lang("share_video_no_user_err"),$this->name));
@ -235,6 +240,43 @@ class cbactions
e(sprintf(lang("obj_not_exists"),$this->name));
}
}
/**
* Get Used Favorites
*/
function get_favorites($uid=NULL,$limit=NULL,$cond=NULL,$order=NULL)
{
global $db;
if(!$uid)
$uid=userid();
if($cond)
$cond = " AND ".$cond;
$results = $db->select($this->fav_tbl.",".$this->type_tbl,"*"," ".$this->fav_tbl.".type='".$this->type."'
AND ".$this->fav_tbl.".userid='".$uid."'
AND ".$this->type_tbl.".".$this->type_id_field." = ".$this->fav_tbl.".id".$cond,$limit,$order);
if($db->num_rows>0)
return $results;
else
return false;
}
/**
* Function used remove video from favorites
*/
function remove_favorite($fav_id,$uid=NULL)
{
global $db;
if(!$uid)
$uid=userid();
if($this->fav_check($fav_id,$uid))
{
$db->delete($this->fav_tbl,array('userid','type','id'),array($uid,$this->type,$fav_id));
e(sprintf(lang('fav_remove_msg'),$this->name),m);
}else
e(sprintf(lang('unknown_favorite'),$this->name));
}
}
?>

View file

@ -5,8 +5,8 @@
* This class is used to create
* and manage categories
* its an abstract class
* it will be used in custom plugins or built-in plugins
* sections also use category system like videos, groups , channels etc
* it will be used in custom plugins or built-in sections
* sections like videos, groups , channels etc use this category system
*
* this abstract class has some rules
* each section's category column should be named as "category"

View file

@ -8,38 +8,50 @@ class ResizeImage
$array = getimagesize($file);
$width_orig= $array[0];
$height_orig= $array[1];
if($width_orig > $height_orig)
$ratio= $width_orig/$dim;
else $ratio=$height_orig/$dim;
$width=$width_orig/$ratio;
$height=$height_orig/$ratio;
if($aspect_ratio == false && $dim_h !=''){
$width = $dim;
$height = $dim_h;
}
$image_p = imagecreatetruecolor($width, $height);
if($ext=='jpg' || $ext=='JPG' || $ext=='JPEG'){
$image = imagecreatefromjpeg($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagejpeg($image_p,$des, 90);
}
if($ext=='png' || $ext=='PNG'){
$image = imagecreatefrompng($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagepng($image_p,$des);
}
if($ext=='gif' || $ext=='GIF'){
$image = imagecreatefromgif($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagegif($image_p,$des, 90);
}
if($width_orig > $dim || $height_orig>$dim )
{
if($width_orig > $height_orig)
{
$ratio= $width_orig/$dim;
}else{
if($dim_h==NULL)
$ratio=$height_orig/$dim;
else
$ratio=$height_orig/$dim_h;
}
$width=$width_orig/$ratio;
$height=$height_orig/$ratio;
if($aspect_ratio == false && $dim_h !=''){
$width = $dim;
$height = $dim_h;
}
$image_p = imagecreatetruecolor($width, $height);
if($ext=='jpg' || $ext=='JPG' || $ext=='JPEG'){
$image = imagecreatefromjpeg($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagejpeg($image_p,$des, 90);
}
if($ext=='png' || $ext=='PNG'){
$image = imagecreatefrompng($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagepng($image_p,$des);
}
if($ext=='gif' || $ext=='GIF'){
$image = imagecreatefromgif($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagegif($image_p,$des, 90);
}
}else
{
if(!file_exists($des))
copy($file,$des);
}
}
//Validating an Image

View file

@ -127,6 +127,21 @@ class myquery {
//Function Used To Update Videos Views
function UpdateVideoViews($vkey){increment_views($vkey,'video');}
/**
* Function used to check weather username exists not
*/
function check_user($username){
global $userquery;
return $userquery->username_exists($username);
}
/**
* Function used to check weather email exists not
*/
function check_email($email){
global $userquery;
return $userquery->email_exists($email);
}
/**
* Function used to delete comments
@ -317,21 +332,7 @@ class myquery {
return $msg;
}
//Function Used to Get Subscriber List
function GetSubscribers($user){
global $LANG;
$query = mysql_query("SELECT * FROM subscriptions WHERE subscribed_to ='".$user."'");
$data = mysql_num_rows($query);
return $data;
}
function GetSubscriptions($user){
global $LANG;
$query = mysql_query("SELECT * FROM subscriptions WHERE subscribed_user ='".$user."'");
$data = mysql_num_rows($query);
return $data;
}
//Function Used To Get Number Of Favourite Videos of user
@ -886,16 +887,8 @@ class myquery {
*/
function set_default_thumb($vid,$thumb)
{
global $db,$LANG;
$num = get_thumb_num($thumb);
$file = THUMBS_DIR.'/'.$thumb;
if(file_exists($file))
{
$db->update("video",array("default_thumb"),array($num)," videoid='$vid'");
e($LANG['vid_thumb_changed'],m);
}else{
e($LANG['vid_thumb_change_err']);
}
global $cbvid;
return $cbvid->set_default_thumb($vid,$thumb);
}

View file

@ -98,48 +98,28 @@ class pages{
redirect_to($newPage);
}
function createUrl($url,$params_array,$remove_param=false,$urlencode=false)
function create_url($params_array,$url=NULL,$remove_param=false,$urlencode=false)
{
//Cleaning Url and Create Existing Params as Array
$list1 = explode('&',$url);
$semi_clean_url = preg_replace('/&(.*)/','',$url);
$list2= explode('?',$semi_clean_url);
$clean_url = preg_replace('/\?(.*)/','',$semi_clean_url);
$lists=array_merge($list1,$list2);
foreach($lists as $list)
if($url==NULL or $url == 'auto')
{
preg_match('/http:\/\//',$list,$matches);
if(empty($matches[0]))
{
if($remove_param!=true)
{
list($param,$value) = explode('=',$list);
if(empty($params_array[$param]))
$params_array[$param] = $value;
else
$params_array[$param] = $params_array[$param];
}
}
if($_SERVER['QUERY_STRING'])
$url = '?'.$_SERVER['QUERY_STRING'];
}
$count = 0;
$total = count($params_array);
if($total>0 && !empty($params_array))
$new_link = '';
$new_link .= $url;
if(is_array($params_array))
{
foreach($params_array as $param => $value)
foreach($params_array as $name => $value)
{
$count++;
if($count==1)
$url_param .= '?';
$url_param .=$param.'='.$value;
if($count != $total)
$url_param .='&';
if($url)
$new_link .='&'.$name.'='.$value;
else
$new_link .='?'.$name.'='.$value;
}
}
$finalUrl = $clean_url.$url_param ;
if($urlencode ==true)
$finalUrl = urlencode($finalUrl);
return $finalUrl;
return $new_link;
}
//This Fucntion is used to Redirect to respective URL
@ -153,7 +133,7 @@ class pages{
/**
* Function used to create link
*/
function create_link($page,$link=NULL,$extra_params=NULL,$tag,$return_param=false)
function create_link($page,$link=NULL,$extra_params=NULL,$tag='<a #params#>#page#</a>',$return_param=false)
{
if($link==NULL or $link == 'auto')
{

View file

@ -165,11 +165,14 @@ class cbsearch
* it is used to get results within defined time span
* ie today, this week , this month or this year
*/
function date_margin($date_column='date_added')
function date_margin($date_column='date_added',$date_margin=NULL)
{
if(!empty($this->date_margin))
if(!$date_margin)
$date_margin = $this->date_margin;
if(!empty($date_margin))
{
switch($this->date_margin)
switch($date_margin)
{
case "today":
{

View file

@ -36,7 +36,7 @@ class signup {
* extra_params
* hint_1 [hint before field]
* hint_2 [hint after field]
* anchor_before [before after field]
* anchor_before [anchor before field]
* anchor_after [anchor after field]
* )
*/
@ -47,7 +47,7 @@ class signup {
$username = $default['username'];
$email = $default['email'];
$dcountry = $default['country'];
$dcountry = $default['country'] ? $default['country'] : $Cbucket->configs['default_country_iso2'];
$dob = $default['dob'];
$dob = $dob ? date("d-m-Y",strtotime($dob)) : '14-14-1989';
@ -148,6 +148,7 @@ class signup {
*/
function validate_form_fields($array=NULL)
{
global $userquery;
$fields = $this->load_signup_fields($array);
if($array==NULL)
@ -159,7 +160,7 @@ class signup {
//Mergin Array
$signup_fields = array_merge($fields,$this->custom_signup_fields);
//Now Validating Each Field 1 by 1
/*//Now Validating Each Field 1 by 1
foreach($signup_fields as $field)
{
$field['name'] = formObj::rmBrackets($field['name']);
@ -238,7 +239,8 @@ class signup {
}
}
}
}
}*/
validate_cb_form($signup_fields,$array);
}
@ -248,7 +250,7 @@ class signup {
*/
function signup_user($array=NULL)
{
global $LANG,$db;
global $LANG,$db,$userquery;
if($array==NULL)
$array = $_POST;
@ -259,6 +261,8 @@ class signup {
//checking terms and policy agreement
if($_POST['agree']!='yes')
e($LANG['usr_ament_err']);
if(!error())
{
$signup_fields = $this->load_signup_fields($array);
@ -352,6 +356,26 @@ class signup {
$db->Execute($query);
$insert_id = $db->insert_id();
$db->insert($userquery->dbtbl['user_profile'],array("userid"),array($insert_id));
if(!$userquery->perm_check('admin_add_user',true))
{
global $cbemail;
$tpl = $cbemail->get_template('email_verify_template');
$more_var = array
('{username}' => post('username'),
'{password}' => post('password'),
'{email}' => post('email'),
'{avcode}' => $avcode,
);
$var = array_merge($more_var,$var);
$subj = $cbemail->replace($tpl['email_template_subject'],$var);
$msg = $cbemail->replace($tpl['email_template'],$var);
//Now Finally Sending Email
cbmail(array('to'=>post('email'),'from'=>'webmaster@localhost','subject'=>$subj,'content'=>$msg));
}
return $insert_id;
}

View file

@ -56,7 +56,7 @@
$upload_fields = array_merge($upload_fields,$this->custom_form_fields);
//Now Validating Each Field 1 by 1
foreach($upload_fields as $field)
/*foreach($upload_fields as $field)
{
$field['name'] = formObj::rmBrackets($field['name']);
@ -137,7 +137,8 @@
}
}
}
}
}*/
validate_cb_form($upload_fields,$array);
}
function ValidateUploadForm()
@ -889,6 +890,75 @@
return $new_array;
}
/**
* function used to upload user avatar and or background
*/
function upload_user_file($type='a',$file,$uid)
{
global $db,$userquery,$imgObj;
$avatar_dir = BASEDIR.'/images/avatars/';
$bg_dir = BASEDIR.'/images/backgrounds/';
if($userquery->user_exists($uid))
{
switch($type)
{
case 'a':
case 'avatar':
{
if(file_exists($file['tmp_name']))
{
$ext = getext($file['name']);
$file_name = $uid.'.'.$ext;
$file_path = $avatar_dir.$file_name;
if(move_uploaded_file($file['tmp_name'],$file_path))
{
if(!$imgObj->ValidateImage($file_path,$ext))
{
e(lang("Invalid file type"));
@unlink($file_path);
}else{
$small_size = $avatar_dir.$uid.'-small.'.$ext;
$imgObj->CreateThumb($file_path,$file_path,AVATAR_SIZE,$ext);
$imgObj->CreateThumb($file_path,$small_size,AVATAR_SMALL_SIZE,$ext);
}
}else{
e(lang("An error occured "));
}
}
}
break;
case 'b':
case 'bg':
case 'background':
{
if(file_exists($file['tmp_name']))
{
$ext = getext($file['name']);
$file_name = $uid.'.'.$ext;
$file_path = $bg_dir.$file_name;
if(move_uploaded_file($file['tmp_name'],$file_path))
{
if(!$imgObj->ValidateImage($file_path,$ext))
{
e(lang("Invalid file type"));
@unlink($file_path);
}else{
$imgObj->CreateThumb($file_path,$file_path,BG_SIZE,$ext);
}
}else{
e(lang("An error occured While Uploading File!"));
}
}
}
break;
}
return $file_name;
}else
e(lang('user_doesnt_exist'));
}
}
?>

File diff suppressed because it is too large Load diff

View file

@ -22,6 +22,7 @@ class CBvideo extends CBCategory
var $action = ''; // variable used to call action class
var $email_template_vars = array();
var $dbtbl = array('video'=>'video');
/**
* __Constructor of CBVideo
*/
@ -125,10 +126,12 @@ class CBvideo extends CBCategory
/**
* Function used to update video
*/
function update_video()
function update_video($array=NULL)
{
global $eh,$Cbucket,$db,$Upload;
$Upload->validate_video_upload_form(NULL,TRUE);
if(empty($eh->error_list))
@ -146,7 +149,9 @@ class CBvideo extends CBCategory
if(count($Upload->custom_form_fields)>0)
$upload_fields = array_merge($upload_fields,$Upload->custom_form_fields);
$array = $_POST;
if(!$array)
$array = $_POST;
$vid = $array['videoid'];
if(is_array($_FILES))
@ -196,11 +201,14 @@ class CBvideo extends CBCategory
$query .= ',';
}*/
if(has_access('admin_access'))
if(has_access('admin_access') && !empty($array['status']))
{
$query_field[] = 'status';
$query_field[] = 'duration';
$query_val[] = $array['status'];
}
if(has_access('admin_access') && !empty($array['duration']))
{
$query_field[] = 'duration';
$query_val[] = $array['duration'];
}
@ -209,6 +217,9 @@ class CBvideo extends CBCategory
e("You are not logged in");
}elseif(!$this->video_exists($vid)){
e("Video deos not exist");
}elseif(!$this->is_video_owner($vid,userid()) && !has_access('admin_access'))
{
e("You cannot edit this video");
}else{
$db->update('video',$query_field,$query_val," videoid='$vid'");
e("Video details have been updated",m);
@ -227,22 +238,29 @@ class CBvideo extends CBCategory
if($this->video_exists($vid))
{
$vdetails = $this->get_video($vid);
//list of functions to perform while deleting a video
$del_vid_funcs = $this->video_delete_functions;
if(is_array($del_vid_funcs))
if($this->is_video_owner($vid,userid()) || has_access('admin_access'))
{
foreach($del_vid_funcs as $func)
//list of functions to perform while deleting a video
$del_vid_funcs = $this->video_delete_functions;
if(is_array($del_vid_funcs))
{
if(function_exists($func))
foreach($del_vid_funcs as $func)
{
$func($vdetails);
if(function_exists($func))
{
$func($vdetails);
}
}
}
//Finally Removing Database entry of video
$db->execute("DELETE FROM video WHERE videoid='$vid'");
e(lang("class_vdo_del_msg"),m);
}else{
e(lang("You cannot delete this video"));
}
//Finally Removing Database entry of video
$db->execute("DELETE FROM video WHERE videoid='$vid'");
e(lang("class_vdo_del_msg"),m);
}else{
e(lang("class_vdo_del_err"));
}
@ -319,31 +337,85 @@ class CBvideo extends CBCategory
*/
function get_videos($params)
{
$cond_array = array();
global $db;
$limit = $params['limit'];
$order = $params['order'];
$cond = "";
//Setting Category Condition
if($params['category'])
{
if(is_array($params['category']))
if($cond!='')
$cond .= ' AND ';
$cond .= " (";
if(!is_array($params['category']))
{
foreach($params['category'] as $cat_params)
{
$cond_array[] = " category ='$cat_params' ";
}
}else{
$cond_array[] = " category ='".$params['category']."' ";
$cats = explode(',',$params['categgory']);
}else
$cats = $params['category'];
$count = 0;
foreach($cats as $cat_params)
{
$count ++;
if($count>1)
$cond .=" OR ";
$cond .= " category LIKE '%#$cat_params#%' ";
}
$cond .= ")";
}
//date span
switch($param['date_span'])
if($params['date_span'])
{
case 'today';
{
}
if($cond!='')
$cond .= ' AND ';
$cond .= " ".cbsearch::date_margin("date_added",$params['date_span']);
}
//uid
if($params['user'])
{
if($cond!='')
$cond .= ' AND ';
$cond .= " userid='".$params['user']."'";
}
$tag_n_title='';
//Tags
if($params['tags'])
{
if($tag_n_title!='')
$tag_n_title .= ' OR ';
$tag_n_title .= " tags LIKE '%".$params['tags']."%'";
}
//TITLE
if($params['title'])
{
if($tag_n_title!='')
$tag_n_title .= ' OR ';
$tag_n_title .= " title LIKE '%".$params['tags']."%'";
}
if($tag_n_title)
{
if($cond!='')
$cond .= ' AND ';
$cond .= " ($tag_n_title) ";
}
$result = $db->select('video','*',$cond,$limit,$order);
if($params['count_only'])
return $result = $db->count('video','*',$cond);
if($params['assign'])
assign($params['assign'],$result);
else
return $result;
}
@ -406,6 +478,8 @@ class CBvideo extends CBCategory
$this->action->name = 'video';
$this->action->obj_class = 'cbvideo';
$this->action->check_func = 'video_exists';
$this->action->type_tbl = $this->dbtbl['video'];
$this->action->type_id_field = 'videoid';
}
@ -509,5 +583,41 @@ class CBvideo extends CBCategory
$this->search->search_type['video']['fields'] = $fields;
}
/**
* Function used to update video and set a thumb as default
* @param VID
* @param THUMB NUM
*/
function set_default_thumb($vid,$thumb)
{
global $db,$LANG;
$num = get_thumb_num($thumb);
$file = THUMBS_DIR.'/'.$thumb;
if(file_exists($file))
{
$db->update("video",array("default_thumb"),array($num)," videoid='$vid'");
e($LANG['vid_thumb_changed'],m);
}else{
e($LANG['vid_thumb_change_err']);
}
}
/**
* Function used to check weather current user is video owner or not
*/
function is_video_owner($vid,$uid)
{
global $db;
$result = $db->count($this->dbtbl['video'],'videoid',"videoid='$vid' AND userid='$uid' ");
if($result>0)
return true;
else
return false;
}
}
?>

View file

@ -66,7 +66,7 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
require_once('classes/video.class.php');
require_once('classes/player.class.php');
require_once('classes/cbemail.class.php');
require_once('classes/pm.class.php');
require_once 'languages.php';
@ -93,7 +93,7 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
$cbplayer = new CBPlayer();
$cbemail = new CBEmail();
$cbsearch = new CBSearch();
$cbpm = new cb_pm();
require 'defined_links.php';
@ -278,13 +278,7 @@ error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED);
$swfobj = new SWFObject();
//Initializng Userquery class
$userquery->init();
$is_admin = $userquery->admin_check();
if ($is_admin == 1)
{
Assign('is_admin',$is_admin);
}
$cbpm->init();
$thisurl = curPageURL();
Assign('THIS_URL', $thisurl);
@ -347,13 +341,6 @@ error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED);
require('modules.php');
//Checking what permissions do logged in user have
if(user_id())
{
$userquery->permission = $userquery->get_user_level(userid());
}else
$userquery->permission = $userquery->get_user_level(4,TRUE);
//Checking Website Template
$Cbucket->set_the_template();
@ -379,6 +366,7 @@ $Smarty->assign_by_ref('cbtpl',$cbtpl);
$Smarty->assign_by_ref('cbobjects',$cbobjects);
$Smarty->assign_by_ref('cbplayer',$cbplayer);
$Smarty->assign_by_ref('cbsearch',$cbsearch);
$Smarty->assign_by_ref('cbpm',$cbpm);
/*
REGISERTING FUNCTION FOR SMARTY TEMPLATES
@ -401,6 +389,9 @@ $Smarty->register_function('FlashPlayer','flashPlayer');
$Smarty->register_function('HQFlashPlayer','HQflashPlayer');
$Smarty->register_function('link','cblink');
$Smarty->register_function('show_share_form','show_share_form');
$Smarty->register_function('lang','smarty_lang');
$Smarty->register_function('get_videos','get_videos');
$Smarty->register_function('private_message','private_message');
$Smarty->register_modifier('SetTime','SetTime');
$Smarty->register_modifier('getname','getname');
@ -411,6 +402,13 @@ $Smarty->register_modifier('post_form_val','post_form_val');
$Smarty->register_modifier('request_form_val','request_form_val');
$Smarty->register_modifier('get_thumb_num','get_thumb_num');
$Smarty->register_modifier('ad','ad');
$Smarty->register_modifier('get_user_level','get_user_level');
$Smarty->register_modifier('is_online','is_online');
$Smarty->register_modifier('get_age','get_age');
$Smarty->register_modifier('outgoing_link','outgoing_link');
$Smarty->register_modifier('nicetime','nicetime');
$Smarty->register_modifier('country','get_country');
/**
@ -418,6 +416,7 @@ $Smarty->register_modifier('ad','ad');
*/
$cbvideo->init_search();
/*
* 123465798
*/

View file

@ -21,10 +21,6 @@ Assign('admtheme',BASEURL.'/'.ADMINDIR.'/'.TEMPLATEFOLDER.'/'.TEMPLATE.'/theme')
Assign('template_dir',TEMPLATEDIR);
Assign('style_dir',LAYOUT);
if($userquery->logincheck2()){
Assign('logged_user',$_SESSION['username']);
Assign('new_msgs',$userquery->GetNewMsgs($_SESSION['username']));
}
//Checking Website is closed or not
if($row['closed'] == 1){

View file

@ -31,8 +31,6 @@
$db->debug = false;
$db->charpage = 'cp_utf8';
$db->charset = 'utf8';
$db->Execute("set names 'utf8'");
$db->Execute("set COLLATION_CONNECTION = 'utf8_general_ci'");
if(!$db->Connect($DBHOST, $DBUSER, $DBPASS, $DBNAME))
{
exit($db->ErrorMsg());

View file

@ -14,6 +14,7 @@
####################################################################
*/
define("SHOW_COUNTRY_FLAG",TRUE);
require 'define_php_links.php';
include_once 'upload_forms.php';
@ -126,7 +127,7 @@
}
function Assign($name,$value){
CBTemplate::assign($name,$value);
CBTemplate::assign($name,$value);
}
//Funtion of Random String
@ -206,6 +207,9 @@
$to = $array['to'];
$from = $array['from'];
if($array['nl2br'])
$content = nl2br($content);
//Setting Boundary
$mime_boundary = "----ClipBucket Emailer----".md5(time());
@ -223,22 +227,29 @@
$headers .= "X-Mailer: ClipBucket v2 \r\n";
//Starting Message
$message = "--$mime_boundary--\n";
$message .= "Content-Type: text/html; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
if($array['user_boundary'])
{
$message = "--$mime_boundary--\n";
$message .= "Content-Type: text/html; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
}
# CHecking Content
if(preg_match('/<html>/',$content,$matches))
{
if(empty($matches[0]))
if(empty($matches[1]))
{
$content = wrap_email_content($content);
}
}
$message .= $content;
//Ending Message
$message .= "--$mime_boundary--\n\n";
if($array['user_boundary'])
{
//Ending Message
$message .= "--$mime_boundary--\n";
}
$email = mail ($to,$subject,$message,$headers);
if( $email == true ){
return true;
@ -362,12 +373,13 @@
//Function Used To Validate Email
function isValidEmail($email){
$pattern = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$";
if (eregi($pattern, $email)){
$pattern = "/[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/";
preg_match($pattern, $email,$matches);
if ($matches[0]!=''){
return true;
}
else {
return true;
return false;
}
}
@ -430,7 +442,7 @@
* @param ARRAY video_details, or videoid will also work
*/
function get_thumb($vdetails,$num='default',$multi=false,$count=false,$return_full_path=true){
function get_thumb($vdetails,$num='default',$multi=false,$count=false,$return_full_path=true,$return_big=true){
global $db,$Cbucket,$myquery;
$num = $num ? $num : 'default';
#checking what kind of input we have
@ -498,10 +510,13 @@
$thumb_parts = explode('/',$thumb);
$thumb_file = $thumb_parts[count($thumb_parts)-1];
if($return_full_path)
$thumbs[] = THUMBS_URL.'/'.$thumb_file;
else
$thumbs[] = $thumb_file;
if(!is_big($thumb_file) || $return_big)
{
if($return_full_path)
$thumbs[] = THUMBS_URL.'/'.$thumb_file;
else
$thumbs[] = $thumb_file;
}
}
if(count($thumbs)==0)
@ -533,6 +548,19 @@
}
}
/**
* Function used to check weaether given thumb is big or not
*/
function is_big($thumb_file)
{
$total = strlen($thumb_file);
$name = substr($thumb_file,$strlen-7,3);
if($name=='big')
return true;
else
return false;
}
function GetThumb($vdetails,$num='default',$multi=false,$count=false)
{
@ -861,7 +889,7 @@
$fields_query .= $flds[$i]."=".$val."";
}
if($total_fields!=$count)
$fields_query .= ',';
$fields_query .= ' AND ';
}
//Complete Query
$query = "DELETE FROM $tbl WHERE $fields_query $ep";
@ -958,6 +986,7 @@
function e($msg=NULL,$type='e',$id=NULL)
{
global $eh;
if(!empty($msg))
return $eh->e($msg,$type,$id);
}
@ -1330,8 +1359,8 @@
$flv_url = $file;
$embed = $param['embed'];
$code = $param['code'];
$height = $param['height'] = $param['height'] ? $param['height'] : 360;
$width = $param['width'] = $param['width'] ? $param['width'] : 450;
$height = $param['height'] = $param['height'] ? $param['height'] : config('player_height');
$width = $param['width'] = $param['width'] ? $param['width'] : config('player_width');
if(count($Cbucket->actions_play_video)>0)
{
@ -1545,9 +1574,13 @@
function input_value($params,&$Smarty)
{
$input = $params['input'];
$value = $input['value'];
if($input['value_field']=='checked')
$value = $input['checked'];
if($input['return_checked'])
return $input['checked'];
if(function_exists($input['display_function']))
return $input['display_function']($input['value']);
return $input['display_function']($value);
else
return $input['value'];
}
@ -1662,6 +1695,7 @@
$ClipBucket->template_files[] = $file;
}
/**
* Function used to call display
*/
@ -1811,8 +1845,8 @@
if($filter)
return form_val($_GET[$val]);
else
$_GET[$val];
}
return $_GET[$val];
}function get($val){ return get_form_val($val); }
/**
* Function used to get value form $_POST
@ -1825,6 +1859,7 @@
$_POST[$val];
}
/**
* Function used to get value from $_REQUEST
*/
@ -1843,7 +1878,17 @@
function lang($var)
{
global $LANG;
if($LANG[$var])
return $LANG[$var];
else
return $var;
}
function smarty_lang($param)
{
if($param['assign']=='')
return lang($param['code']);
else
assign($param['assign'],lang($param['code']));
}
@ -2201,6 +2246,252 @@
$records = $total/$count;
return $total_pages = round($records+0.49,0);
}
/**
* Function used to return level name
* @param levelid
*/
function get_user_level($id)
{
global $userquery;
return $userquery->usr_levels[$id];
}
/**
* This function used to check
* weather user is online or not
* @param : last_active time
* @param : time margin
*/
function is_online($time,$margin='5')
{
$margin = $margin*60;
$active = strtotime($time);
$curr = time();
$diff = $curr - $active;
if($diff > $margin)
return 'offline';
else
return 'online';
}
/**
* ClipBucket Form Validator
* this function controls the whole logic of how to operate input
* validate it, generate proper error
*/
function validate_cb_form($input,$array)
{
if(is_array($input))
foreach($input as $field)
{
$field['name'] = formObj::rmBrackets($field['name']);
//pr($field);
$title = $field['title'];
$val = $array[$field['name']];
$req = $field['required'];
$invalid_err = $field['invalid_err'];
$function_error_msg = $field['function_error_msg'];
if(is_string($val))
$length = strlen($val);
$min_len = $field['min_length'];
$min_len = $min_len ? $min_len : 0;
$max_len = $field['max_length'] ;
$rel_val = $array[$field['relative_to']];
if(empty($invalid_err))
$invalid_err = sprintf("Invalid '%s'",$title);
if(is_array($array[$field['name']]))
$invalid_err = '';
//Checking if its required or not
if($req == 'yes')
{
if(empty($val) && !is_array($array[$field['name']]))
{
e($invalid_err);
$block = true;
}else{
$block = false;
}
}
$funct_err = is_valid_value($field['validate_function'],$val);
if($block!=true)
{
//Checking Syntax
if(!$funct_err)
{
if(!empty($function_error_msg))
e($function_error_msg);
elseif(!empty($invalid_err))
e($invalid_err);
}elseif(!is_valid_syntax($field['syntax_type'],$val))
{
if(!empty($invalid_err))
e($invalid_err);
}
elseif(isset($max_len))
{
if($length > $max_len || $length < $min_len)
e(sprintf(" please enter '%s' value between '%s' and '%s'",
$title,$field['min_length'],$field['max_length']));
}elseif(function_exists($field['db_value_check_func']))
{
$db_val_result = $field['db_value_check_func']($val);
if($db_val_result != $field['db_value_exists'])
if(!empty($field['db_value_err']))
e($field['db_value_err']);
elseif(!empty($invalid_err))
e($invalid_err);
}elseif($field['relative_type']!='')
{
switch($field['relative_type'])
{
case 'exact':
{
if($rel_val != $val)
{
if(!empty($field['relative_err']))
e($field['relative_err']);
elseif(!empty($invalid_err))
e($invalid_err);
}
}
break;
}
}
}
}
}
/**
* Function used to check weather tempalte file exists or not
* input path to file
*/
function template_file_exists($file,$dir)
{
if(!file_exists($dir.'/'.$file) && !empty($file))
{
echo sprintf(lang("temp_file_load_err"),$file,$dir);
return false;
}else
return true;
}
/**
* Function used to count age from date
*/
function get_age($input)
{
$time = strtotime($input);
$iMonth = date("m",$time);
$iDay = date("d",$time);
$iYear = date("Y",$time);
$iTimeStamp = (mktime() - 86400) - mktime(0, 0, 0, $iMonth, $iDay, $iYear);
$iDays = $iTimeStamp / 86400;
$iYears = floor($iDays / 365 );
return $iYears;
}
/**
* Function used to check time span
* A time difference function that outputs the
* time passed in facebook's style: 1 day ago,
* or 4 months ago. I took andrew dot
* macrobert at gmail dot com function
* and tweaked it a bit. On a strict enviroment
* it was throwing errors, plus I needed it to
* calculate the difference in time between
* a past date and a future date.
* thanks to yasmary at gmail dot com
*/
function nicetime($date)
{
if(empty($date)) {
return lang('no_date_provided');
}
$periods = array(lang("second"), lang("minute"), lang("hour"), lang("day"), lang("week"), lang("month"), lang("year"), lang("decade"));
$lengths = array(lang("60"),lang("60"),lang("24"),lang("7"),lang("4.35"),lang("12"),lang("10"));
$now = time();
$unix_date = strtotime($date);
// check validity of date
if(empty($unix_date)) {
return lang("bad_date");
}
// is it future date or past date
if($now > $unix_date) {
$difference = $now - $unix_date;
$tense = "ago";
} else {
$difference = $unix_date - $now;
$tense = "from now";
}
for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
$difference /= $lengths[$j];
}
$difference = round($difference);
if($difference != 1) {
$periods[$j].= "s";
}
return "$difference $periods[$j] {$tense}";
}
/**
* Function used to format outgoing link
*/
function outgoing_link($out)
{
preg_match("/http/",$out,$matches);
if(empty($matches[0]))
$out = "http://".$out;
return '<a href="'.$out.'" target="_blank">'.$out.'</a>';
}
/**
* Function used to get country via country code
*/
function get_country($code)
{
global $db;
$result = $db->select("countries","name_en,iso2"," iso2='$code' OR iso3='$code'");
if($db->num_rows>0)
{
$flag = '';
$result = $result[0];
if(SHOW_COUNTRY_FLAG)
$flag = '<img src="'.BASEURL.'/images/icons/country/'.$result['iso2'].'.png" alt="" border="0">&nbsp;';
return $flag.$result['name_en'];
}else
return false;
}
/**
* function used to get vidos
*/
function get_videos($param)
{
global $cbvideo;
return $cbvideo->get_videos($param);
}
?>

View file

@ -165,7 +165,7 @@
/**
/**
* Function used to add custom upload fields
* In this you will provide an array that has a complete
* details of the field such as 'name',validate_func etc

View file

@ -72,6 +72,17 @@
return $title;
}
/**
* Function used to display Private Message
*/
function private_message($array)
{
global $cbpm;
$array = $array['pm'];
echo $array['message_content'];
$cbpm->parse_attachments($array['message_attachments']);
}
?>

View file

@ -0,0 +1,120 @@
<?php
function get_preg_expression($mode)
{
switch ($mode)
{
case 'email':
return '(?:[a-z0-9\'\.\-_\+\|]++|&amp;)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
break;
case 'bbcode_htm':
return array(
'#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
'#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&amp;|\?)sid=[0-9a-f]{32})?">.*?</a><!\-\- l \-\->#',
'#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">.*?</a><!\-\- \1 \-\->#',
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
'#<!\-\- .*? \-\->#s',
'#<.*?>#s',
);
break;
// Whoa these look impressive!
// The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses
// can be found in the develop directory
case 'ipv4':
return '#^(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$#';
break;
case 'ipv6':
return '#^(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:::(?:[\dA-F]{1,4}:){5}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:):(?:[\dA-F]{1,4}:){4}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,2}:(?:[\dA-F]{1,4}:){3}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,3}:(?:[\dA-F]{1,4}:){2}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,4}:(?:[\dA-F]{1,4}:)(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,5}:(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,6}:[\dA-F]{1,4})|(?:(?:[\dA-F]{1,4}:){1,7}:))$#i';
break;
case 'url':
case 'url_inline':
$inline = ($mode == 'url') ? ')' : '';
$scheme = ($mode == 'url') ? '[a-z\d+\-.]' : '[a-z\d+]'; // avoid automatic parsing of "word" in "last word.http://..."
// generated with regex generation file in the develop folder
return "[a-z]$scheme*:/{2}(?:(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'www_url':
case 'www_url_inline':
$inline = ($mode == 'www_url') ? ')' : '';
return "www\.(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'relative_url':
case 'relative_url_inline':
$inline = ($mode == 'relative_url') ? ')' : '';
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
}
return '';
}
function user_ipwhois($ip)
{
$ipwhois = '';
// Check IP
// Only supporting IPv4 at the moment...
if (empty($ip) || !preg_match(get_preg_expression('ipv4'), $ip))
{
return '';
}
if (($fsk = @fsockopen('whois.arin.net', 43)))
{
// CRLF as per RFC3912
fputs($fsk, "$ip\r\n");
while (!feof($fsk))
{
$ipwhois .= fgets($fsk, 1024);
}
@fclose($fsk);
}
$match = array();
// Test for referrals from ARIN to other whois databases, roll on rwhois
if (preg_match('#ReferralServer: whois://(.+)#im', $ipwhois, $match))
{
if (strpos($match[1], ':') !== false)
{
$pos = strrpos($match[1], ':');
$server = substr($match[1], 0, $pos);
$port = (int) substr($match[1], $pos + 1);
unset($pos);
}
else
{
$server = $match[1];
$port = 43;
}
$buffer = '';
if (($fsk = @fsockopen($server, $port)))
{
fputs($fsk, "$ip\r\n");
while (!feof($fsk))
{
$buffer .= fgets($fsk, 1024);
}
@fclose($fsk);
}
// Use the result from ARIN if we don't get any result here
$ipwhois = (empty($buffer)) ? $ipwhois : $buffer;
}
return $ipwhois = htmlspecialchars($ipwhois);
}
function cb_who_is_generator($input)
{
}

View file

@ -10,6 +10,8 @@ define('THIS_PAGE','index');
require 'includes/config.inc.php';
$pages->page_redir();
pr($userquery);
if(isset($_GET['cb_ver']) && $is_admin)
{
$msg = "ClipBucket&nbsp;".CB_VERSION."";

View file

@ -275,3 +275,16 @@
"swfobject/expressInstall.swf", flashvars
, params);
}
/**
* Function used to delete video
*/
function delete_video(obj,vid,msg,url)
{
$("#"+obj+'-'+vid).click(function () {
if (confirm(msg)) {
document.location = url;
}
});
}

View file

@ -0,0 +1,11 @@
/**
* jQuery.ScrollTo - Easy element scrolling using jQuery.
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* Date: 5/25/2009
* @author Ariel Flesler
* @version 1.4.2
*
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
*/
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

View file

@ -1,107 +1,104 @@
<?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']));
//Removing A Video
if(!empty($_POST['delete_videoid']) && !isset($_POST['delete_videos'])){
$videoid = $_POST['delete_videoid'];
$msg = $myquery->DeleteUserVideo($videoid ,$_SESSION['username']);
$mode = $_GET['mode'];
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,VLISTPP);
switch($mode)
{
case 'uploaded':
default:
{
assign('mode','uploaded');
//Deleting Video
if(!empty($_GET['vid_delete']))
{
$video = mysql_clean($_GET['vid_delete']);
$cbvideo->delete_video($video);
}
//Deleting Videos
if(isset($_POST['delete_videos']))
{
for($id=0;$id<=VLISTPP;$id++)
{
$cbvideo->delete_video($_POST['check_vid'][$id]);
}
$eh->flush();
e(lang("vdo_multi_del_erro"),m);
}
//Getting Video List
$vid_array = array('user'=>$udetails['userid'],'limit'=>$get_limit);
if(get('query')!='')
{
$vid_array['title'] = mysql_clean(get('query'));
$vid_array['tags'] = mysql_clean(get('query'));
}
$videos = get_videos($vid_array);
Assign('uservids', $videos);
//Collecting Data for Pagination
$vid_array['count_only'] = true;
$total_rows = get_videos($vid_array);
$total_pages = count_pages($total_rows,VLISTPP);
//Pagination
$pages->paginate($total_pages,$page);
}
break;
case 'favorites':
{
assign('mode','favorites');
//Removing video from favorites
if(!empty($_GET['vid_delete']))
{
$video = mysql_clean($_GET['vid_delete']);
$cbvideo->action->remove_favorite($video);
}
//Removing Multiple Videos
if(isset($_POST['delete_fav_videos']))
{
for($id=0;$id<=VLISTPP;$id++)
{
$cbvideo->delete_video($_POST['check_vid'][$id]);
}
$eh->flush();
e(lang("vdo_multi_del_fav_msg"),m);
}
if(get('query')!='')
{
$condi = " (video.title LIKE '%".mysql_clean(get('query'))."%' OR video.tags LIKE '%".mysql_clean(get('query'))."%' )";
}
$videos = $cbvid->action->get_favorites(userid(),$get_limit,$condi);
Assign('uservids', $videos);
}
break;
}
//Removing Multiple Videos
if(isset($_POST['delete_videos'])){
$query = mysql_query("SELECT * FROM video WHERE username = '".$_SESSION['username']."' ");
while($data = mysql_fetch_array($query)){
if(@$_POST[$data['videokey']] == 'yes'){
$myquery->DeleteUserVideo($data['videoid'] ,$_SESSION['username']);
}
}
$msg = $LANG['vdo_del_selected'];
}
//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";
//Getting Order
$orders = array(
'mr' => 'ORDER by date_added DESC',
'fr' => "AND featured = 'yes'",
'mv' => "ORDER by views DESC"
);
@$order = mysql_clean($_GET['order']);
@$orderby = $orders[$order];
if(empty($orderby)){
$orderby = "ORDER BY date_added DESC";
}
$sql = "SELECT * FROM video WHERE username='".$user."' $orderby $query_limit ";
$sql_p = "SELECT * FROM video WHERE username='".$user."' ";
if($order=='fr'){
$sql_p = "SELECT * FROM video WHERE username='".$user."' AND featured = 'yes'";
}
$data = $db->Execute($sql);
$videos = $data->getrows();
$total_videos = $data->recordcount()+0;
for($id=0;$id<$total_videos;$id++){
$query=mysql_query("SELECT * FROM video_detail WHERE flv='".$videos[$id]['flv']."'");
$data = mysql_fetch_array($query);
$videos[$id]['thumb'] = GetThumb($videos[$id]['flv']);
$videos[$id]['duration'] = SetTime($videos[$id]['duration']);
$videos[$id]['raw_file'] = $data['original'] ? $data['original'] : 'No Raw File';
$videos[$id]['show_rating'] = pullRating($videos[$id]['videoid'],false,false,false);
$videos[$id]['url'] = VideoLink($videos[$id]['videokey'],$videos[$id]['title']);
}
Assign('videos',$videos);
Assign('total_videos',$total_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,'?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);
if(@$_GET['show']!='videos'){
Template('header.html');
Template('message.html');
Template('manage_videos.html');
Template('footer.html');
}else{
Assign('full_view','no');
Template('manage_videos.html');
}
template_files('manage_videos.html');
display_it();
?>

View file

@ -1,35 +1,17 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
define("THIS_PAGE",'myaccount');
require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
//Get User Details
$user = $_SESSION['userid'];
$username = $_SESSION['username'];
$data = $userquery->GetUserData($user);
//Get Number Of Objects Of User
$data['uploaded_watched'] = $myquery->GetUploadedWatched($username);
$data['subscribed_user'] = $myquery->GetSubscribers($username);
$data['user_subscriptions'] = $myquery->GetSubscriptions($username);
$data['total_channel_comments'] = $myquery->GetTotalChannelComments($username);
$data['total_favourites'] = $myquery->GetTotalFavourites($user);
$data['create_groups'] = $myquery->GetUserCreateGroups($username);
$data['joined_groups'] = $myquery->GetUserJoinGroups($username);
Assign('data',$data);
subtitle('my_account');
@Assign('msg',$msg);
Template('header.html');
Template('message.html');
Template('myaccount.html');
Template('footer.html');
assign('user',$userquery->get_user_details(userid()));
template_files('myaccount.html');
display_it();
?>

View file

@ -46,7 +46,7 @@ if(!function_exists('cbplayer'))
$code .= " allowFullScreen: \"true\"\n";
$code .= "};\n";
$code .= "swfobject.embedSWF(\"".PLAYER_URL."/cbplayer/videoPlayer.swf\",
\"".$data['player_div']."\", \"".config('player_width')."\", \"".config('player_height')."\", \"9.0.115\",
\"".$data['player_div']."\", \"".$data['width']."\", \"".$data['height']."\", \"9.0.115\",
\"swfobject/expressInstall.swf\", flashvars
, params)";
return $code;

View file

@ -37,7 +37,7 @@ if(!function_exists('flowplayer'))
$code = '';
if($vid_file)
{
$code .= "swfobject.embedSWF(\"".PLAYER_URL.'/flow_player/flowplayer.swf'."\", \"videoPlayer\", \"500\", \"320\", \"9.0.0\", null, { \n";
$code .= "swfobject.embedSWF(\"".PLAYER_URL.'/flow_player/flowplayer.swf'."\", \"videoPlayer\", \"".$vdata['width']."\", \"".$vdata['height']."\", \"9.0.0\", null, { \n";
$code .= "config: \"{'clip': '".BASEURL.'/files/videos/'.$vid_file."' }}\"\n" ;
$code .= "} \n";
$code .= "); \n";

View file

@ -39,11 +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')));
register_action(array('bb_to_html'=>array('comment','description','pm_compose_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('desc'); </script>",'before_pm_compose_box');
//Adding JS Code
$Cbucket->addJS(array('bbcode_js/ed.js'=>'global'));
//Creating Menu In Admin Panel

162
upload/private_message.php Normal file
View file

@ -0,0 +1,162 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
define("THIS_PAGE",'private_message');
require 'includes/config.inc.php';
//Adding JS Scroll
add_js('jquery_plugs/compressed/jquery.scrollTo-min.js');
$userquery->logincheck();
$udetails = $userquery->get_user_details(userid());
assign('user',$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));
$mode = $_GET['mode'];
//Deleting Multple Message
if(isset($_POST['delete_pm']))
{
if($mode=='inbox' || $mode =='notification')
$box = 'in';
else
$box = 'out';
$total = count($_POST['msg_id']);
for($pms=0;$pms<$total;$pms++)
{
if(!empty($_POST['msg_id'][$pms]))
{
$cbpm->delete_msg($_POST['msg_id'][$pms],userid(),$box);
}
$eh->flush();
e(lang('private_messags_deleted'),'m');
}
}
switch($mode)
{
case 'inbox':
default:
{
assign('mode','inbox');
//Deleting Message
if($_GET['delete_mid'])
{
$mid = mysql_clean($_GET['delete_mid']);
$cbpm->delete_msg($mid,userid());
}
//Getting Message
if($_GET['mid'])
{
$mid = mysql_clean($_GET['mid']);
$pr_msg = $cbpm->get_inbox_message($mid,userid());
if($pr_msg['message_status'] =='unread')
$cbpm->set_message_status($mid,'read');
assign('pr_msg',$pr_msg);
}
//Get User Messages
assign('user_msgs',$cbpm->get_user_inbox_messages(userid()));
}
break;
case 'sent':
{
assign('mode','sent');
//Deleting Message
if($_GET['delete_mid'])
{
$mid = mysql_clean($_GET['delete_mid']);
$cbpm->delete_msg($mid,userid(),'out');
}
//Getting Message
if($_GET['mid'])
{
$mid = mysql_clean($_GET['mid']);
assign('pr_msg',$cbpm->get_outbox_message($mid,userid()));
}
//Get User Messages
assign('user_msgs',$cbpm->get_user_outbox_messages(userid()));
}
break;
case 'notification':
{
assign('mode','notification');
//Deleting Message
if($_GET['delete_mid'])
{
$mid = mysql_clean($_GET['delete_mid']);
$cbpm->delete_msg($mid,userid());
}
//Getting Message
if($_GET['mid'])
{
$mid = mysql_clean($_GET['mid']);
assign('pr_msg',$cbpm->get_inbox_message($mid,userid()));
}
//Get User Messages
assign('user_msgs',$cbpm->get_user_notification_messages(userid()));
}
break;
case 'new_msg':
case 'compose':
{
assign('mode','new_msg');
//Checkking If reply
if($_GET['reply']!='')
{
$mid = mysql_clean($_GET['reply']);
if(!isset($_POST['send_message']) && $cbpm->is_reply($mid,userid()))
{
$reply_msg = $cbpm->get_inbox_message($mid,userid());
$_POST['to'] = $userquery->get_user_field_only($reply_msg['message_from'],'username');
$_POST['subj'] = "Re:".$reply_msg['message_subject'];
}
}
//sending message
if(isset($_POST['send_message']))
{
$array = $_POST;
$array['reply_to'] = mysql_clean($_GET['reply']);
$array['is_pm'] = true;
$array['from'] = userid();
$cbpm->send_pm($array);
if(!error())
$_POST = '';
}
}
}
template_files('private_message.html');
display_it();
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 526 B

View file

@ -1,12 +1,16 @@
{assign var='comments' value=$myquery->get_comments($id,$type)}
{foreach from=$comments item=comment}
{section loop=$comments name=comment}
<div id="comment_{$comment_id}" class="comment">
{if $comment.userid !='' && $comment.userid!=0}
<a href="#">{assign var=name value=$userquery->get_user_field($comment.userid,username)}{$name.username}</a>
{if $comments[comment].userid !='' && $comments[comment].userid!=0}
<a href="#">{assign var=name value=$userquery->get_user_field($comments[comment].userid,username)}{$name.username}</a>
{else}
<a href='#comment_{$comment_id}'>{$comment.anonym_name}</a>
<a href='#comment_{$comments[comment].comment_id}'>{$comments[comment].anonym_name}</a>
{/if}
wrote on {$comment.date_added|date_format}<br />
{$comment.comment|comment}
wrote on {$comments[comment].date_added|date_format}<br />
{$comments[comment].comment|comment}
</div>
{/foreach}
{sectionelse}
<div align="center" class="no_comments">
<em>No Comments</em>
</div>
{/section}

View file

@ -0,0 +1,24 @@
<div class="account_head_container">
<div class="account_thumb_container" align="center">
<img src="{$userquery->getUserThumb($user)}" alt="{$user.username}" class="account_thumb"><br />
<a href="{$userquery->profile_link($user)}">View Profile / Channel </a></div>
<div class="stats">
<span class="account_stat">username : <strong>{$user.username}</strong></span>
<span class="account_stat">joined : <strong>{$user.doj|date_format}</strong></span>
<span class="account_stat">last logged in : <strong>{$user.last_logged|nicetime}</strong></span>
<span class="account_stat">last active : <strong>{$user.last_active|nicetime}</strong></span>
<span class="account_stat">total logins : <strong>{$user.num_visits|number_format}</strong></span>
<span class="account_stat">profile views: <strong>{$user.profile_hits|number_format}</strong></span>
<span class="account_stat">total videos: <strong>{$user.total_videos|number_format}</strong></span>
<span class="account_stat">total videos watched: <strong>{$user.total_watched|number_format}</strong></span>
<span class="account_stat">subscribers: <strong>{$user.subscribers|number_format}</strong></span>
<span class="account_stat">country: <strong>{$user.country|country}</strong></span>
</div>
<div class="account_head_right">
<div class="pm_box">
<span class="messages">messages</span>
{$cbpm->get_new_messages()}
</div>
</div>
<div class="clear"></div>
</div>

View file

@ -0,0 +1,11 @@
<div class="my_account_left">
<ul>
{foreach from=$userquery->my_account_links() item=link key=name}
<li class="li">{$name}<ul>
{foreach from=$link item=alink key=link_name}
<li><a href="{$alink}">{$link_name}</a></li>
{/foreach}
</ul></li>
{/foreach}
</ul>
</div>

View file

@ -0,0 +1,44 @@
{if $control=='' || $control =='view'}
<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">
<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="javascript:void(0)" onmousedown="delete_video('delete_icon_a','{$video.videoid}','{lang code="remove_fav_video_confirm"}','?mode=favorites&amp;vid_delete={$video.videoid}')" id="delete_icon_a-{$video.videoid}">delete</a></span>
<div class="clear"></div></div>
<a href="javascript:void(0)" onmousedown="delete_video('delete_icon','{$video.videoid}','{lang code="remove_fav_video_confirm"}','?mode=favorites&amp;vid_delete={$video.videoid}')" id="delete_icon-{$video.videoid}"><img src="{$imageurl}/dot.gif" border="0" class="delete_icon" /></a>
</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>
</tr>
</table>
</div>
{/if}
{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_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">
<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="clear"></div></div>
<a href="javascript:void(0)" onmousedown="delete_video('delete_icon','{$video.videoid}','{lang code="confirm_del_video"}','?mode=uploaded&amp;vid_delete={$video.videoid}')" id="delete_icon-{$video.videoid}"><img src="{$imageurl}/dot.gif" border="0" class="delete_icon" /></a>
<a href="{$baseurl}/edit_video.php?vid={$video.videoid}"><img src="{$imageurl}/dot.gif" border="0" class="edit_icon" /></a></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>
</tr>
</table>
</div>
{/if}

View file

@ -0,0 +1,8 @@
<div class="account_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="19" align="center" valign="middle" class="last_td"> Pages : {if $first_link !=''}<a {$first_link}>&laquo;</a>{/if} {if $pre_link !=''}<a {$pre_link} >&#8249;</a>{/if} {$pagination} {if $next_link !=''}<a {$next_link}>&#8250;</a>{/if} {if $last_link !=''}<a {$last_link}>&raquo;</a>{/if}
</td>
</tr>
</table>
</div>

View file

@ -0,0 +1,84 @@
<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_pm" id="delete_fav_videos" value="Delete" class="small_button" />
</div>
<div class="clear"></div>
<div style="height:10px"></div>
<div class="account_table" style="width:780px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
</td>
{if $show_from}<td width="100">From</td>{/if}
{if $show_to}<td width="100">To</td>{/if}
<td>Subject</td>
<td width="100" class="last_td">Date sent</td>
</tr>
</table>
</div>
<div class="messages_container" id="messages_container">
<div style="width:780px">
{assign var='bg' value='fff'}
{section name=msg loop=$user_msgs}
{if $user_msgs[msg].message_id == $smarty.get.mid}
{assign var='bg' value='c6d7e0'}
{/if}
<div class="account_vid_list{if $user_msgs[msg].message_status=='unread'} unread_msg{else} read_msg{/if}" style="background-color:#{$bg}" id="message-{$user_msgs[msg].message_id}">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><input type="checkbox" name="msg_id[]" id="msg_id" value="{$user_msgs[msg].message_id}" />
</td>
{if $show_from}<td width="100"><a href="?mode={$mode}&mid={$user_msgs[msg].message_id}">{$user_msgs[msg].message_from_user}</a></td>{/if}
{if $show_to}<td width="100"><a href="?mode={$mode}&mid={$user_msgs[msg].message_id}">{$user_msgs[msg].to_usernames}</a></td>{/if}
<td><a href="?mode={$mode}&mid={$user_msgs[msg].message_id}">{$user_msgs[msg].message_subject|truncate:70}</a></td>
<td width="50"><a id="delete_icon-{$pr_msg.message_id}" href="?mode={$mode}&delete_mid={$user_msgs[msg].message_id}"><img src="{$imageurl}/dot.gif" border="0" class="delete_icon" /></a>
</td>
<td width="100" style="text-indent:0px; padding-left:5px">{$user_msgs[msg].date_added}</td>
</tr>
</table>
</div>
{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 private message</em></strong></div>
{/section}
</div>
</div>
</form>
{if $pr_msg !=''}
<div class="private_message_container" align="center">
<div style="padding:5px" align="right">
<a id="delete_icon-{$pr_msg.message_id}" href="?mode={$mode}&delete_mid={$pr_msg.message_id}"><img src="{$imageurl}/dot.gif" border="0" class="delete_icon" /></a>
<a id="reply_icon-{$pr_msg.message_id}" href="?mode=new_msg&reply={$pr_msg.message_id}"><img src="{$imageurl}/dot.gif" border="0" class="reply_icon" title="Reply!" /></a>
</div>
<div class="pm_message_top" align="left">
<div class="pm_line">From : <strong><a href="{$userquery->profile_link($pr_msg)}">{$pr_msg.username}</a></strong> - {$pr_msg.date_added|date_format:"%A, %B %e, %Y %I:%M %p"}</div>
<div class="pm_line">Subject : <strong>{$pr_msg.message_subject}</strong></div>
</div>
<hr width="100%" size="1" noshade="noshade" />
<div align="left">
{private_message pm=$pr_msg}
</div>
</div>
{/if}

View file

@ -0,0 +1,19 @@
{if $block_type == '' || $block_type=='normal'}
<div class="user_block" id="user-{$user.userid}">
<div><a href="{$userquery->profile_link($user)}">{$user.username}</a></div>
<div class="user_mid_thumb_container" > <a href="{$userquery->profile_link($user)}"><img src="{$userquery->getuserthumb($user)}" border="0" class="user_mid_thumb"></a>
</div>
258213<br />
videos<br />
<br />
21245658<br />
views
</div>
{/if}
{if $block_type =='small'}
<div class="user_block_small" id="user-{$user.userid}" align="center">
<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}

View file

@ -1,8 +1,12 @@
<div class="video_block" align="center">
<div class="video_block" align="center" {if $only_once} style="float:none" {/if}>
<div class="vdo_thumb_container" id="video_{$video.videoid}">
<a href="{videoLink vdetails=$video}"><img src="{getThumb vdetails=$video}" width="120" height="90" border="0" {ANCHOR place="video_thumb"} /></a>
{ANCHOR place="video_thumb_div" data=$video}
<span class="vdo_duration">{$video.duration|SetTime:false}</span>
</div>
<a href="{videoLink vdetails=$video}">{$video.title|truncate:20}</a><br />
by <a href="{$userquery->profile_link($video.userid)}">{$userquery->get_user_field_only($video.userid,'username')}</a> {show_rating class='small_stars' rating='$videos.rating' ratings='$videos.rated_by' total='10'} </div>
by <a href="{$userquery->profile_link($video.userid)}">{$userquery->get_user_field_only($video.userid,'username')}</a> {show_rating class='small_stars' rating='$videos.rating' ratings='$videos.rated_by' total='10'} </div>
{if $only_once}
<div class="clear"></div>
{/if}

View file

@ -1,19 +1,23 @@
{* Including Global Header *}
{include file="$style_dir/global_header.html"}
<html>
<body>
<div id="body">
<!-- Including Commong header -->
{include file="$style_dir/header.html" }
{include file="$style_dir/message.html"}
<div id="content_container">
<div id="content">
{foreach from=$template_files item=file}
{include file="$style_dir/$file" }
{if template_file_exists($file,$style_dir)}
{include file="$style_dir/$file" }
{else}
<div class="error" align="center">Unable to load template file "{$file}"</div>
{/if}
{/foreach}
</div>
</div>
<div class="clear"></div>
<div id="footer">
<div class="footer">
&copy; {$title} {$smarty.now|date_format:"%Y"}

View file

@ -0,0 +1,12 @@
<div style="width:600px; float:left" >
<div class="heading">Users</div>
{section name=u_list loop=$users}
{include file="$style_dir/blocks/user.html" user=$users[u_list]}
{/section}
<div class="clear"></div>
</div>
<div class="verticle_ad" align="center">{AD place='ad_160x600'}</div>
<div class="clear"></div>
{include file="$style_dir/blocks/pagination.html"}

View file

@ -0,0 +1,254 @@
<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}
<!--- CHANGING USER ACCOUNT AND PROFILE -->
{if $mode == 'profile_settings'}
{assign var="user_fields" value=$userquery->load_profile_fields($p)}
{assign var="user_custom_profile_fields" value=$userquery->load_custom_profile_fields($p)}
{assign var="user_custom_signup_fields" value=$userquery->load_custom_signup_fields($p)}
<div class="account_form">
<form method="post" name="edit_profile">
<fieldset class="fieldset">
<legend>Account Details</legend>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="country">Country</label></strong></div>
<div class="account_field"><select name="country" id="country">
{assign var='countries' value=$Cbucket->get_countries(iso2)}
{foreach from=$countries item=country key=code}
<option value="{$code}" {if $user.country==$code} selected="selected"{/if}>{$country}</option>
{/foreach}
</select></div>
<div class="clear"></div>
</div>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="country">Gender</label></strong></div>
<div class="account_field"><label>
<input type="radio" name="sex" value="male" id="sex_0" {if $user.sex == male} checked="checked"{/if} />
Male</label>
<label>
<input type="radio" name="sex" value="female" id="sex_1" {if $user.sex == female} checked="checked"{/if}/>
Female</label></div>
<div class="clear"></div>
</div>
</fieldset>
<fieldset class="fieldset">
<legend>Profile Details</legend>
{foreach from=$user_fields 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="clear"></div>
</div>
{/foreach}
<div align="right"><button name="update_profile" id="button" value="submit" class="cb_button">Update Profile</button></div>
</fieldset>
</form>
</div>
</div>
<div class="clear"></div>
{/if}
<!--- END CHANGING USER ACCOUNT AND PROFILE -->
<!--- CHANGING USER AVATAR AND BG -->
{if $mode == 'avatar_bg'}
<div class="account_form avatar_bg">
<form method="post" enctype="multipart/form-data" name="edit_profile">
<fieldset class="fieldset">
<legend>User Avatar</legend>
<div style="height:15px;"></div>
<div style="float:left; width:200px;" align="center">
<img src="{$userquery->getUserThumb($user)}" class="mid_user_thumb" style="max-width:95px"/>
</div>
<div style="width:300px; display:block; float:left">
<strong>User Avatar/</strong><br />
Please select image file<br />
<label for="avatar_file"></label>
<input type="file" name="avatar_file" id="avatar_file" />
OR<br />
<label for="avatar_url">Please Enter Image URL</label>
<input name="avatar_url" type="text" id="avatar_url" value="{$user.avatar_url}" />
<br />
<input name="delete_avatar" type="checkbox" id="delete_avatar" value="yes" />
<label for="delete_avatar" style="display:inline">Delete This Image - (if user has profile pic)</label>
<input type="hidden" name="avatar_file_name" value="{$user.avatar}" />
</div>
</fieldset>
<fieldset class="fieldset">
<legend>User Background</legend>
<div style="height:15px;"></div>
<div style="float:left; width:200px;" align="center">
{if $userquery->getUserBg($user)}<img src="{$userquery->getUserBg($user)}" style="max-width:95px"/>{else}<em><strong>No Bg</strong></em>{/if}
</div>
<div style="width:300px; display:block; float:left">
<strong>User Background Image
</strong><br />
Please Select Image File
<br />
<input type="file" name="background_file" id="background_file" />
<label for="background_url">Please Enter Image URL<br /></label>
<input name="background_url" type="text" id="background_url" value="{$user.background_url}" />
<label for="background_color">Please Enter Background Color</label>
<input name="background_color" type="text" id="background_color" value="{$user.background_color}" />
<input type="hidden" name="bg_file_name" value="{$user.background}" />
<label for="background_repeat">Background Repeat Type (if using image as a background)</label>
<select name="background_repeat" id="background_repeat" >
<option value="repeat" {if $user.background_repeat=='repeat'} selected="selected"{/if}>repeat</option>
<option value="repeat-x" {if $user.background_repeat=='repeat-x'} selected="selected"{/if}>repeat-x</option>
<option value="repeat-y" {if $user.background_repeat=='repeat-y'} selected="selected"{/if}>repeat-y</option>
<option value="no-repeat" {if $user.background_repeat=='no-repeat'} selected="selected"{/if}>no-repeat</option>
</select>
<br />
{if $userquery->getUserBg($user)}<input name="delete_bg" type="checkbox" id="delete_bg" value="yes" /><label for="delete_bg" style="display:inline">Delete This Image</label>{/if}
</div>
<div class="clear"></div>
</fieldset>
<div align="right" style="padding-right:10px"><button name="update_avatar_bg" id="button" value="submit" class="cb_button">Update</button></div>
</form>
</div>
</div>
<div class="clear"></div>
{/if}
<!--- END CHANGING USER AVATAR AND BG -->
{if $mode == 'change_email'}
<!--- CHANGING USER EMAIL -->
<div class="account_form">
<form method="post" name="edit_profile">
<fieldset class="fieldset">
<legend>Change Email</legend>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="curemail">Curent Email</label></strong></div>
<div class="account_field"><input type="text" disabled value="{$user.email}" id="curemail" style="margin-bottom:10px"></div>
<div class="clear"></div>
</div>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="new_email">New Email</label></strong></div>
<div class="account_field"><input type="text" name="new_email" id="new_email" style="margin-bottom:10px"></div>
<div class="clear"></div>
</div>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="cnew_email">Confirm new Email</label></strong></div>
<div class="account_field"><input type="text" name="cnew_email" id="cnew_email" style="margin-bottom:10px"></div>
<div class="clear"></div>
</div>
<div align="right"><button name="change_email" id="button" value="submit" class="cb_button">Change Email</button></div>
</fieldset>
</form>
</div>
<!-- END CHANGIN USER EMAIL -->
{/if}
{if $mode == 'change_password'}
<!-- CHANGING USER PASSWORD -->
<div class="account_form">
<form method="post" name="edit_profile">
<fieldset class="fieldset">
<legend>Change Password</legend>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="old_pass">{lang code='user_old_pass'}</label></strong></div>
<div class="account_field"><input name="old_pass" type="password" id="old_pass" style="margin-bottom:10px"></div>
<div class="clear"></div>
</div>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="new_pass">{lang code='user_new_pass'}</label></strong></div>
<div class="account_field"><input name="new_pass" type="password" id="new_pass" style="margin-bottom:10px"/></div>
<div class="clear"></div>
</div>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="c_new_pass">{lang code='user_c_new_pass'}</label></strong></div>
<div class="account_field"><input name="c_new_pass" type="password" id="c_new_pass" style="margin-bottom:10px" /></div>
<div class="clear"></div>
</div>
<div align="right"><button name="change_password" id="button" value="submit" class="cb_button_2">{lang code='user_change_pass'}</button></div>
</fieldset>
</form>
</div>
<!-- END CHANGING USER PASSWORD -->
{/if}
{if $mode == 'ban_users'}
<!-- Banning Users -->
<div class="account_form">
<form method="post" name="ban_users">
<fieldset class="fieldset">
<legend>Ban Users</legend>
<div class="account_field_block">
<div class="account_field_label" align="right"><strong><label for="users">{lang code='ban_users'}</label></strong></div>
<div class="account_field">
<textarea name="users" id="users" style="margin-bottom:10px">{$user.banned_users}</textarea>
<br />
{lang code='spe_users_by_comma'}</div>
<div class="clear"></div>
</div>
<div align="right"><button name="ban_users" id="button" value="submit" class="cb_button_2">{lang code='ban_users'}</button></div>
</fieldset>
</form>
</div>
<!-- Banning Users End-->
{/if}
</div>

View file

@ -0,0 +1,131 @@
<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 Video</h2>
{* Loading Form Fields *}
{assign var='requiredFields' value=$Upload->loadRequiredFields($v)}
{assign var='optionFields' value=$Upload->loadOptionFields($v)}
{assign var='locationFields' value=$Upload->loadLocationFields($v)}
{assign var='custom_form_fields' value=$Upload->load_custom_form_fields($v,TRUE)}
<div class="account_form">
<form method="post" name="edit_video">
{* GETTING THUMBS INFO *}
<fieldset class="fieldset">
<legend>Thumbs</legend>
{assign var=vidthumbs value=func->get_thumb($v,1,TRUE,false,true,false)}
{foreach from=$vidthumbs item=vid_thumb}
<div style="width:140px; float:left" align="center">
<label for="{$vid_thumb|getname}"><img src="{$vid_thumb}" border="1" style="margin:4px" /><br />
<input type="radio" value="{$vid_thumb|getname}.{$vid_thumb|getext}" id="{$vid_thumb|getname}" name="default_thumb" {if $v.default_thumb==$vid_thumb|get_thumb_num} checked="checked"{/if} />Default</label><br />
</div>
{/foreach}
</fieldset>
{* VIDEO THUMB ENDS *}
{* Video 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="clear"></div>
</div>
{/foreach}
</fieldset>
{* Video Information Ends *}
{* Sharig 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="clear"></div>
</div>
{/foreach}
</fieldset>
{* Sharing Information Ends *}
{* Location Fields *}
<fieldset class="fieldset">
<legend>Date recorded &amp; Location</legend>
{foreach from=$locationFields 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="clear"></div>
</div>
{/foreach}
</fieldset>
{* Location Fields Ends *}
{* Loading Custom Fields *}
{if $custom_form_fields.0.title !=''}
<fieldset class="fieldset">
<legend>More Options</legend>
{foreach from=$custom_form_fields 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="clear"></div>
</div>
{/foreach}
</fieldset>
{/if}
{* Custom Fields ENDS *}
<div align="right"><button name="update_video" id="button" value="submit" class="cb_button">Update Video</button></div>
</form>
</div>
<!-- ENDING EDITING {$v.title} -->
</div>
<div class="clear"></div>
</div>

View file

@ -152,6 +152,18 @@ if(!empty($modlist) && is_array($modlist))
{/php}
<!-- Including Module Headers -->
{if $smarty.const.THIS_PAGE =='private_message' && $smarty.get.mid}
<script type="text/javascript">
var mid = {$smarty.get.mid};
{literal}
window.onload = function() {
$('#messages_container').scrollTo( '#message-'+mid, 800 );
}
{/literal}
</script>
{/if}
</head>
<!-- Global Header Ends Here -->

View file

@ -6,7 +6,7 @@
{if !$userquery->login_check('',true)}
Welcome Guest, Click here to <a href="{link name='login' }">Login</a> or <a href="{link name='signup' }">Register</a>
{else}
Hello {$userquery->username} | <a href="#">Inbox (0) </a>| <a href="#">Comments (0)</a> | <a href="#">Account</a> | <a href="#">Videos</a>
Hello {$userquery->username} | <a href="#">Inbox ({$cbpm->get_new_messages()}) </a>| <a href="#">Notifications ({$cbpm->get_new_messages('','notification')})</a> | <a href="#">Account</a> | <a href="#">Videos</a>
{/if}
</div>
<div class="clear"></div>

View file

@ -0,0 +1,121 @@
<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}
{if $mode =='uploaded'}
<h2>Manage Videos</h2>
<!-- Manage Uploaded Videos Start -->
<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="clear"></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="clear"></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>
<td width="100" class="last_td">Status</td>
</tr>
</table>
</div>
{assign var='bg' value='fff'}
{section name=uvid loop=$uservids}
{include file="$style_dir/blocks/manage/account_video.html" video=$uservids[uvid] 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 video</em></strong></div>
{/section}
{include file="$style_dir/blocks/manage/user_account_pagination.html"}
</form>
{/if}
<!-- Manage Uploaded Videos End -->
<!-- Manage Favorite Videos -->
{if $mode =='favorites'}
<h2>Manage Favorites</h2>
<!-- Manage Uploaded Videos Start -->
<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="clear"></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_fav_videos" id="delete_fav_videos" value="Delete" class="small_button" />
</div>
<div class="clear"></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>
<td width="100" class="last_td">Status</td>
</tr>
</table>
</div>
{assign var='bg' value='fff'}
{section name=uvid loop=$uservids}
{include file="$style_dir/blocks/manage/account_video.html" video=$uservids[uvid] 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 favorite video</em></strong></div>
{/section}
{include file="$style_dir/blocks/manage/user_account_pagination.html"}
</form>
{/if}
<!-- Manage Favorite Videos END-->
</div>
</div>

View file

@ -1,8 +1,7 @@
<br />
{assign var=msg value=$eh->message_list}
{assign var=err value=$eh->error_list}
{if $err.0 neq ''}
{if $err.0 neq '' || $err.1 != ''}<br />
<table width="910" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="11"><img src="{$imageurl}/message_tl.png" width="11" height="12" /></td>

View file

@ -0,0 +1,23 @@
<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}
{foreach from=$userquery->my_account_links() item=link key=name}
<div class="account_option_box">
<span class="its_title">{$name}</span>
<ul>
{foreach from=$link item=alink key=link_name}
<li><a href="{$alink}">{$link_name}</a></li>
{/foreach}
</ul>
</div>
{/foreach}
</div>
<div class="clear"></div>
</div>

View file

@ -0,0 +1,51 @@
<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}
{if $mode =='inbox'}
<h2>Private Messages &raquo; Inbox</h2>
{include file="$style_dir/blocks/pm/messages.html" show_from='true'}
{/if}
{if $mode =='notification'}
<h2>Private Messages &raquo; Notifications</h2>
{include file="$style_dir/blocks/pm/messages.html" show_from='true'}
{/if}
{if $mode =='sent'}
<h2>Private Messages &raquo; Sent</h2>
{include file="$style_dir/blocks/pm/messages.html" show_to='true'}
{/if}
{if $mode =='new_msg'}
<h2>Private Messages &raquo; Compose new message</h2>
{assign var='form_fields' value=$cbpm->load_compose_form()}
<div class="account_form">
<form id="pm_msg" name="pm_msg" method="post" action="">
<fieldset class="fieldset">
<legend>New private message</legend>
{foreach from=$form_fields 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="clear"></div>
</div>
{/foreach}
<div align="right"><button name="send_message" id="send_message" value="submit" class="cb_button">Send Message</button></div>
</fieldset>
</form>
</div>
{/if}
</div>
</div>

View file

@ -1,92 +1,181 @@
<link href="../theme/main.css" rel="stylesheet" type="text/css" />
</body><head>
{if $show_upload != 'no'}
{if $data.usr_status !=''}
<body>
<table width="930" border="0" align="center" cellpadding="3" cellspacing="0" bgcolor="#B9E3FF" style="border:solid 1px #0099CC;">
<tr>
<td ><table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%"><img src="{$imageurl}/alert.png" /></td>
<td width="95%"><span class="tips">{$LANG.vdo_inactive_msg}</span> <a href="{$baseurl}/activation.php">{$LANG.vdo_click_here}</a></td>
</tr>
</table></td>
</tr>
</table>
{else}
<script src="{$js}/flashobject.js"></script>
<script src="{$js}/uploader.js"></script>
{$java}
</head>
<body>
{assign var='requiredFields' value=$Upload->loadRequiredFields()}
{assign var='optionFields' value=$Upload->loadOptionFields()}
{assign var='locationFields' value=$Upload->loadLocationFields()}
{assign var='cust_fields' value=$Upload->custom_form_fields}
<div>
<form name="upload_form" method="post" action="">
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td colspan="2" align="left" class="heading">{$LANG.vdo_video_details}</td>
</tr>
{foreach from=$requiredFields item=field}
<tr>
<td width="117" align="right" valign="top"><label for="">{$field.title}* :</label></td>
<td class="tips"{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}
<tr>
<td height="130" colspan="2" align="right" style="display:none"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<div id="link_button">
<ul>
{foreach from=$plugin_list item=plugin}
{if $plugin.plugin_type == upload}
{$plugin.plugin_link}
{/if}
{/foreach}
</ul>
</div>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="left">{if $step =='1'}
<form name="upload_01" method="post" action="">
<table width="520" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="left" class="heading">{$LANG.vdo_date_loc}</td>
<td height="30" align="left" valign="middle" class="header1" >{$LANG.vdo_upload_step1} <span class="header2">{$LANG.vdo_upload_step2}</span></td>
</tr>
{foreach from=$locationFields item=field}
<tr>
<td width="117" align="right" valign="top">{$field.title}* :</td>
<td class="tips">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}
</table><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td colspan="2" align="left" class="heading">{$LANG.vdo_share_opt}</td>
<td align="right" valign="middle" bgcolor="#F0F0F0"><img src="{$imageurl}/uploader_tr.gif"></td>
</tr>
{foreach from=$optionFields item=field}
<tr>
<td width="117" align="right" valign="top">{$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=$cust_fields item=field}
<tr>
<td width="117" align="right" valign="top">{$field.title}* :</td>
<td class="tips">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}
</table></td>
</tr>
</table>
<input type="submit" name="submit_data" id="button" value="{$LANG.vdo_continue_upload}" onClick="return validate_upload_form(upload_01)">
</form>
{if $step==3}
<table width="445" border="0" align="center" cellspacing="0">
<tr>
<td width="50%" class="header1" style="padding-left:5px">{$LANG.vdo_video_upload_complete}</td>
</tr>
<tr>
<td width="50%" align="right" bgcolor="#F0F0F0" style="padding:0px; margin:0px"><img src="{$imageurl}/uploader_tr.gif" width="20" height="20"></td>
</tr>
<tr>
<td width="50%" bgcolor="#F0F0F0" style="padding:5px"><span class="header1">{$LANG.vdo_thanks_you_upload_complete_1}.</span><br>
<span class="tips">{$LANG.vdo_thanks_you_upload_complete_2} <a href="{$manage_videos}"><strong>{$LANG.com_my_videos}</strong></a> {$LANG.vdo_after_it_has_process} </span><span class="header1"><br>
</span></td>
</tr>
<tr>
<td width="50%" align="right" bgcolor="#F0F0F0" style="padding:0px; margin:0px"><img src="{$imageurl}/uploader_br.gif" width="20" height="20"></td>
</tr>
<tr>
<td width="50%" align="right" style="padding:0px; margin:0px">&nbsp;</td>
</tr>
<tr>
<td align="center" style="padding:0px; margin:0px">
<div id="link_button" align="center">
<ul>
<li><a href="{$upload_link}" >{$LANG.vdo_upload_another_video}</a></li>
<li><a href="{$manage_videos}" >{$LANG.vdo_goto_my_videos}</a></li>
</ul>
</div></td>
</tr>
<tr bgcolor="#F6F6F6">
<td align="left" valign="middle" bgcolor="#F0F0F0"><table width="95%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td colspan="2" align="left" class="header2">{$LANG.vdo_video_details}</td>
</tr>
{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}
<tr>
<td height="130" colspan="2" align="right"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td colspan="2" align="left" class="header2">{$LANG.vdo_date_loc}</td>
</tr>
{foreach from=$locationFields item=field}
<tr>
<td width="117" align="right" valign="top" class="header3">{$field.title}* :</td>
<td width="347" class="tips">{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
<br>
{$field.hint_2}</td>
</tr>
{/foreach}
</table></td>
</tr>
<tr>
<td height="80" colspan="2" align="right"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td colspan="2" align="left" class="header2">{$LANG.vdo_share_opt}</td>
</tr>
{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}
{foreach from=$cust_fields 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}
</table></td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#F6F6F6">
<td align="right" valign="middle" bgcolor="#F0F0F0"><img src="{$imageurl}/uploader_br.gif"></td>
</tr>
<tr>
<td align="center" valign="middle">
<input type="submit" name="submit_data" id="button" value="{$LANG.vdo_continue_upload}" onClick="return validate_upload_form(upload_01)"> </td>
</tr>
</table>
</form>
{/if}</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="left">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="left">
{if $step =="2"}
<form action="{$upload_link}" method="post" enctype="multipart/form-data" name="{$upload_form_name}" id="{$upload_form_name}" >
{$Upload->load_post_fields()}
<input name="file_name" type="hidden" value="{$file_name}">
{assign var=opt_list value=$Upload->load_upload_options()}
{foreach from=$opt_list item=opt key=divid}
<div class="upload_opt" id="{$divid}">
<span class="header1">{$opt.title}</span>
{load_form name=$opt.load_func}
</div>
{/foreach}
</form>
{/if}
{if $step==3}
<table width="445" border="0" align="center" cellspacing="0">
<tr>
<td width="50%" class="header1" style="padding-left:5px">{$LANG.vdo_video_upload_complete}</td>
</tr>
<tr>
<td width="50%" align="right" bgcolor="#F0F0F0" style="padding:0px; margin:0px"><img src="{$imageurl}/uploader_tr.gif" width="20" height="20"></td>
</tr>
<tr>
<td width="50%" bgcolor="#F0F0F0" style="padding:5px"><span class="header1">{$LANG.vdo_thanks_you_upload_complete_1}.</span><br>
<span class="tips">{$LANG.vdo_thanks_you_upload_complete_2} <a href="{$manage_videos}"><strong>{$LANG.com_my_videos}</strong></a> {$LANG.vdo_after_it_has_process} </span><span class="header1"><br>
</span></td>
</tr>
<tr>
<td width="50%" align="right" bgcolor="#F0F0F0" style="padding:0px; margin:0px"><img src="{$imageurl}/uploader_br.gif" width="20" height="20"></td>
</tr>
<tr>
<td width="50%" align="right" style="padding:0px; margin:0px">&nbsp;</td>
</tr>
<tr>
<td align="center" style="padding:0px; margin:0px">
<div id="link_button" align="center">
<ul>
<li><a href="{$upload_link}" >{$LANG.vdo_upload_another_video}</a></li>
<li><a href="{$manage_videos}" >{$LANG.vdo_goto_my_videos}</a></li>
</ul>
</div></td>
</tr>
</table>
{/if}
</td>
<td width="450">&nbsp;</td>
</tr>
</table>
{/if}
</div>
{/if}

View file

@ -0,0 +1,29 @@
<!-- Channel Top -->
<div class="channel_box">
<div class="channel_inner_box channel_top">
<div class="usr_small_thumb"><img src="{$userquery->getUserThumb($u,'small')}" class="user_small_thumb" alt="{$u.username}"></div>
<div class="usr_channel">{lang code='user_s_channel' assign='usr_s'}{$usr_s|sprintf:$u.username} <a href="#" class="cb_button">{lang code='subscribe'}</a></div>
{assign var='channel_links' value=$userquery->get_inner_channel_top_links($u)}
<ul class="top_channel_links">
{foreach from=$channel_links item=link key=link_title}
<li><a href="{$link}">{$link_title}</a></li>
{/foreach}
</ul>
<div class="clear"></div>
</div>
</div>
<!-- Channel Top End-->
<div style="width:600px; float:left" >
<div class="heading">Videos</div>
{section name=v_list loop=$videos}
{include file="$style_dir/blocks/video.html" video=$videos[v_list]}
{/section}
<div class="clear"></div>
</div>
<div class="verticle_ad" align="center">{AD place='ad_160x600'}</div>
<div class="clear"></div>
{include file="$style_dir/blocks/pagination.html"}

View file

@ -0,0 +1,225 @@
{* Including Global Header *}
{include file="$style_dir/global_header.html"}
<body>
<div id="body">
<!-- Including Commong header -->
{include file="$style_dir/header.html" }
{include file="$style_dir/message.html"}
<div id="content_container" {if $userquery->getUserBg($u) || $u.background_color!=''}style="background-position:center;background:{if $userquery->getUserBg($u)}url('{$userquery->getUserBg($u)}');background-repeat: {$u.background_repeat};{elseif $u.background_color!=''}{$u.background_color}{/if}"{/if}>
<div id="content" style="padding-bottom:15px">
<!-- Channel Top -->
<div class="channel_box">
<div class="channel_inner_box channel_top">
<div class="usr_small_thumb"><img src="{$userquery->getUserThumb($u,'small')}" class="user_small_thumb" alt="{$u.username}"></div>
<div class="usr_channel">{lang code='user_s_channel' assign='usr_s'}{$usr_s|sprintf:$u.username} <a href="#" class="cb_button">{lang code='subscribe'}</a></div>
{assign var='channel_links' value=$userquery->get_inner_channel_top_links($u)}
<ul class="top_channel_links">
{foreach from=$channel_links item=link key=link_title}
<li><a href="{$link}">{$link_title}</a></li>
{/foreach}
</ul>
<div class="clear"></div>
</div>
</div>
<!-- Channel Top End-->
{assign var=user_vdo value= $userquery->get_user_profile_video($p)}
{if $user_vdo}
<!-- User Video Block -->
<div class="channel_box">
<div class="channel_inner_box">
<div style="width:610px; float:left">
<div id="videoPlayer" class='video_player'>
This content requires JavaScript and Macromedia Flash Player 7 or higher. <a href=http://www.macromedia.com/go/getflash/>Get Flash</a><br/><br/>
</div>
<script language="javascript">
{FlashPlayer vdetails = $vdo height=$Cbucket->configs.channel_player_height width=$Cbucket->configs.channel_player_width}
</script>
</div>
<div align="center" style="width:300px; float:left">{AD place=336x280}</div>
<div class="clear"></div>
</div>
</div>
<!-- User Video Blcok Ends-->
{/if}
<!-- Starting Bottom Channel Box -->
<div class="channel_box" style="margin-bottom:0px">
<div style="width:270px; float:left">
<!-- Thumb and Links-->
<div class="channel_inner_box" align="center">
<div class="usr_thumb_container" align="center">
<img src="{$userquery->getUserThumb($u)}" alt="{$u.username}" class="user_thumb">
</div>
<a href="" class="cb_button">{lang code='subscribe'}</a><br>
{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>
{/foreach}
</ul>
</div>
<!-- Thumb and Links Ends-->
<div style="height:5px"></div>
<!-- Profile Details -->
<div class="channel_inner_box">
<span class="channel_heading">{lang code='profile'|capitalize:true}</span>
<div class="show_info">
<div class="item_list float_left" align="left">{lang code='user_channel_views'}</div>
<div class="item_list float_right" align="right">{$u.profile_hits|number_format}</div>
</div>
{if $p.show_dob=='yes'}
<div class="show_info">
<div class="item_list float_left" align="left">{lang code='age'}</div>
<div class="item_list float_right" align="right">{$u.dob|get_age} - {$u.dob|date_format}</div>
</div>
{/if}
<div class="show_info">
<div class="item_list float_left" align="left">{lang code='joined'}</div>
<div class="item_list float_right" align="right">{$u.doj|date_format}</div>
</div>
<div class="show_info">
<div class="item_list float_left" align="left">{lang code='user_last_login'}</div>
<div class="item_list float_right" align="right">{$u.last_logged|nicetime}</div>
</div>
<div class="show_info">
<div class="item_list float_left" align="left">{lang code='subscribers'}</div>
<div class="item_list float_right" align="right">{$u.subscribers|number_format}</div>
</div>
<div class="show_info">
<div class="item_list float_left" align="left">{lang code=country}</div>
<div class="item_list float_right" align="right">{$u.country|country}</div>
</div>
<span class="channel_heading">{lang code='Personal Details'|capitalize:true}</span>
{assign var="personal_details" value=$userquery->load_personal_details($p)}
{foreach from=$personal_details item=field}
{assign var=db_field value=$field.db_field}
{if $p.$db_field && $field.auto_view=='yes'}
<div class="show_info">
{if $field.type !='textarea'}
<div class="item_list float_left" align="left">{$field.title}</div>
<div class="item_list float_right" align="right">{input_value input=$field}</div>
{else}
{$field.value}
{/if}
</div>
{/if}
{/foreach}
{if $p.about_me}
<div class="show_info">
{$p.about_me|nl2br}
</div>
{/if}
<div class="clear"></div>
</div>
<!-- Profile Details Ends -->
<!-- User Subscriotions -->
<div class="channel_inner_box" style="margin-top:5px">
<span class="channel_heading">{lang code='user_subscriptions' assign='users_videos'}{$users_videos|sprintf:$u.username}</span>
<hr width="100%" size="1" noshade>
{assign var='usr_subs' value=$userquery->get_user_subscriptions($u.userid)}
{section name=u_list loop=$usr_subs}
{include file="$style_dir/blocks/user.html" user=$usr_subs[u_list] block_type='small'}
{sectionelse}
<div align="center"><em><strong>{lang code='user_no_subscriptions' assign='user_subs'}{$user_subs|sprintf:$u.username}</strong></em></div>
{/section}
<div class="clear"></div>
<hr width="100%" size="1" noshade>
<div align="right"><a href="#">{lang code='more'}</a></div>
</div>
<!-- User Subscriptions end -->
</div>
<!-- Right Colum -->
<div class="right_column">
<div class="channel_inner_box">
<span class="channel_heading">{lang code='users_videos' assign='users_videos'}{$users_videos|sprintf:$u.username}</span>
<hr width="100%" size="1" noshade>
{get_videos assign='usr_vids' limit='4' order='date_added DESC' user=$u.userid}
{section name=v_list loop=$usr_vids}
{include file="$style_dir/blocks/video.html" video=$usr_vids[v_list]}
{sectionelse}
<div align="center"><em>{lang code='user_have_no_vide'}</em></div>
{/section}
<div class="clear"></div>
<hr width="100%" size="1" noshade>
<div align="right"><a href="#">{lang code='more'}</a></div>
</div>
<div class="channel_inner_box">
<span class="channel_heading">{lang code='users_subscribers' assign='users_videos'}{$users_videos|sprintf:$u.username}</span>
<hr width="100%" size="1" noshade>
{assign var='usr_subs' value=$userquery->get_user_subscribers_detail($u.userid)}
{section name=u_list loop=$usr_subs}
{include file="$style_dir/blocks/user.html" user=$usr_subs[u_list] block_type='small'}
{sectionelse}
<div align="center"><em><strong>{lang code='user_no_subscribers' assign='users_videos'}{$users_videos|sprintf:$u.username}</strong></em></div>
{/section}
<div class="clear"></div>
<hr width="100%" size="1" noshade>
<div align="right"><a href="#">{lang code='more'}</a></div>
</div>
{ANCHOR place='channel_box'}
<!-- Comments -->
<div class="channel_inner_box" >
<span class="channel_heading">{lang code='comments'|capitalize:true}</span>
<hr width="100%" size="1" noshade><!-- Displaying Comments -->
{include file="$style_dir/blocks/comments.html" id=$u.userid type=c}<hr width="100%" size="1" noshade>
<span class="channel_heading_mid">{lang code='user_add_comment'}</span>
<form name="add_comment" action="" method="post">
<label for="comment"></label>
<textarea name="comment" id="comment" cols="45" rows="5"></textarea>
<br>
<label for="add_comment"></label>
<input type="submit" name="add_comment" id="add_comment" value="Submit">
</form>
</div>
</div>
<div class="clear"></div>
<!-- Ending Bottomg Channel Box-->
</div>
</div>
</div>
<div id="footer" style="margin-top:0px;">
<div class="footer">
&copy; {$title} {$smarty.now|date_format:"%Y"}
</div>
</div>
</div>
</body>
</html>

View file

@ -1,5 +1,5 @@
<div class="video_title">{$vdo.title}</div>
{if has_access('admin_access')}<div>{ANCHOR place=watch_admin_options data=$vdo}</div>{/if}
{if $userquery->perm_check('admin_access')=='yes'}<div>{ANCHOR place=watch_admin_options data=$vdo}</div>{/if}
<!-- Video Left -->
<div class="video_left" align="left">

View file

@ -7,3 +7,62 @@
.category_list ul, .category_list ul li{margin:0px; padding:0px; list-style:none}
.category_list a{display:block; border-bottom:dashed 1px #EEE; font-size:13px; font-weight:bold; color:#09c; padding:3px; margin-bottom:3px;}
.category_list a:hover{background-color:#F9F9F9}
/* User */
.user_block{width:130px; margin:5px; float:left; border:1px solid #CCC; margin:5px; padding:5px; font-size:10px}
.user_mid_thumb_container{display:inline; float:left; margin-right:5px}
.user_mid_thumb{max-width:60px; max-height:60px;display:inline; border:1px solid #999; padding:2px;}
.user_block a{font-size:12px; font-weight:bold}
.user_block_small{width:70px; height:80px; margin:3px; float:left; padding:5px; font-size:10px; border:1px solid #CCC}
.user_block_small a{font-size:11px; font-weight:bold}
/* My ACcount */
.my_account_left{width:150px; float:left; }
.my_account_left ul{margin:0px; padding:0px;}
.my_account_left li{margin:0px; padding:0px; list-style:none; }
.my_account_left .li{font-size:12px; font-weight:bold; display:block; margin-bottom:10px}
.my_account_left .li li{font-weight:normal; border-bottom:1px dotted #333; padding-left:5px}
.account_box{float:right; width:800px;border-left:5px #999 solid; padding-left: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;}
.account_option_box .its_title{font-size:13px; font-weight:bold;}
.account_option_box li{list-style:none; border-bottom:1px dotted #999; padding-bottom:2px; margin-bottom:2px}
.account_option_box ul{margin:0px; padding:0px; display:block; padding-left:15px}
.account_option_box a:hover{color:#009}
.account_head_container{border-bottom:1px dotted #CCC; padding-bottom:10px}
.account_thumb{max-height:150px; max-width:150px;border:1px solid #999; padding:3px; display:inline-block;}
.account_thumb_container{margin-left:5px;display:inline-block; float:left; margin-right:10px}
.stats .account_stat{font-size:11px; font-family:tahoma; display:block;}
.stats{ width:300px; float:left}
.account_head_right{float:right}
.pm_box{width:90px; height:70px; background-color:#EFF5F8; border-radius:5px; -moz-border-radius:5px;-webkit-border-radius:5px; display:block}
.pm_box .messages{font-size:10px; font-family:tahoma; font-weight:bold; text-transform:uppercase; color:#333; text-align:center; display:block; padding:6px}
.pm_box {text-align:center; font-size:25px; font-weight:bold}
.account_form fieldset{border:1px solid #ccc; border-radius:5px; -moz-border-radius:5px;-webkit-border-radius:5px; margin:10px}
.account_form legend{ text-transform:uppercase; font-family:Tahoma; font-weight:bold}
.account_form input, .account_form textarea, .account_form select{border:1px solid #ccc; width:300px; padding:3px;}
.account_form input[type="radio"],.account_form input[type="checkbox"] { display:inline; width:auto}
.account_form select{margin-bottom:10px}
.account_field_block{ border-bottom:1px solid #CCC; margin:5px 0px 5px 0px; padding-bottom:0px; padding-top:5px}
.account_field_block:hover{background-color:#F5F5F5}
.account_field_block .account_field_label{width:200px; float:left}
.account_field_block .account_field{ float:left; width:400px; padding-left:10px; padding-bottom:10px}
.avatar_bg label{margin-top:10px; display:block}
.messages_container{max-height:200px; overflow:auto; padding-bottom:10px; border-bottom:1px dashed #999}
.private_message_container{padding:10px; border-radius:5px; -webkit-border-radius:5px; -moz-border-radius:5px; border:1px solid #CCC; margin-top:15px; }
.unread_msg, .unread_msg a{font-weight:bold; font-family:tahoma;}
.read_msg, .read_msg a{font-weight:normal; font-family:tahoma;}

View file

@ -30,7 +30,7 @@ a{text-decoration:none; font-family:Arial, Helvetica, sans-serif;color:#333; }
.verticle_ad{width:160px; float:left}
#footer{ background-image:url(../images/gradients.png); height:29px;}
#footer{ background-image:url(../images/gradients.png); height:29px; margin-top:15px}
.footer{width:980px; margin:auto; color:#fff; line-height:29px}
.video_title{font-size:18px; font-weight:bold; color:#09c; text-transform:uppercase; padding:5px 0px 10px 0px}
@ -72,6 +72,36 @@ a{text-decoration:none; font-family:Arial, Helvetica, sans-serif;color:#333; }
.blank_screen{width:580px; padding:10px; height:50px; color:#fff; font-size:16px; font-weight:bold; margin:10px 0px 10px 0px; background-color:#333; text-align:center;}
.video_right{width:300px; float:left}
.user_small_thumb{max-height:30px; max-width:30px}
/* FORM */
.input{border:1px solid #666; background-image:url(../images/field_bg.png); background-repeat:no-repeat; width:500px; min-height:20px; font-size:11px; color:#666; padding:5px}
.label{font-size:13px; font-weight:bold}
.label{font-size:13px; font-weight:bold}
/**
my account
*/
.account_table{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}
.account_table tr td{border-right:1px solid #c2c2c2; text-indent:10px; font-family:Tahoma; font-size:11px; text-transform:uppercase; font-weight:bold}
.account_table .last_td{border-right:0px}
.account_vid_list{ margin:5px 0px 5px 0px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px; }
.account_vid_list tr td{text-indent:10px; font-family:Tahoma; font-size:11px; text-transform:uppercase; font-weight:bold}
.account_vid_list .last_td{border-right:0px}
.acc_usr_video_thumb{border:1px solid #999; margin:1px; padding:1px; display:block; float:left; width:50px;}
.search_field{background-image:url(../images/blocks.png); width:150px; height:22px; border:none; padding-left:8px; padding-top:6px; font-size:11px; font:tahoma; margin:0px; float:left;}
.search_field_button{background-image:url(../images/blocks.png); width:25px; height:22px; border:0px; background-position:-160px -0px; padding:0px; margin:0px; text-indent:-50000000px; float:left; cursor:pointer; outline:none}
/**
* icons */
.arrow_pointing,.edit_icon,.delete_icon,.reply_icon{background-image:url(../images/icons.png); background-repeat:no-repeat; }
.reply_icon,.edit_icon,.delete_icon{height:15px; width:15px; }
.delete_icon{background-position:-0px -63px }
.edit_icon{background-position:-15px -63px }
.reply_icon{background-position:-30px -63px }
.video_control{font-weight:normal; margin-left:10px; font-size:10px}
.arrow_pointing{background-position:-0px -78px; width:24px; height:14px;}

View file

@ -0,0 +1,10 @@
@charset "utf-8";
/* CSS Document */
.cb_button_2,.cb_button,.small_button{background-image:url(../images/buttons.png)}
.cb_button_2,.cb_button{display:inline-block;height:31px; width:135px; color:#fff; line-height:31px; text-align:center; font-size:14px; font-weight:bold; border:none; font-family:Arial, Helvetica, sans-serif; cursor:pointer}
.cb_button_2:hover,.cb_button:hover{background-position:-0px -31px}
.cb_button_2{font-size:12px}
.small_button{display:inline-block;height:21px; width:94px; color:#fff; text-align:center; font-size:11px; font-weight:bold; border:none; font-family:Arial, Helvetica, sans-serif; cursor:pointer; background-position:-0px -62px}
.small_button:hover{background-position:-0px -83px}

View file

@ -9,3 +9,5 @@ Style name: ClipBucket v2
@import url("navbar.css");
@import url("blocks.css");
@import url("rating.css");
@import url("view_channel.css");
@import url("buttons.css");

View file

@ -0,0 +1,58 @@
@charset "utf-8";
/* CSS Document */
.channel_inner_box, .channel_inner_box a{color:#fff; }
.channel_box{background-color:#CCC;}
.channel_inner_box{background-color:#666;}
.channel_inner_box a{font-weight:bold}
.channel_box
{
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
padding:5px; margin:auto;
margin-bottom:10px;
}
.channel_inner_box
{
border-radius:3px;
-moz-border-radius:3px;
-webkit-border-radius:3px;
width:99%; margin:auto;
padding:5px;
font-size:12px;
}
.channel_heading, .channel_top{font-size:16px; font-weight:bold}
.channel_heading_mid{font-size:12px; font-weight:bold}
.channel_inner_box .usr_small_thumb
{
width:40px;
height:30px;
float:left;
}
.usr_channel{ display:inline-block; float:left; margin-right:15px }
.top_channel_links{display:block; margin:0px; padding:0px; float:left; line-height:33px}
.top_channel_links li{list-style:none; padding:0px; margin:0px; display:block; float:left; width:100px}
.usr_thumb_container{margin-bottom:10px}
.user_thumb{max-width:260px}
.channel_action_links{display:block; text-align:center; margin:0px; padding:0px;line-height:normal}
.channel_action_links a{font-size:12px; line-height:normal}
.channel_action_links li{list-style:none;line-height:normal}
.show_info{clear:both}
.show_info .item_list{width:50%; display:block}
.float_right{float:right}
.float_left{float:left}
.right_column{float:right; width:675px; margin-right:3px}
.right_column .channel_inner_box{margin-bottom:5px}

View file

@ -406,7 +406,7 @@
<td>&nbsp;</td>
<td align="right" class="header3">{$LANG.user_old_pass}:</td>
<td height="30" align="left" style="padding-left:5px"><label>
<input name="old_pass" type="password" id="old_pass" size="45" />
<input name="old_pass" type="password" id="old_pass" style="margin-bottom:10px">
</label></td>
<td>&nbsp;</td>
</tr>

View file

@ -1,49 +0,0 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
require 'includes/config.inc.php';
//Getting Related Videos List
$query_param = "broadcast='public' AND active='yes' AND status='Successful'";
$limit = "LIMIT ".VLISTPT;
$query = "SELECT * FROM video WHERE $query_param ORDER BY RAND() $limit ";
$rs = $db->Execute($query);
$random = $rs->getrows();
$total_random = $rs->recordcount() + 0;
for($id=0;$id<$total_random;$id++){
$flv = $random[$id]['flv'];
$thumb = GetThumb($flv);
$random[$id]['thumb'] = $thumb;
$random[$id]['url'] = VideoLink($random[$id]['videokey'],$random[$id]['title']);
}
Assign('random',$random);
//Getting Newest Added
$query = "SELECT * FROM video WHERE $query_param ORDER BY date_added DESC $limit ";
$rs = $db->Execute($query);
$latest = $rs->getrows();
$total_latest = $rs->recordcount() + 0;
for($id=0;$id<$total_latest;$id++){
$flv = $latest[$id]['flv'];
$thumb = GetThumb($flv);
$latest[$id]['thumb'] = $thumb;
$latest[$id]['url'] = VideoLink($latest[$id]['videokey'],$latest[$id]['title']);
}
Assign('latest',$latest);
Assign('show',$_GET['show']);
Template('tabs01.html');
?>

View file

@ -1,87 +0,0 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
require 'includes/config.inc.php';
$show=$_GET['show'];
Assign('show',$show);
$user=$_GET['user'];
Assign('user',$user);
$userdetails = $userquery->GetUserData_username($user);
$query_param = "broadcast='public' AND active='yes' AND status='Successful'";
if($show=='contacts'){
//Listing Contacts
$limit = CLISTPT;
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";
$orderby = " ORDER BY date_added DESC";
$sql = "SELECT * FROM contacts WHERE username='".$user."' $orderby $query_limit";
$contacts_data = $db->Execute($sql);
$total_contacts = $contacts_data->recordcount() + 0;
$contacts = $contacts_data->getrows();
for($id=0;$id<$total_contacts;$id++){
$contact_details = $userquery->GetUserData_username($contacts[$id]['friend_username']);
$contacts[$id]['avatar'] = $contact_details['avatar'];
$contacts[$id]['views'] = $contact_details['profile_hits'];
$contacts[$id]['videos'] = $contact_details['total_videos'];
$contacts[$id]['comments'] = $contact_details['total_comments'];
$contacts[$id]['doj'] = $contact_details['doj'];
}
Assign('total_contacts',$total_contacts);
Assign('contacts',$contacts);
}
if($show=='fav_videos'){
//Listing Contacts
$limit = VLISTPT;
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";
$orderby = " ORDER BY date_added DESC";
$sql = "SELECT * FROM video_favourites WHERE userid='".$userdetails['userid']."' $orderby $query_limit";
$video_Data = $db->Execute($sql);
$total_videos = $video_Data->recordcount() + 0;
$videos = $video_Data->getrows();
for($id=0;$id<$total_videos;$id++){
$videos_details = $myquery->GetVideoDetails($videos[$id]['videoid']);
$flv = $videos_details['flv'];
$videos[$id]['thumb'] = GetThumb($flv);
$videos[$id]['show_rating'] = pullRating($videos_details['videoid'],false,false,false,@novote);
$videos[$id]['title'] = $videos_details['title'];
$videos[$id]['description'] = $videos_details['description'];
$videos[$id]['videokey'] = $videos_details['videokey'];
$videos[$id]['views'] = $videos_details['views'];
$videos[$id]['duration'] = SetTime($videos_details['duration']);
$videos[$id]['url'] = VideoLink($videos[$id]['videokey'],$videos[$id]['title']);
}
Assign('total_videos',$total_videos);
Assign('videos',$videos);
}
Template('tabs02.html');
?>

View file

@ -1,76 +0,0 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
require 'includes/config.inc.php';
$show = $_GET['show'];
$query_param = "broadcast='public' AND active='yes' AND status='Successful'";
//Getting Featured Videos
if($show == 'featured'){
$query = "SELECT * FROM video WHERE featured = 'yes' AND $query_param LIMIT 0,8";
}
//Getting Recently Added
if($show == 'latest'){
$query = "SELECT * FROM video WHERE $query_param ORDER BY date_added DESC LIMIT 0,8";
}
//Getting Most Viewed
if($show == 'most_viewed'){
$query = "SELECT * FROM video WHERE $query_param ORDER BY views DESC LIMIT 0,8";
}
//Getting Most Discussed
if($show == 'most_discussed'){
$query = "SELECT * FROM video WHERE comments_count > 0 AND $query_param ORDER BY comments_count DESC LIMIT 0,8";
}
//Getting Highest Rated
if($show == 'highest_rated'){
$query = "SELECT * FROM video WHERE rating > 0 AND $query_param ORDER BY rating DESC LIMIT 0,8";
}
//Getting Whats Hot
$list = array(
'featured' => $LANG['featured'],
'latest' => $LANG['recently_added'],
'most_viewed' => $LANG['most_viewed'],
'most_discussed' => $LANG['most_discussed'],
'highest_rated' => $LANG['highest_rated'],
'link01' => BASEURL.videos_link.'?order=fr',
'link02' => BASEURL.videos_link.'?order=mr',
'link03' => BASEURL.videos_link.'?order=mv',
'link04' => BASEURL.videos_link.'?order=md',
'link05' => BASEURL.videos_link.'?order=hr',
);
$text = $list[$show];
Assign('text',$text);
@$link = $_GET['link'];
@$link = $list[$link];
Assign('link',$link);
$data = $db->Execute($query);
if($data)
{
$videos = $data->getrows();
$total = $data->recordcount() + 0;
for($id=0;$id<$total;$id++){
$videos[$id]['thumb'] = GetThumb($videos[$id]['flv']);
$videos[$id]['description'] = nl2br($videos[$id]['description']);
$videos[$id]['duration'] = SetTime($videos[$id]['duration']);
$videos[$id]['comments'] = $myquery->GetTotalVideoComments($videos[$id]['videoid']);
$videos[$id]['show_rating'] = pullRating($videos[$id]['videoid'],false,false,false,@novote);
$videos[$id]['url'] = VideoLink($videos[$id]['videokey'],$videos[$id]['title']);
}
Assign('videos',$videos);
}
Assign('show',$_GET['show']);
Template('tabs03.html');
?>

View file

@ -10,7 +10,8 @@
define("PAGE","upload_video");
require 'includes/config.inc.php';
$userquery->login_check('upload_access');
$userquery->logincheck();
$userquery->login_check('allow_video_upload');
$pages->page_redir();
subtitle('upload');

View file

@ -1,58 +0,0 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
if(@$_GET['updated']){
$msg = $LANG['usr_pof_upd_msg'];
}
//Updating User Record
if(isset($_POST['update'])){
$userquery->UpdateUserProfile($_COOKIE['userid']);
}
//Update User Email Settings
if(isset($_POST['update_email'])){
$msg = $userquery->UpdateUserEmailSettings($_COOKIE['userid']);
}
//Update User Email Settings
if(isset($_POST['change_password'])){
$msg = $userquery->ChangeUserPassword($_COOKIE['userid']);
}
//Get User Details
$user = $_COOKIE['userid'];
$data = $userquery->GetUserData($user);
list($data['y'],$data['m'],$data['d']) = explode('-',$data['dob']);
Assign('data',$data);
//Getting User Videos
$sql = "SELECT * from video WHERE username = '".$data['username']."'";
$rs = $db->Execute($sql);
$videos = $rs->getrows();
Assign('videos',$videos);
//GET setting options
@$show = $_GET['settings'];
Assign('show',$show);
@Assign('msg',$msg);
subtitle('my_account');
if(empty($_GET['show'])){
Template('header.html');
Template('message.html');
}
Template('user_account.html');
if(empty($_GET['show'])){
Template('footer.html');
}
?>

View file

@ -1,71 +1,56 @@
<?php
/*
****************************************************************************************************
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved. |
| @ Author : ArslanHassan |
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
define("THIS_PAGE",'user_videos');
require 'includes/config.inc.php';
$pages->page_redir();
$user = mysql_clean($_GET['user']);
Assign('user',$user);
$query_param = "broadcast='public' AND active='yes' AND status='Successful'";
//Listing Videos
$userquery->perm_check('view_videos',true);
$limit = VLISTPP;
Assign('limit',$limit);
$page = clean(@$_GET['page']);
if(empty($page) || $page == 0 || !is_numeric($page)){
$page = 1;
$u = $_GET['user'];
$u = $u ? $u : $_GET['userid'];
$u = $u ? $u : $_GET['username'];
$u = $u ? $u : $_GET['uid'];
$u = $u ? $u : $_GET['u'];
$udetails = $userquery->get_user_details($u);
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,VLISTPP);
if($udetails)
{
assign("u",$udetails);
$mode = $_GET['mode'];
switch($mode)
{
case 'uploads':
default:
{
$videos = get_videos(array('user'=>$udetails['userid'],'limit'=>$get_limit));
$total_rows = get_videos(array('user'=>$udetails['userid'],'count_only'=>true));
}
}
$from = $page-1;
$from = $from*$limit;
$query_limit = "limit $from,$limit";
$orderby = " ORDER BY date_added DESC";
$sql = "SELECT * FROM video WHERE username='".$user."' AND $query_param $orderby $query_limit";
$sql_p = "SELECT * FROM video WHERE username='".$user."' AND $query_param ";
$vdo_data = $db->Execute($sql);
$total_vdo = $vdo_data->recordcount() + 0;
$videos = $vdo_data->getrows();
for($id=0;$id<$total_vdo;$id++){
$videos[$id]['thumb'] = GetThumb($videos[$id]['flv']);
$videos[$id]['duration'] = SetTime($videos[$id]['duration']);
$videos[$id]['show_rating'] = pullRating($videos[$id]['videoid'],false,false,false);
$videos[$id]['url'] = VideoLink($videos[$id]['videokey'],$videos[$id]['title']);
}
Assign('videos',$videos);
//Pagination
$link = '?user='.$user;
Assign('link',$link);
$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);
Assign('videos', $videos);
//Collecting Data for Pagination
$total_pages = count_pages($total_rows,VLISTPP);
Assign('subtitle',$user."'s Videos");
//Pagination
$pages->paginate($total_pages,$page);
Assign('msg',@$msg);
Template('header.html');
Template('message.html');
Template('user_videos.html');
Template('footer.html');
}else{
e(lang("usr_exist_err"));
$Cbucket->show_page = false;
}
template_files('user_videos.html');
display_it();
?>

View file

@ -9,7 +9,7 @@
define("THIS_PAGE",'videos');
require 'includes/config.inc.php';
$pages->page_redir();
$userquery->perm_check('view_videos',true);
//Getting Video List
$page = mysql_clean($_GET['page']);

View file

@ -1,142 +1,47 @@
<?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 'includes/config.inc.php';
$pages->page_redir();
$query_param = "broadcast='public' AND active='yes' AND status='Successful'";
$userquery->perm_check('view_channel',true);
//Get User Details
if($_GET['user'] != 'Array'){
$user = mysql_clean($_GET['user']);
}
$data = $userquery->GetUserData_username($user);
$data['total_videos'] = $userquery->TotalVideos($user);
//$userquery->UpdateSubscribers($user);
$data['age'] = $calcdate->age($data['dob']);
$show_education = array(
'0'=>$LANG['usr_arr_no_ans'],
'1'=>$LANG['usr_arr_elementary'],
'2'=>$LANG['usr_arr_hi_school'],
'3'=>$LANG['usr_arr_some_colg'],
'4'=>$LANG['usr_arr_assoc_deg'],
'5'=>$LANG['usr_arr_bach_deg'],
'6'=>$LANG['usr_arr_mast_deg'],
'7'=>$LANG['usr_arr_phd'],
'8'=>$LANG['usr_arr_post_doc']
);
$show_relation = array(
'0'=>$LANG['usr_arr_no_ans'],
'1'=>$LANG['usr_arr_single'],
'2'=>$LANG['usr_arr_married'],
'3'=>$LANG['usr_arr_comitted'],
'4'=>$LANG['usr_arr_open_marriage'],
'5'=>$LANG['usr_arr_open_relate']
);
@$data['show_relation']=$show_relation[$data['relation_status']];
@$data['show_education']=$show_education[$data['education']];
$pattern = array('/http:\/\//','/www\./');
$replace = array('','');
if(!empty($data['web_url']))
$data['web_url'] = 'http://'.preg_replace($pattern,$replace,$data['web_url']);
Assign('data',$data);
//Adding Comment
if(isset($_POST['add_comment'])){
$comment = mysql_clean($_POST['comment']);
$msg = $userquery->AddChannelComment($data['username'],$comment);
}
//Getting Channel Featured Video
$data['featured_video'];
$vkey = $data['featured_video'];
if(!empty($vkey)){
$f_video = $myquery->GetVideDetails($vkey);
$f_video['url'] = VideoLink($f_video['videokey'],$f_video['title']);
$myquery->UpdateVideoViews($vkey);
Assign('f_video',$f_video);
}
$u = $_GET['user'];
$u = $u ? $u : $_GET['userid'];
$u = $u ? $u : $_GET['username'];
$u = $u ? $u : $_GET['uid'];
$u = $u ? $u : $_GET['u'];
Assign('subtitle',$data['username'].$LANG['title_view_channel']);
//Update Number Of Channel Views
if(!empty($data['userid'])){
$userquery->UpdateChannelViews($user);
$udetails = $userquery->get_user_details($u);
if($udetails)
{
//Subscribing User
if($_GET['subscribe'])
{
$userquery->subscribe_user($udetails['userid']);
}
if(empty($data['userid'])){
$msg = $LANG['usr_exist_err2'];
//Adding Comment
if(isset($_POST['add_comment']))
{
$userquery->add_comment($_POST['comment'],$udetails['userid']);
}
assign("u",$udetails);
assign('p',$userquery->get_user_profile($udetails['userid']));
//Getting Video List Of Videos
$limit = VLISTPT;
$sql = "SELECT * FROM video WHERE username='".$user."' AND $query_param ORDER BY views DESC LIMIT $limit";
$vdo_data = $db->Execute($sql);
$total_vdo = $vdo_data->recordcount() + 0;
$videos = $vdo_data->getrows();
for($id=0;$id<$total_vdo;$id++){
$videos[$id]['thumb'] = GetThumb($videos[$id]['flv']);
$videos[$id]['duration'] = SetTime($videos[$id]['duration']);
$videos[$id]['show_rating'] = pullRating($videos[$id]['videoid'],false,false,false,'novote');
$videos[$id]['url'] = VideoLink($videos[$id]['videokey'],$videos[$id]['title']);
}
Assign('videos',$videos);
//Subscribing User
if(isset($_POST['subscribe'])){
$userquery->logincheck();
$sub_user = $_COOKIE['username'];
$sub_to = $user;
$msg = $userquery->SubscribeUser($sub_user,$sub_to);
}
//Getting Comments
@$limit = $_GET['comments'];
if(empty($limit) || $limit != 'all'){
$limit = " LIMIT 0,10";
}else{
$limit = " ";
e(lang("usr_exist_err"));
$Cbucket->show_page = false;
}
$sql = "Select * FROM channel_comments WHERE channel_user='".$user."' ORDER BY date_added DESC $limit";
$rs = $db->Execute($sql);
$total_comments = $rs->recordcount() + 0;
$comments = $rs->getrows();
for($id=0;$id<$total_comments;$id++){
$user_data = $userquery->GetUserData_username($comments[$id]['username']);
$thumb = $user_data['avatar'];
$smallthumb = substr($thumb, 0, strrpos($thumb, '.')).'-small.';
$smallthumb .= substr($thumb, strrpos($thumb,'.') + 1);
$smallthumb;
$comments[$id]['small_thumb'] = $smallthumb;
}
Assign('total_comments',$total_comments);
Assign('comments',$comments);
//Add Contact to FriendsList
if(isset($_POST['friend_username'])){
$userquery->logincheck();
$friend = $_POST['friend_username'];
$msg = $userquery->AddContact($friend,$_COOKIE['username']);
}
@Assign('msg',$msg);
Template('header.html');
Template('message.html');
if($Cbucket->show_page)
Template('view_channel.html');
Template('footer.html');
else
display_it();
?>

View file

@ -28,14 +28,20 @@ if(video_playable($vkey))
$cbvid->action->share_content($vdo['videoid']);
}
//Calling Functions When Video Is Called
//Calling Functions When Video Is going to play
call_watch_video_function($vdo);
//Addming Comment
//adding Comment
if(isset($_POST['add_comment']))
{
$cbvideo->add_comment($_POST['comment'],$vdo['videoid']);
}
//Adding Video To Favorites
if(isset($_REQUEST['favorite']))
{
$cbvideo->action->add_to_fav($vdo['videoid']);
}
}
//Displaying The Template