ADDED : ClipBucket Object Class
ADDED : New ClipBucket Template ADDED : New Templating System ADDED : New Favicon ADDED : New ClipBucket Player
20
upload/actions/edit_comment.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is used to update
|
||||
* Comment
|
||||
* Author : Arslan Hassan
|
||||
* Since : 10 Aug, 2009
|
||||
*/
|
||||
|
||||
|
||||
require'../includes/admin_config.php';
|
||||
$userquery->admin_login_check();
|
||||
|
||||
$cid = $_POST['id'];
|
||||
$value = $_POST['value'];
|
||||
|
||||
$myquery->update_comment($cid,$value);
|
||||
|
||||
echo mysql_clean($value);
|
||||
?>
|
|
@ -28,30 +28,33 @@ $orig_file = CON_DIR.'/'.$tmp_file.'.'.$ext;
|
|||
//rcopy($temp_file,$orig_file);
|
||||
rename($temp_file,$orig_file);
|
||||
|
||||
|
||||
$configs = array
|
||||
(
|
||||
'use_video_rate' => true,
|
||||
'use_video_bit_rate' => true,
|
||||
'use_audio_rate' => true,
|
||||
'use_audio_bit_rate' => true,
|
||||
'format' => 'flv',
|
||||
'video_codec'=>'flv',
|
||||
'audio_rate'=>22050,
|
||||
'audio_bitrate'=>64000,
|
||||
'video_bitrate'=>500000,
|
||||
'video_width'=>400,
|
||||
'video_height'=>300,
|
||||
'resize'=>'max'
|
||||
);
|
||||
$configs = array
|
||||
(
|
||||
'use_video_rate' => true,
|
||||
'use_video_bit_rate' => true,
|
||||
'use_audio_rate' => true,
|
||||
'use_audio_bit_rate' => true,
|
||||
'format' => 'flv',
|
||||
'video_codec'=>'flv',
|
||||
'audio_rate'=>22050,
|
||||
'audio_bitrate'=>128000,
|
||||
'video_bitrate'=>512000,
|
||||
'video_width'=>400,
|
||||
'video_height'=>300,
|
||||
'resize'=>'max'
|
||||
);
|
||||
|
||||
|
||||
$ffmpeg = new ffmpeg($orig_file);
|
||||
$ffmpeg->configs = $configs;
|
||||
$ffmpeg->gen_thumbs = TRUE;
|
||||
$ffmpeg->gen_big_thumb = TRUE;
|
||||
$ffmpeg->output_file = VIDEOS_DIR.'/'.$tmp_file.'.flv';
|
||||
$ffmpeg->two_pass = FALSE;
|
||||
$ffmpeg->remove_input=FALSE;
|
||||
$ffmpeg->ClipBucket();
|
||||
|
||||
exit();
|
||||
$db->update("conversion_queue",
|
||||
array("cqueue_conversion"),
|
||||
array("yes")," cqueue_id = '".$queue_details['cqueue_id']."'");
|
||||
|
|
|
@ -29,19 +29,19 @@ $user = mysql_clean(@$_GET['userid']);
|
|||
}
|
||||
//Get User Details
|
||||
$data = $userquery->GetUserData($user);
|
||||
DoTemplate::assign('data',$data);
|
||||
CBTemplate::assign('data',$data);
|
||||
|
||||
}else{
|
||||
$msg[] = "User Doesn't Exist";
|
||||
}
|
||||
|
||||
//Assing Template
|
||||
DoTemplate::assign('country',$signup->country());
|
||||
DoTemplate::assign('msg',@$msg);
|
||||
DoTemplate::display(LAYOUT.'/header.html');
|
||||
DoTemplate::display(LAYOUT.'/leftmenu.html');
|
||||
DoTemplate::display(LAYOUT.'/message.html');
|
||||
DoTemplate::display(LAYOUT.'/edit_member.html');
|
||||
DoTemplate::display(LAYOUT.'/footer.html');
|
||||
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');
|
||||
|
||||
?>
|
|
@ -109,7 +109,7 @@ if(isset($_POST['delete_selected'])){
|
|||
'search_order' => mysql_clean($_GET['order'])
|
||||
);
|
||||
while(list($name,$value) = each($values_search)){
|
||||
DoTemplate::assign($name,$value);
|
||||
CBTemplate::assign($name,$value);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ if(isset($_POST['upload_01'])){
|
|||
'default_date' => $_POST['year'].'-'.$_POST['month'].'-'.$_POST['day']
|
||||
);
|
||||
while(list($name,$value) = each($values)){
|
||||
DoTemplate::assign($name,$value);
|
||||
CBTemplate::assign($name,$value);
|
||||
}
|
||||
|
||||
for($id=0;$id<=3;$id++){
|
||||
|
|
|
@ -31,7 +31,7 @@ $view = clean(@$_GET['view']);
|
|||
if(empty($view)){ $view = 'showall'; }
|
||||
while(list($property['value'],$property['name']) = each($property_values)){
|
||||
if($property['value'] == $view){
|
||||
DoTemplate::assign("property",$property);
|
||||
CBTemplate::assign("property",$property);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ if(isset($_GET['unban'])){
|
|||
'default_zip' => mysql_clean($_POST['zip'])
|
||||
);
|
||||
while(list($name,$value) = each($values)){
|
||||
DoTemplate::assign($name,$value);
|
||||
CBTemplate::assign($name,$value);
|
||||
}
|
||||
|
||||
@$values_search= array(
|
||||
|
@ -193,7 +193,7 @@ if(isset($_GET['unban'])){
|
|||
'search_order' => mysql_clean($_GET['order'])
|
||||
);
|
||||
while(list($name,$value) = each($values_search)){
|
||||
DoTemplate::assign($name,$value);
|
||||
CBTemplate::assign($name,$value);
|
||||
}
|
||||
|
||||
//Jump To The page
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
<table width="99%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="35" align="center" class="left_head">CID</td>
|
||||
<td width="35" class="head_sep_left">UID</td>
|
||||
<td class="head"><div class="head_sep_left" style="width:200px">Comment</div></td>
|
||||
<td width="35" class="head_sep_left">UID</td>
|
||||
<td width="100" class="head_sep_left">Username</td>
|
||||
<td width="100" class="head_sep_left">Email</td>
|
||||
<td class="head_sep_left"><div class="head_sep_left" style="width:200px">Comment</div></td>
|
||||
<td width="200" class="head_sep_left">Date</td>
|
||||
<td width="70" class="head_sep_left">Votes</td>
|
||||
<td width="100" class="right_head"> </td>
|
||||
|
@ -16,11 +18,13 @@
|
|||
{foreach from=$myquery->get_comments($id,$type) item=comment}
|
||||
|
||||
{if $comment.parent_id == 0}
|
||||
|
||||
{if $comment.userid !='' }{assign var="udetails" value=$userquery->get_user_details($comment.userid)}{/if}
|
||||
<tr style="background-color:#{$bgcolor}">
|
||||
<td width="35" align="left">{$comment.comment_id}</td>
|
||||
<td width="35" align="left">{$comment.userid}</td>
|
||||
<td >{$comment.comment}</td>
|
||||
<td width="100" align="left">{if $comment.anonym_name}{$comment.anonym_name}{else}{$udetails.username}{/if}</td>
|
||||
<td width="100" align="left">{if $comment.anonym_email}{$comment.anonym_email}{else}{$udetails.email}{/if}</td>
|
||||
<td ><div class="edit_comment" id="{$comment.comment_id}">{$comment.comment}</div></td>
|
||||
<td width="200" align="left" >{$comment.date_added|date_format}</td>
|
||||
<td width="70" align="left" >{$comment.vote}</td>
|
||||
<td width="100" ><a href="?{$link}&delete_comment={$comment.comment_id}">Delete</a></td>
|
||||
|
@ -29,10 +33,13 @@
|
|||
|
||||
{foreach from=$myquery->get_comments($id,$type,false,$comment.comment_id,TRUE) item=reply}
|
||||
{if $reply.comment !=''}
|
||||
{if $reply.userid !='' }{assign var="udetails" value=$userquery->get_user_details($reply.userid)}{/if}
|
||||
<tr style="background-color:#{$bgcolor}">
|
||||
<td width="35" align="left">{$reply.comment_id}</td>
|
||||
<td width="35" align="left">{$reply.userid}</td>
|
||||
<td >{$comment.comment_id} ⇔ {$reply.comment}</td>
|
||||
<td width="100" align="left">{if $reply.anonym_name}{$reply.anonym_name}{else}{$udetails.username}{/if}</td>
|
||||
<td width="100" align="left">{if $reply.anonym_email}{$reply.anonym_email}{else}{$udetails.email}{/if}</td>
|
||||
<td ><div class="edit_comment" id="{$reply.comment_id}">{$comment.comment_id} ⇔ {$reply.comment}</div></td>
|
||||
<td width="200" align="left" >{$reply.date_added|date_format}</td>
|
||||
<td width="70" align="left" >{$reply.vote}</td>
|
||||
<td width="100" ><a href="?{$link}&delete_comment={$reply.comment_id}">Delete</a></td>
|
||||
|
@ -50,7 +57,7 @@
|
|||
{/foreach}
|
||||
{else}
|
||||
<tr style="background-color:#FFF">
|
||||
<td colspan="6" align="center"><em>No User Comments For This Video</em></td>
|
||||
<td colspan="8" align="center"><em>No User Comments For This Video</em></td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<h2>Edit Announcement</h2>
|
||||
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form id="form1" name="form1" method="post" action="">
|
||||
Announcement<br />
|
||||
<label for="textarea"></label>
|
||||
<textarea name="text" id="textarea" cols="75" rows="6">{get_announcement}</textarea>
|
||||
<br />
|
||||
<input type="submit" name="update" value="Update" />
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
|
@ -54,7 +54,16 @@ var baseurl = "{$baseurl}";
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.edit').editable(baseurl+'/actions/update_phrase.php', {
|
||||
$('.edit_lang').editable(baseurl+'/actions/update_phrase.php', {
|
||||
// cancel : 'Cancel',
|
||||
// submit : 'OK',
|
||||
indicator : '<img src="'+baseurl+'/images/icons/progIndicator.gif">',
|
||||
tooltip : 'Click to edit...',
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.edit_comment').editable(baseurl+'/actions/edit_comment.php', {
|
||||
// cancel : 'Cancel',
|
||||
// submit : 'OK',
|
||||
indicator : '<img src="'+baseurl+'/images/icons/progIndicator.gif">',
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<tr>
|
||||
<td width="40" style="padding-left:5px">{$lang_phrases[p_list].id}</td>
|
||||
<td width="200" >{$lang_phrases[p_list].varname}</td>
|
||||
<td align="left"><div class="edit" id="{$lang_phrases[p_list].id}">{$lang_phrases[p_list].text}</div></td>
|
||||
<td align="left"><div class="edit_lang" id="{$lang_phrases[p_list].id}">{$lang_phrases[p_list].text}</div></td>
|
||||
<td width="200" ></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
39
upload/admin_area/styles/cbadmin/layout/templates.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<div class="setting_title">Selected Template</div>
|
||||
<div>
|
||||
{assign var="selected" value=$Cbucket->configs.template_dir}
|
||||
{assign var="curtpl" value=$cbtpl->get_template_details($selected)}
|
||||
<table width="800" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="190"><img src="{$cbtpl->get_preview_thumb($curtpl.dir)}" ></td>
|
||||
<td valign="top"><h2 style="display:inline">{$curtpl.name}</h2> — <em><a href="{$curtpl.website.link}"><strong>{$curtpl.author}</strong></a></em><br />
|
||||
{$curtpl.description}<br />
|
||||
Version : {$curtpl.version} Released on {$curtpl.released|date_format}<br />
|
||||
Website : <a href="{$curtpl.website.link}">{$curtpl.website.title}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr size="1" noshade />
|
||||
|
||||
<div class="setting_title">Available Templates</div>
|
||||
|
||||
{* Listing All Avilable Templates *}
|
||||
|
||||
{assign var='templates' value=$cbtpl->get_templates()}
|
||||
|
||||
<div class="templates_container">
|
||||
{foreach from=$templates item=template}
|
||||
{if $selected != $template.dir}
|
||||
<div class="template_box" align="center">
|
||||
<img src="{$cbtpl->get_preview_thumb($template.dir)}" >
|
||||
<div align="center" style="" class="tpl_title">
|
||||
{$template.name} <br /><em>by <strong>{$template.author}</strong></em><br />
|
||||
<a href="templates.php?change={$template.dir}">Activate This Template</a><br />
|
||||
<a href="{$baseurl}?template={$template.dir}" target="_blank">Preview</a><br />
|
||||
<a href="{$baseurl}?template={$template.dir}&set_template=yes" target="_blank">Preview & Activate</a></div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
33
upload/admin_area/styles/cbadmin/layout/upload_thumbs.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{if $data.title neq ""}
|
||||
<h2>Manage Video Thumbs</h2>
|
||||
<form action="upload_thumbs.php?video={$data.videoid}" method="post" enctype="multipart/form-data" name="form1">
|
||||
<a href="edit_video.php?video={$data.videoid}">« Back to Edit Details</a> | <a href="upload_thumbs.php?video={$data.videoid}&gen_more=true">Regenerate Thumbs</a><br />
|
||||
<fieldset class="fieldset">
|
||||
{assign var=vidthumbs value=func->get_thumb($data,1,TRUE)}
|
||||
|
||||
{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 $data.default_thumb==$vid_thumb|get_thumb_num} checked="checked"{/if} />Default</label><br />
|
||||
{if $vid_thumb|getname!='processing'}
|
||||
<a href="?video={$data.videoid}&delete={$vid_thumb|getname}.{$vid_thumb|getext}">Delete</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
<div style="clear:both;"></div><br />
|
||||
</fieldset>
|
||||
<div align="left" style=" width:98%; margin:auto; margin-top:10px;">
|
||||
<input type="submit" name="update_default_thumb" value="Update Video Thumb" class="button"/>
|
||||
</div>
|
||||
</form><form action="upload_thumbs.php?video={$data.videoid}" method="post" enctype="multipart/form-data" name="form1">
|
||||
<h2>Upload New Thumb</h2>
|
||||
<div align="right" style="width:500px;"><a href="javascript:void(0)" onclick="$('#thumb_fileds').append('<input name=\'vid_thumb[]\' type=\'file\' /><br>')">+ Insert More</a></div>
|
||||
<div id="thumb_fileds">
|
||||
<input name="vid_thumb[]" type="file" />
|
||||
<label for="thumb_file"></label>
|
||||
<br />
|
||||
</div><br />
|
||||
|
||||
<input type="submit" name="upload_thumbs" value="Upload Thumb(s)" class="button"/>
|
||||
</form>
|
||||
{/if}
|
104
upload/admin_area/styles/cbadmin/layout/user_levels.html
Normal file
|
@ -0,0 +1,104 @@
|
|||
<link href="../theme/stylesheet.css" rel="stylesheet" type="text/css">
|
||||
<h2>User Levels</h2>
|
||||
|
||||
|
||||
{if $view=='view'}
|
||||
|
||||
<a href="?mode=add">Add New Level</a>
|
||||
|
||||
<table width="99%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr class="tr_head">
|
||||
<td width="20">ID</td>
|
||||
<td width="200">Name</td>
|
||||
<td width="50">Active</td>
|
||||
<td width="50">Users</td>
|
||||
<td>Actions</td>
|
||||
</tr>
|
||||
{assign var=levels value=$userquery->get_levels()}
|
||||
{section name=l loop=$levels}
|
||||
<tr class="td_body">
|
||||
<td>{$levels[l].user_level_id}</td>
|
||||
<td>{$levels[l].user_level_name}</td>
|
||||
<td>{$levels[l].user_level_active}</td>
|
||||
<td>{$userquery->get_level_users($levels[l].user_level_id,true)}</td>
|
||||
<td><a href="?mode=edit&lid={$levels[l].user_level_id}">Edit</a>{if $levels[l].user_level_is_default !=yes} | <a href="?action=delete&lid={$levels[l].user_level_id}">Remove</a>{/if}</td>
|
||||
</tr>
|
||||
{sectionelse}
|
||||
<tr class="td_body">
|
||||
<td colspan="5" align="center">No Levels Were Found</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
|
||||
{elseif $view=='edit'}
|
||||
<form action="" method="post">
|
||||
<table width="99%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr class="tr_head">
|
||||
<td>Edit Level</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="99%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr class="td_body">
|
||||
<td width="13%">Level Name</td>
|
||||
<td width="87%"><label for="level_name"></label>
|
||||
<input name="level_name" type="text" id="level_name" value="{$level_details.user_level_name}" /></td>
|
||||
</tr>
|
||||
{foreach from=$userquery->access_type_list key=access item=name}
|
||||
<tr class="td_body">
|
||||
<td width="13%">{$name}</td>
|
||||
<td width="87%">
|
||||
<label>
|
||||
<input type="radio" name="{$access}" value="yes"{if $level_perms.$access==yes} checked="checked"{/if}/>
|
||||
Yes</label>
|
||||
<label>
|
||||
<input type="radio" name="{$access}" value="no"{if $level_perms.$access==no} checked="checked"{/if}/>
|
||||
No</label>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<table width="99%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="button"></label>
|
||||
<input type="submit" name="update_level_perms" id="button" value="Update" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{elseif $view=='add'}
|
||||
<form action="" method="post">
|
||||
<table width="99%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr class="tr_head">
|
||||
<td>ADD Level</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="99%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr class="td_body">
|
||||
<td width="13%">Level Name</td>
|
||||
<td width="87%"><label for="level_name"></label>
|
||||
<span class="tips">
|
||||
<label for="level_name"></label>
|
||||
<input name="level_name" type="text" id="level_name" value="{$smarty.post.level_name|form_val}" />
|
||||
</span></td>
|
||||
</tr>
|
||||
{foreach from=$userquery->access_type_list key=access item=name}
|
||||
<tr class="td_body">
|
||||
<td width="13%">{$name}</td>
|
||||
<td width="87%">
|
||||
<label>
|
||||
<input type="radio" name="{$access}" value="yes" checked="checked" {if $smarty.post.$access==yes} checked="checked"{/if} />
|
||||
Yes</label>
|
||||
<label>
|
||||
<input type="radio" name="{$access}" value="no"{if $smarty.post.$access==no} checked="checked"{/if}/>
|
||||
No</label>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<table width="99%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="button"></label>
|
||||
<input type="submit" name="add_new_level" id="button" value="Add Level" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/if}
|
|
@ -195,3 +195,5 @@
|
|||
<td colspan="2" align="center">{assign var=id value=$data.videoid}{include file="$style_dir/blocks/comments.html" type=v id=$data.videoid link="video=$id"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -120,4 +120,12 @@ padding-left:5px; font-size:16px; font-weight:bold; font-family:Arial, Helvetica
|
|||
.item_listing td{border-bottom:1px solid #ccc}
|
||||
|
||||
.item_listing li{list-style:none}
|
||||
.item_listing a{color:#0c4469; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; font-style:italic}
|
||||
.item_listing a{color:#0c4469; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; font-style:italic}
|
||||
|
||||
.templates_container
|
||||
{
|
||||
font-size:11px; color:#333;
|
||||
}
|
||||
.templates_container .tpl_title{width:80%; margin:auto; font-size:12px;}
|
||||
.templates_container .template_box{width:200px; float:left; margin:10px; padding:10px}
|
||||
.templates_container .template_box:hover{background-color:#F3E8FF}
|
|
@ -8,67 +8,13 @@
|
|||
*/
|
||||
|
||||
require_once '../includes/admin_config.php';
|
||||
$userquery->admin_login_check();
|
||||
//$pages->page_redir();
|
||||
$pages->page_redir();
|
||||
$userquery->login_check('admin_access');
|
||||
|
||||
//Getting And Listing Files
|
||||
if(!file_exists(BASEDIR.'/'.TEMPLATEFOLDER.'/'.@$_GET['temp']) || @$_GET['temp']==''){
|
||||
$dir = SITETEMPLATEDIR.'/layout/';
|
||||
$cur_dir = TEMPLATE;
|
||||
}else{
|
||||
$dir = BASEDIR.'/'.TEMPLATEFOLDER.'/'.$_GET['temp'].'/layout/';
|
||||
$cur_dir = $_GET['temp'];
|
||||
if($_GET['change'])
|
||||
{
|
||||
$myquery->set_template($_GET['change']);
|
||||
}
|
||||
if(!($dp = opendir($dir))) die("Cannot open $dir.");
|
||||
while($file = readdir($dp)){
|
||||
$ext = GetExt($file);
|
||||
if($ext == 'html' || $ext == 'HTML'){
|
||||
$files[] = $file;
|
||||
}
|
||||
}
|
||||
closedir($dp
|
||||
);
|
||||
sort($files);
|
||||
Assign('files',$files);
|
||||
|
||||
//Writng File
|
||||
if(isset($_POST['save'])){
|
||||
$file = $dir.$_POST['file'];
|
||||
$data = stripslashes($_POST['data']);
|
||||
$open_file = fopen($file, "w");
|
||||
fwrite($open_file, $data);
|
||||
$msg = $_POST['file']." Has Been Saved And Updated";
|
||||
}
|
||||
|
||||
//Getting Data from File
|
||||
if(isset($_POST['file'])){
|
||||
$file = $dir.$_POST['file'];
|
||||
$_file = $_POST['file'];
|
||||
}else{
|
||||
$file = $dir.$files[0];
|
||||
$_file = $files[0];
|
||||
}
|
||||
$open_file = fopen($file, "r");
|
||||
$data = htmlentities(file_get_contents($file));
|
||||
|
||||
//Getting Template List
|
||||
$query = "SELECT * FROM template ORDER by template_name";
|
||||
$TmpExe = $db->Execute($query);
|
||||
$Temps = $TmpExe->getrows();
|
||||
Assign('Temps',$Temps);
|
||||
|
||||
//Checking Which Template Currently Using
|
||||
$query = mysql_query("SELECT template_name,template_dir FROM template WHERE template_dir='".mysql_clean($cur_dir)."'");
|
||||
$TempArr = mysql_fetch_assoc($query);
|
||||
|
||||
Assign('CurTemplate',$TempArr['template_name']);
|
||||
Assign('CurDir',$TempArr['template_dir']);
|
||||
Assign('data',$data);
|
||||
Assign('file',$_file);
|
||||
|
||||
Assign('msg',@$msg);
|
||||
Template('header.html');
|
||||
Template('leftmenu.html');
|
||||
Template('templates.html');
|
||||
Template('footer.html');
|
||||
template_files('templates.html');
|
||||
display_it();
|
||||
?>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
upload/images/icons/no_thumb.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
17
upload/includes/admin.functions.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* All Functions that
|
||||
* are used by admin,
|
||||
* registered here
|
||||
*/
|
||||
|
||||
|
||||
//Registering Admin Options for Watch Video
|
||||
|
||||
if(has_access('admin_access',TRUE))
|
||||
{
|
||||
register_anchor('my_func','watch_admin_options');
|
||||
}
|
||||
|
||||
?>
|
|
@ -25,6 +25,8 @@ class ClipBucket
|
|||
var $temp_exts = array(); //Temp extensions
|
||||
var $actions_play_video = array();
|
||||
var $template_files = array();
|
||||
var $cur_template = 'clipbucketblue';
|
||||
var $links = array();
|
||||
|
||||
function ClipBucket ()
|
||||
{
|
||||
|
@ -46,6 +48,7 @@ class ClipBucket
|
|||
'checkall.js' => 'global',
|
||||
'redir.js' => 'global',
|
||||
'functions.js' => 'global',
|
||||
'swfobject.js' => 'global',
|
||||
));
|
||||
|
||||
//This is used to create Admin Menu
|
||||
|
@ -66,7 +69,8 @@ class ClipBucket
|
|||
)
|
||||
);
|
||||
|
||||
$this->temp_exts = array('ahz','jhz','abc','xyz','cb2','tmp','olo');
|
||||
$this->temp_exts = array('ahz','jhz','abc','xyz','cb2','tmp','olo','oar','oz','luffy','zoro','nami','chopper','ussop','sanji');
|
||||
$this->template = $this->configs['template_dir'];
|
||||
}
|
||||
|
||||
|
||||
|
@ -290,6 +294,39 @@ class ClipBucket
|
|||
{
|
||||
$this->show_page = $val;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to set template (Frontend)
|
||||
*/
|
||||
function set_the_template()
|
||||
{
|
||||
global $cbtpl,$myquery;
|
||||
$template = $this->template;
|
||||
|
||||
if($_GET['template'])
|
||||
{
|
||||
if(is_dir(STYLES_DIR.'/'.$_GET['template']) && $_GET['template'])
|
||||
$template = $_GET['template'];
|
||||
}
|
||||
if(!is_dir(STYLES_DIR.'/'.$template) || !$template)
|
||||
$template = 'clipbucketblue';
|
||||
if(!is_dir(STYLES_DIR.'/'.$template) || !$template)
|
||||
{
|
||||
$template = $cbtpl->get_any_template();
|
||||
}
|
||||
|
||||
if(!is_dir(STYLES_DIR.'/'.$template) || !$template)
|
||||
exit("Unable to find any template, please goto <a href='http://clip-bucket.com/no-template-found'><strong>ClipBucket Support!</strong></a>");
|
||||
|
||||
|
||||
if($_GET['set_template'])
|
||||
{
|
||||
$myquery->set_template($template);
|
||||
}
|
||||
|
||||
define('TEMPLATE',$template);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -5,8 +5,8 @@
|
|||
* This class is used to create
|
||||
* and manage categories
|
||||
* its an abstract class
|
||||
* it will be used in plugins or built-in
|
||||
* sections to use category system like videos, groups , channels etc
|
||||
* it will be used in custom plugins or built-in plugins
|
||||
* sections also use category system like videos, groups , channels etc
|
||||
*
|
||||
* this abstract class has some rules
|
||||
* each section's category column should be named as "category"
|
||||
|
|
|
@ -26,6 +26,7 @@ class ffmpeg
|
|||
var $gen_thumbs; //If set to TRUE , it will generate thumbnails also
|
||||
var $remove_input = TRUE;
|
||||
var $gen_big_thumb = FALSE;
|
||||
var $two_pass = FALSE;
|
||||
|
||||
|
||||
|
||||
|
@ -168,11 +169,36 @@ class ffmpeg
|
|||
|
||||
$opt_av .= " -map_meta_data ".$this->output_file.":".$this->input_file;
|
||||
|
||||
$command = $this->ffmpeg." -i ".$this->input_file." $opt_av ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
if(!$this->two_pass)
|
||||
$command = $this->ffmpeg." -i ".$this->input_file." $opt_av ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
else
|
||||
{
|
||||
|
||||
$options = "-vcodec libx264 -b 512k -flags +loop+mv4 -cmp 256
|
||||
-partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8
|
||||
-me_method hex -subq 7 -trellis 1 -refs 5 -bf 3
|
||||
-flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16
|
||||
-g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10
|
||||
-qmax 51 -qdiff 4";
|
||||
|
||||
$command = $this->ffmpeg." -i ".$this->input_file." -an -pass 1 -threads 2 $options ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
$output = $this->exec($command);
|
||||
if(file_exists(TEMP_DIR.'/output.tmp'))
|
||||
{
|
||||
$output = $output ? $output : join("", file(TEMP_DIR.'/output.tmp'));
|
||||
unlink(TEMP_DIR.'/output.tmp');
|
||||
}
|
||||
|
||||
$command = $this->ffmpeg." -y -i ".$this->input_file." -acodec libfaac -ar 44100 -ab 96k -pass 2 -threads 2 $options ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
}
|
||||
|
||||
$output = $this->exec($command);
|
||||
$output = $output ? $output : join("", file(TEMP_DIR.'/output.tmp'));
|
||||
if(file_exists(TEMP_DIR.'/output.tmp'))
|
||||
{
|
||||
$output = $output ? $output : join("", file(TEMP_DIR.'/output.tmp'));
|
||||
unlink(TEMP_DIR.'/output.tmp');
|
||||
}
|
||||
|
||||
$this->log('Conversion Command',$command);
|
||||
$this->log .="\r\n\r\nConversion Details\r\n\r\n";
|
||||
$this->log .=$output;
|
||||
|
@ -207,7 +233,7 @@ class ffmpeg
|
|||
$info['path'] = $path_source;
|
||||
|
||||
# get the file size
|
||||
$stats = stat( $path_source );
|
||||
$stats = @stat( $path_source );
|
||||
if( $stats === false )
|
||||
$this->log .= "Failed to stat file $path_source!\n";
|
||||
$info['size'] = (integer)$stats['size'];
|
||||
|
|
|
@ -20,8 +20,9 @@ class myquery {
|
|||
|
||||
function Set_Website_Details($name,$value){
|
||||
//mysql_query("UPDATE config SET value = '".$value."' WHERE name ='".$name."'");
|
||||
global $db;
|
||||
global $db,$Cbucket;
|
||||
$db->update("config",array('value'),array($value)," name = '".$name."'");
|
||||
$Cbucket->configs = $Cbucket->get_configs();
|
||||
}
|
||||
|
||||
//Updating Plugin Details
|
||||
|
@ -1164,7 +1165,7 @@ class myquery {
|
|||
*/
|
||||
function add_comment($comment,$obj_id,$reply_to=NULL,$type='v')
|
||||
{
|
||||
global $userquery,$eh,$db;
|
||||
global $userquery,$eh,$db,$Cbucket;
|
||||
//Checking maximum comments characters allowed
|
||||
if(defined("MAX_COMMENT_CHR"))
|
||||
{
|
||||
|
@ -1187,15 +1188,27 @@ class myquery {
|
|||
}
|
||||
}
|
||||
|
||||
if(!userid())
|
||||
if(!userid() && $Cbucket->configs['anonym_comments']!='yes')
|
||||
e("You are not logged in");
|
||||
|
||||
if(!userid() && $Cbucket->configs['anonym_comments']=='yes')
|
||||
{
|
||||
//Checking for input name and email
|
||||
if(empty($_POST['name']))
|
||||
e("Please enter your name");
|
||||
if(empty($_POST['email']))
|
||||
e("Please enter your email");
|
||||
|
||||
$name = mysql_clean($_POST['name']);
|
||||
$email = mysql_clean($_POST['email']);
|
||||
}
|
||||
|
||||
if(empty($eh->error_list))
|
||||
{
|
||||
$db->insert("comments",array
|
||||
('type,comment,type_id,userid,date_added,parent_id'),
|
||||
('type,comment,type_id,userid,date_added,parent_id,anonym_name,anonym_email'),
|
||||
array
|
||||
($type,$comment,$obj_id,userid(),NOW(),$reply_to));
|
||||
($type,$comment,$obj_id,userid(),NOW(),$reply_to,$name,$email));
|
||||
e("Comment has been added",m);
|
||||
return $db->insert_id();
|
||||
}
|
||||
|
@ -1324,5 +1337,29 @@ class myquery {
|
|||
return $results[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to set website template
|
||||
*/
|
||||
function set_template($template)
|
||||
{
|
||||
global $myquery;
|
||||
if(is_dir(STYLES_DIR.'/'.$template) &&template)
|
||||
{
|
||||
$myquery->Set_Website_Details('template_dir',$template);
|
||||
e("Template has been activated",m);
|
||||
}else
|
||||
e("An error occured while changing the template");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to update comment
|
||||
*/
|
||||
function update_comment($cid,$text)
|
||||
{
|
||||
global $db;
|
||||
$db->Execute("UPDATE comments SET comment='$text' WHERE comment_id='$cid'");
|
||||
}
|
||||
}
|
||||
?>
|
34
upload/includes/classes/objects.class.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Author : Arslan Hassan
|
||||
* Software : ClipBucket
|
||||
*
|
||||
* This Class is used to display different
|
||||
* objects of ClipBucket
|
||||
*/
|
||||
|
||||
|
||||
class CBObjects
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Function used to display templates in drop down
|
||||
*/
|
||||
function display_templates()
|
||||
{
|
||||
//Get Tempplates
|
||||
$templates = CBTemplate::get_templates();
|
||||
|
||||
$dd = "<select>\n";
|
||||
foreach($templates as $template)
|
||||
{
|
||||
if($template['name']!='')
|
||||
$dd .= "<option value='".$template['dir']."'>".$template['name']."</option>\n";
|
||||
}
|
||||
$dd .="</select>\n";
|
||||
|
||||
return $dd;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
class DoTemplate {
|
||||
class CBTemplate {
|
||||
|
||||
function DoTemplate() {
|
||||
/**
|
||||
* Function used to set Smarty Functions
|
||||
*/
|
||||
function CBTemplate() {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
$Smarty = new Smarty;
|
||||
|
@ -23,7 +26,7 @@ class DoTemplate {
|
|||
function setCompileDir($dir_name) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
$Smarty->compile_dir = $dir_name;
|
||||
}
|
||||
|
@ -31,7 +34,7 @@ class DoTemplate {
|
|||
function setType($type) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
$Smarty->type = $type;
|
||||
}
|
||||
|
@ -39,7 +42,7 @@ class DoTemplate {
|
|||
function assign($var, $value) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
$Smarty->assign($var, $value);
|
||||
}
|
||||
|
@ -47,7 +50,7 @@ class DoTemplate {
|
|||
function setTplDir($dir_name = null) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
if (!$dir_name) {
|
||||
$Smarty->template_dir = BASEDIR."/styles/clipbucketblue";
|
||||
|
@ -59,7 +62,7 @@ class DoTemplate {
|
|||
function setModule($module) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
$Smarty->theme = $module;
|
||||
$Smarty->type = "module";
|
||||
|
@ -68,7 +71,7 @@ class DoTemplate {
|
|||
function setTheme($theme) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
$Smarty->template_dir = BASEDIR."/styles/" . $theme;
|
||||
$Smarty->compile_dir = BASEDIR."/styles/" . $theme;
|
||||
|
@ -79,7 +82,7 @@ class DoTemplate {
|
|||
function getTplDir() {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
return $Smarty->template_dir;
|
||||
}
|
||||
|
@ -87,7 +90,7 @@ class DoTemplate {
|
|||
function display($filename) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
$Smarty->display($filename);
|
||||
}
|
||||
|
@ -95,7 +98,7 @@ class DoTemplate {
|
|||
function fetch($filename) {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
return $Smarty->fetch($filename);
|
||||
}
|
||||
|
@ -103,9 +106,116 @@ class DoTemplate {
|
|||
function getVars() {
|
||||
global $Smarty;
|
||||
if (!isset($Smarty)) {
|
||||
DoTemplate::create();
|
||||
CBTemplate::create();
|
||||
}
|
||||
return $Smarty->get_template_vars();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get available templates
|
||||
*/
|
||||
function get_templates()
|
||||
{
|
||||
$dir = STYLES_DIR;
|
||||
//Scaning Dir
|
||||
$dirs = scandir($dir);
|
||||
foreach($dirs as $tpl)
|
||||
{
|
||||
if(substr($tpl,0,1)!='.')
|
||||
$tpl_dirs[] = $tpl;
|
||||
}
|
||||
//Now Checking for template template.xml
|
||||
$tpls = array();
|
||||
foreach($tpl_dirs as $tpl_dir)
|
||||
{
|
||||
$tpl_details = CBTemplate::get_template_details($tpl_dir);
|
||||
|
||||
if($tpl_details && $tpl_details['name']!='')
|
||||
$tpls[$tpl_details['name']] = $tpl_details;
|
||||
}
|
||||
|
||||
return $tpls;
|
||||
}
|
||||
function gettemplates()
|
||||
{
|
||||
return $this->get_templates();
|
||||
}
|
||||
|
||||
function get_template_details($temp,$file='template.xml')
|
||||
{
|
||||
$file = STYLES_DIR.'/'.$temp.'/template.xml';
|
||||
if(file_exists($file))
|
||||
{
|
||||
$content = file_get_contents($file);
|
||||
preg_match('/<name>(.*)<\/name>/',$content,$name);
|
||||
preg_match('/<author>(.*)<\/author>/',$content,$author);
|
||||
preg_match('/<version>(.*)<\/version>/',$content,$version);
|
||||
preg_match('/<released>(.*)<\/released>/',$content,$released);
|
||||
preg_match('/<description>(.*)<\/description>/',$content,$description);
|
||||
preg_match('/<website title="(.*)">(.*)<\/website>/',$content,$website_arr);
|
||||
|
||||
$name = $name[1];
|
||||
$author = $author[1];
|
||||
$version = $version[1];
|
||||
$released = $released[1];
|
||||
$description = $description[1];
|
||||
|
||||
$website = array('title'=>$website_arr[1],'link'=>$website_arr[2]);
|
||||
|
||||
//Now Create array
|
||||
$template_details = array
|
||||
('name'=>$name,
|
||||
'author'=>$author,
|
||||
'version'=>$version,
|
||||
'released'=>$released,
|
||||
'description'=>$description,
|
||||
'website'=>$website,
|
||||
'dir'=>$temp,
|
||||
'path'=>TEMPLATEFOLDER.'/'.$temp
|
||||
);
|
||||
|
||||
return $template_details;
|
||||
}else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get template thumb
|
||||
*/
|
||||
function get_preview_thumb($template)
|
||||
{
|
||||
$path = TEMPLATEFOLDER.'/'.$template.'/images/preview.';
|
||||
$exts = array('png','jpg','gif');
|
||||
$thumb_path = BASEURL.'/images/icons/no_thumb.png';
|
||||
foreach($exts as $ext)
|
||||
{
|
||||
$file = BASEDIR.'/'.$path.$ext;
|
||||
if(file_exists($file))
|
||||
{
|
||||
$thumb_path = BASEURL.'/'.$path.$ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $thumb_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get any template
|
||||
*/
|
||||
function get_any_template()
|
||||
{
|
||||
$templates = $this->get_templates();
|
||||
if(is_array($templates))
|
||||
{
|
||||
foreach($templates as $template)
|
||||
{
|
||||
if(!empty($template['name']))
|
||||
return $template['dir'];
|
||||
}
|
||||
return false;
|
||||
}else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -27,7 +27,7 @@ class userquery {
|
|||
$this->userid = $sess->get('userid');
|
||||
$this->username = $sess->get('username');
|
||||
$this->level = $sess->get('level');
|
||||
|
||||
|
||||
|
||||
//Setting Access
|
||||
$this->add_access_type('admin_access','Admin Access');
|
||||
|
@ -1121,9 +1121,9 @@ class userquery {
|
|||
$ext = GetExt($thumb_file);
|
||||
$file = getName($thumb_file);
|
||||
if(!empty($size))
|
||||
$thumb = $file.'-'.$size.'.'.$ext;
|
||||
$thumb = BASEURL.'/images/avatars/'.$file.'-'.$size.'.'.$ext;
|
||||
else
|
||||
$thumb = $file.'.'.$ext;
|
||||
$thumb = BASEURL.'/images/avatars/'.$file.'.'.$ext;
|
||||
return $thumb;
|
||||
}
|
||||
function avatar($udetails,$size='',$uid=NULL)
|
||||
|
|
|
@ -304,6 +304,52 @@ class CBvideo extends CBCategory
|
|||
}
|
||||
e(lang("vid_files_removed_msg"),m);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to get videos
|
||||
* this function has all options
|
||||
* that you need to fetch videos
|
||||
* please see docs.clip-bucket.com for more details
|
||||
*/
|
||||
function get_videos($params)
|
||||
{
|
||||
$cond_array = array();
|
||||
|
||||
//Setting Category Condition
|
||||
if($params['category'])
|
||||
{
|
||||
if(is_array($params['category']))
|
||||
{
|
||||
foreach($params['category'] as $cat_params)
|
||||
{
|
||||
$cond_array[] = " category ='$cat_params' ";
|
||||
}
|
||||
}else{
|
||||
$cond_array[] = " category ='".$params['category']."' ";
|
||||
}
|
||||
}
|
||||
|
||||
//date span
|
||||
switch($param['date_span'])
|
||||
{
|
||||
case 'today';
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to add video comment
|
||||
*/
|
||||
function add_comment($comment,$obj_id,$reply_to=NULL)
|
||||
{
|
||||
global $myquery;
|
||||
return $myquery->add_comment($comment,$obj_id,$reply_to,'v');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
|
|||
require_once('classes/category.class.php');
|
||||
require_once('classes/video.class.php');
|
||||
require_once 'languages.php';
|
||||
|
||||
|
||||
$pages = new pages();
|
||||
$myquery = new myquery();
|
||||
$userquery = new userquery();
|
||||
|
@ -89,6 +89,7 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
|
|||
//Initializng Userquery class
|
||||
$userquery->init();
|
||||
|
||||
require 'defined_links.php';
|
||||
|
||||
//Holds Advertisment IDS that are being Viewed
|
||||
$ads_array = array();
|
||||
|
@ -182,22 +183,8 @@ error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
|||
|
||||
|
||||
define('TEMPLATEFOLDER','styles'); //Template Folder Name, usually STYLES
|
||||
define('STYLES_DIR',BASEDIR.'/'.TEMPLATEFOLDER);
|
||||
|
||||
if($row['allow_template_change'] == 1){
|
||||
$sitestyle = @$_COOKIE['sitestyle'];
|
||||
if (!$sitestyle || !$myquery->IsTemplate($sitestyle))
|
||||
{
|
||||
define('TEMPLATE',$row['template_dir']);
|
||||
setcookie('sitestyle', $row['template_dir'], time()+315360000, '/');
|
||||
}
|
||||
else
|
||||
{
|
||||
define('TEMPLATE',$sitestyle);
|
||||
}
|
||||
}else{
|
||||
define('TEMPLATE',$row['template_dir']);
|
||||
}
|
||||
|
||||
// Define Lang Select & Style Select
|
||||
|
||||
define('ALLOW_LANG_SELECT',$row['allow_language_change']);
|
||||
|
@ -223,6 +210,9 @@ error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
|||
define('THUMBS_URL',FILES_URL.'/thumbs');
|
||||
define('ORIGINAL_URL',FILES_URL.'/original');
|
||||
define('TEMP_URL',FILES_URL.'/temp');
|
||||
define("PLAYER_DIR",BASEDIR.'/player');
|
||||
define("PLAYER_URL",BASEURL.'/player');
|
||||
|
||||
|
||||
//Required Settings For Video Converion
|
||||
|
||||
|
@ -262,17 +252,21 @@ error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
|||
define('CAT_THUMB_DIR',BASEDIR.'/images/category_thumbs');
|
||||
define('CAT_THUMB_URL',BASEURL.'/images/category_thumbs');
|
||||
|
||||
//Assigning Smarty Tags & Values
|
||||
|
||||
include 'functions.php';
|
||||
include 'plugin.functions.php';
|
||||
include 'plugins_functions.php';
|
||||
require BASEDIR.'/includes/templatelib/Template.class.php';
|
||||
require BASEDIR.'/includes/classes/template.class.php';
|
||||
require BASEDIR.'/includes/classes/objects.class.php';
|
||||
|
||||
require BASEDIR.'/includes/active.php';
|
||||
require BASEDIR.'/includes/defined_links.php';
|
||||
require_once('email_templates/template_writer.php');
|
||||
include(BASEDIR.'/lang/'.LANG.'/lang.php');
|
||||
|
||||
|
||||
$cbtpl = new CBTemplate();
|
||||
$cbobjects = new CBObjects();
|
||||
|
||||
$is_admin = $userquery->admin_check();
|
||||
if ($is_admin == 1)
|
||||
{
|
||||
|
@ -282,6 +276,7 @@ error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
|||
$thisurl = curPageURL();
|
||||
Assign('THIS_URL', $thisurl);
|
||||
|
||||
//Assigning Smarty Tags & Values
|
||||
Assign('CB_VERSION',CB_VERSION);
|
||||
Assign('FFMPEG_FLVTOOLS_BINARY',FFMPEG_FLVTOOLS_BINARY);
|
||||
Assign('FFMPEG_MPLAYER_BINARY',FFMPEG_MPLAYER_BINARY);
|
||||
|
@ -328,27 +323,7 @@ error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
|||
Assign('LANG',$LANG);
|
||||
Assign('langf',LANG);
|
||||
Assign('lang_count',count($languages));
|
||||
|
||||
//Assign Footer
|
||||
|
||||
Assign('lang_changer', $row['allow_language_change']);
|
||||
Assign('template_changer', $row['allow_template_change']);
|
||||
Assign('current_template', TEMPLATE);
|
||||
|
||||
//Getting Template List (admin area)
|
||||
$sql = "SELECT * from template";
|
||||
$rs = $db->Execute($sql);
|
||||
$templates = $rs->getrows();
|
||||
|
||||
// sort user template list (fwhite / February 05, 2009)
|
||||
foreach ($templates as $key => $temp_row) {
|
||||
$temp_name[$key] = $temp_row[1];
|
||||
}
|
||||
|
||||
// Sort the data with name ascending
|
||||
// Add data as the last parameter, to sort by the common key
|
||||
array_multisort($temp_name, SORT_ASC, $templates);
|
||||
Assign('templates', $templates);
|
||||
|
||||
//Assign Player Div Id
|
||||
Assign('player_div_id',$row['player_div_id']);
|
||||
|
@ -366,6 +341,9 @@ if(user_id())
|
|||
$userquery->permission = $userquery->get_user_level(userid());
|
||||
}
|
||||
|
||||
//Checking Website Template
|
||||
$Cbucket->set_the_template();
|
||||
|
||||
/*
|
||||
REGISTER OBJECTS FOR SMARTY
|
||||
*/
|
||||
|
@ -384,6 +362,8 @@ $Smarty->assign_by_ref('Cbucket', $Cbucket);$Smarty->assign_by_ref('ClipBucket',
|
|||
$Smarty->assign_by_ref('eh', $eh);
|
||||
$Smarty->assign_by_ref('lang_obj', $lang_obj);
|
||||
$Smarty->assign_by_ref('cbvid', $cbvid);
|
||||
$Smarty->assign_by_ref('cbtpl',$cbtpl);
|
||||
$Smarty->assign_by_ref('cbobjects',$cbobjects);
|
||||
|
||||
/*
|
||||
REGISERTING FUNCTION FOR SMARTY TEMPLATES
|
||||
|
@ -403,7 +383,7 @@ $Smarty->register_function('get_all_video_files',get_all_video_files_smarty);
|
|||
$Smarty->register_function('input_value','input_value');
|
||||
$Smarty->register_function('userid','userid');
|
||||
$Smarty->register_function('FlashPlayer','flashPlayer');
|
||||
|
||||
$Smarty->register_function('link','cblink');
|
||||
|
||||
$Smarty->register_modifier('SetTime','SetTime');
|
||||
$Smarty->register_modifier('getname','getname');
|
||||
|
@ -421,4 +401,12 @@ $Smarty->register_modifier('get_thumb_num','get_thumb_num');
|
|||
register_action_remove_video('remove_video_thumbs');
|
||||
register_action_remove_video('remove_video_log');
|
||||
register_action_remove_video('remove_video_files');
|
||||
|
||||
|
||||
/**
|
||||
* Include ClipBucket's Default Player
|
||||
*/
|
||||
include(PLAYER_DIR.'/cbplayer/cbplayer.plug.php');
|
||||
|
||||
include('admin.functions.php');
|
||||
?>
|
|
@ -1,117 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
**************************************************************************************************
|
||||
This Source File Is Written For ClipBucket, Please Read its End User License First and Agree its
|
||||
Terms of use at http://clip-bucket.com/cbla
|
||||
**************************************************************************************************
|
||||
Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved.
|
||||
**************************************************************************************************
|
||||
**/
|
||||
* ALL LINKS ARE DEFINED HERE
|
||||
* YOU CAN CHANGE THEM IF REQUIRED
|
||||
* ARRAY( [name]=> Array([Non SEO Link] [SEO Link]))
|
||||
*/
|
||||
|
||||
// We Can Set SEO urls or Simple Urls by selecting following options, by selecting YES , make sure that all ReWrites are defined in .httaccess
|
||||
|
||||
$seo_urls = SEO; // yes/no
|
||||
|
||||
$Cbucket->links = array
|
||||
(
|
||||
'signup' =>array('signup.php','signup'),
|
||||
'login' =>array('signup.php','login'),
|
||||
'videos' =>array('videos.php','videos'),
|
||||
);
|
||||
|
||||
/* if selected yes then our UPLOAD link will become http://ourdomain.com/upload and if no the http://ourdomain.com/upload.php */
|
||||
|
||||
if($seo_urls == 'yes'){
|
||||
@Assign('seo','yes');
|
||||
|
||||
Assign('logout_link',BASEURL.'/logout');
|
||||
Assign('leave_group_link',BASEURL.'/group/leave/');
|
||||
Assign('sent_link',BASEURL.'/message/sent/');
|
||||
Assign('signup_link',BASEURL.'/signup');
|
||||
Assign('subscriptions_link',BASEURL.'/subscriptions/');
|
||||
Assign('search_result',BASEURL.'/search/result');
|
||||
Assign('upload_link',BASEURL.'/upload');
|
||||
Assign('myaccount_link',BASEURL.'/myaccount');
|
||||
Assign('manage_videos',BASEURL.'/manage/videos/');
|
||||
Assign('manage_subscriptions',BASEURL.'/manage/subscriptions/');
|
||||
Assign('manage_favourites_link',BASEURL.'/manage/favourites/');
|
||||
Assign('manage_contacts_link',BASEURL.'/manage/contacts/');
|
||||
Assign('manage_group_videos_link',BASEURL.'/manage_group_videos.php?url=');
|
||||
Assign('manage_group_members_link',BASEURL.'/manage_group_members.php?url=');
|
||||
Assign('manage_groups_link',BASEURL.'/manage/group/');
|
||||
Assign('videos_link',BASEURL.'/videos');
|
||||
Assign('user_account_link',BASEURL.'/manage/account');
|
||||
Assign('user_contacts_link',BASEURL.'/user/contacts/');
|
||||
Assign('user_videos_link',BASEURL.'/user/videos/');
|
||||
Assign('user_fav_videos_link',BASEURL.'/user/favourites/');
|
||||
Assign('channels_link',BASEURL.'/channels/');
|
||||
Assign('compose_msg_link',BASEURL.'/message/compose/');
|
||||
Assign('view_channel_link',BASEURL.'/channel/');
|
||||
Assign('view_topic_link',BASEURL.'/group/topic/');
|
||||
Assign('view_group_link',BASEURL.'/group/view/');
|
||||
Assign('view_group_videos_link',BASEURL.'/view_group_videos.php?url=');
|
||||
Assign('view_group_members_link',BASEURL.'/view_group_members.php?url=');
|
||||
Assign('inbox_link',BASEURL.'/message/inbox/');
|
||||
Assign('invite_group_members_link',BASEURL.'/invite_group.php?url=');
|
||||
Assign('edit_video_link',BASEURL.'/manage/video/edit');
|
||||
Assign('edit_video_watch',BASEURL.'/edit_video.php');
|
||||
Assign('edit_group_link',BASEURL.'/edit_group.php?url=');
|
||||
Assign('about_us_link',BASEURL.'/pages/aboutus/');
|
||||
Assign('add_group_video_link',BASEURL.'/add_group_videos.php?url=');
|
||||
Assign('contact_us_link',BASEURL.'/pages/contactus/');
|
||||
Assign('create_group_link',BASEURL.'/group/create/');
|
||||
Assign('privacy_link',BASEURL.'/pages/privacy/');
|
||||
Assign('termsofuse_link',BASEURL.'/pages/termsofuse/');
|
||||
Assign('help_link',BASEURL.'/pages/help/');
|
||||
Assign('join_group_link',BASEURL.'/join_group.php?url=');
|
||||
Assign('groups_link',BASEURL.'/community');
|
||||
Assign('delete_group_link',BASEURL.'/delete_group.php?url=');
|
||||
Assign('External_Upload_link',BASEURL.'/external_upload.php');
|
||||
Assign('rss_link',BASEURL.'/rss.php?show=');
|
||||
Assign('admin_link',BASEURL.'/admin_area/');
|
||||
|
||||
}else{
|
||||
@Assign('seo','no');
|
||||
|
||||
Assign('logout_link',BASEURL.'/logout.php');
|
||||
Assign('leave_group_link',BASEURL.'/leave_group.php?url=');
|
||||
Assign('sent_link',BASEURL.'/sent.php');
|
||||
Assign('signup_link',BASEURL.'/signup.php');
|
||||
Assign('subscriptions_link',BASEURL.'/manage_subscriptions.php');
|
||||
Assign('search_result',BASEURL.'/search_result.php');
|
||||
Assign('upload_link',BASEURL.'/upload.php');
|
||||
Assign('myaccount_link',BASEURL.'/myaccount.php');
|
||||
Assign('manage_videos',BASEURL.'/manage_videos.php');
|
||||
Assign('manage_subscriptions',BASEURL.'/manage_subscriptions.php');
|
||||
Assign('manage_favourites_link',BASEURL.'/manage_favourites.php');
|
||||
Assign('manage_contacts_link',BASEURL.'/manage_contacts.php');
|
||||
Assign('manage_group_videos_link',BASEURL.'/manage_group_videos.php?url=');
|
||||
Assign('manage_group_members_link',BASEURL.'/manage_group_members.php?url=');
|
||||
Assign('manage_groups_link',BASEURL.'/manage_groups.php');
|
||||
Assign('videos_link',BASEURL.'/videos.php');
|
||||
Assign('user_account_link',BASEURL.'/user_account.php');
|
||||
Assign('user_contacts_link',BASEURL.'/user_contacts.php?user=');
|
||||
Assign('user_videos_link',BASEURL.'/user_videos.php?user=');
|
||||
Assign('user_fav_videos_link',BASEURL.'/user_fav_videos.php?user=');
|
||||
Assign('channels_link',BASEURL.'/channels.php');
|
||||
Assign('compose_msg_link',BASEURL.'/compose.php');
|
||||
Assign('view_channel_link',BASEURL.'/view_channel.php?user=');
|
||||
Assign('view_topic_link',BASEURL.'/view_topic.php?tid=');
|
||||
Assign('view_group_link',BASEURL.'/view_group.php?url=');
|
||||
Assign('view_group_videos_link',BASEURL.'/view_group_videos.php?url=');
|
||||
Assign('view_group_members_link',BASEURL.'/view_group_members.php?url=');
|
||||
Assign('inbox_link',BASEURL.'/inbox.php');
|
||||
Assign('invite_group_members_link',BASEURL.'/invite_group.php?url=');
|
||||
Assign('edit_video_link',BASEURL.'/edit_video.php');
|
||||
Assign('edit_video_watch',BASEURL.'/edit_video.php');
|
||||
Assign('edit_group_link',BASEURL.'/edit_group.php?url=');
|
||||
Assign('about_us_link',BASEURL.'/aboutus.php');
|
||||
Assign('add_group_video_link',BASEURL.'/add_group_videos.php?url=');
|
||||
Assign('contact_us_link',BASEURL.'/contactus.php');
|
||||
Assign('create_group_link',BASEURL.'/create_group.php');
|
||||
Assign('privacy_link',BASEURL.'/privacy.php');
|
||||
Assign('termsofuse_link',BASEURL.'/termsofuse.php');
|
||||
Assign('help_link',BASEURL.'/help.php');
|
||||
Assign('join_group_link',BASEURL.'/join_group.php?url=');
|
||||
Assign('groups_link',BASEURL.'/groups.php');
|
||||
Assign('delete_group_link',BASEURL.'/delete_group.php?url=');
|
||||
Assign('External_Upload_link',BASEURL.'/External_Upload');
|
||||
Assign('rss_link',BASEURL.'/rss.php?show=');
|
||||
Assign('admin_link',BASEURL.'/admin_area/');
|
||||
|
||||
}
|
||||
?>
|
|
@ -105,6 +105,7 @@
|
|||
echo '<script type="text/javascript">
|
||||
window.location = "'.$url.'"
|
||||
</script>';
|
||||
exit("Javascript is turned off, <a href='$url'>click here to go to requested page</a>");
|
||||
}
|
||||
|
||||
//Simple Template Displaying Function
|
||||
|
@ -112,20 +113,20 @@
|
|||
function Template($template,$layout=true){
|
||||
global $admin_area;
|
||||
if($layout)
|
||||
DoTemplate::display(LAYOUT.'/'.$template);
|
||||
CBTemplate::display(LAYOUT.'/'.$template);
|
||||
else
|
||||
DoTemplate::display($template);
|
||||
CBTemplate::display($template);
|
||||
|
||||
if($template == 'footer.html' && $admin_area !=TRUE){
|
||||
DoTemplate::display(BASEDIR.'/includes/templatelib/'.$template);
|
||||
CBTemplate::display(BASEDIR.'/includes/templatelib/'.$template);
|
||||
}
|
||||
if($template == 'header.html'){
|
||||
DoTemplate::display(BASEDIR.'/includes/templatelib/'.$template);
|
||||
CBTemplate::display(BASEDIR.'/includes/templatelib/'.$template);
|
||||
}
|
||||
}
|
||||
|
||||
function Assign($name,$value){
|
||||
DoTemplate::assign($name,$value);
|
||||
CBTemplate::assign($name,$value);
|
||||
}
|
||||
|
||||
//Funtion of Random String
|
||||
|
@ -806,7 +807,10 @@ function SetTime($sec, $padHours = true) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function getSmartyCategoryList($params,&$Smarty)
|
||||
{
|
||||
return getCategoryList($params['type']);
|
||||
}
|
||||
|
||||
|
||||
//Function used to register function as multiple modifiers
|
||||
|
@ -1332,6 +1336,8 @@ function SetTime($sec, $padHours = true) {
|
|||
return VIDEOS_URL.'/no_video.flv';
|
||||
else
|
||||
return 'no_video.flv';
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if($multi)
|
||||
|
@ -1910,4 +1916,103 @@ function SetTime($sec, $padHours = true) {
|
|||
return $cbvid->remove_files($vdetails);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to get player logo
|
||||
*/
|
||||
function get_player_logo()
|
||||
{
|
||||
return PLAYER_URL.'/logo.png';
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to assign link
|
||||
*/
|
||||
function cblink($params,&$Smarty)
|
||||
{
|
||||
global $ClipBucket;
|
||||
$name = $params['name'];
|
||||
$ref = $param['ref'];
|
||||
|
||||
return BASEURL.'/'.$ClipBucket->links[$name][0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to check video is playlable or not
|
||||
* @param vkey,vid
|
||||
*/
|
||||
function video_playable($id)
|
||||
{
|
||||
global $cbvideo;
|
||||
$vdo = $cbvideo->get_video($id);
|
||||
if(!$vdo)
|
||||
{
|
||||
e("Video does not exist");
|
||||
return false;
|
||||
}elseif($vdo['status']!='Successful')
|
||||
{
|
||||
e("This video is not working properly");
|
||||
if(!has_access('admin_access',TRUE))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to turn tags into links
|
||||
*/
|
||||
function tags($input,$type)
|
||||
{
|
||||
//Exploding using comma
|
||||
$tags = explode(',',$input);
|
||||
$count = 1;
|
||||
$total = count($tags);
|
||||
$new_tags = '';
|
||||
foreach($tags as $tag)
|
||||
{
|
||||
$new_tags .= $tag;
|
||||
if($count<$total)
|
||||
$new_tags .= ',';
|
||||
$count++;
|
||||
}
|
||||
|
||||
return $new_tags;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to turn db category into links
|
||||
*/
|
||||
function categories($input,$type)
|
||||
{
|
||||
global $cbvideo;
|
||||
switch($type)
|
||||
{
|
||||
case 'video':
|
||||
default:
|
||||
$obj = $cbvideo;
|
||||
}
|
||||
|
||||
preg_match_all('/#([0-9]+)#/',$input,$m);
|
||||
$cat_array = array($m[1]);
|
||||
$cat_array = $cat_array[0];
|
||||
|
||||
$count = 1;
|
||||
$total = count($cat_array);
|
||||
$cats = '';
|
||||
foreach($cat_array as $cat)
|
||||
{
|
||||
$cat_details = $obj->get_category($cat);
|
||||
$cats .= $cat_details['category_name'];
|
||||
if($count<$total)
|
||||
$cats .= ',';
|
||||
$count++;
|
||||
}
|
||||
|
||||
return $cats;
|
||||
}
|
||||
?>
|
|
@ -1,67 +1,22 @@
|
|||
<?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','index');
|
||||
require 'includes/config.inc.php';
|
||||
$pages->page_redir();
|
||||
|
||||
|
||||
if(isset($_GET['cb_ver']) && $is_admin)
|
||||
{
|
||||
$msg = "ClipBucket ".CB_VERSION."";
|
||||
}
|
||||
|
||||
//Get user Data, if logged in
|
||||
if(isset($_SESSION['username'])){
|
||||
$user = $_SESSION['userid'];
|
||||
$data = $userquery->GetUserData($user);
|
||||
Assign('data',$data);
|
||||
}
|
||||
|
||||
//Getting Users With Most Videos
|
||||
$sql = "SELECT * FROM users WHERE total_videos > 0 ORDER by total_videos DESC LIMIT 5";
|
||||
$udata = $db->Execute($sql);
|
||||
$top_user = $udata->getrows();
|
||||
$total_users = $udata->recordcount() + 0;
|
||||
for($id=0;$id<$total_users;$id++){
|
||||
$sql = "Select * FROM video WHERE username='".$top_user[$id]['username']."'";
|
||||
$rs = $db->Execute($sql);
|
||||
$top_user[$id]['total_videos'] = $rs->recordcount() + 0;
|
||||
}
|
||||
|
||||
Assign('top_user',$top_user);
|
||||
|
||||
//Getting List of Featured Videos
|
||||
$query_param = "broadcast='public' AND active='yes' AND status='Successful'";
|
||||
$show = 'featured';
|
||||
$limit = "LIMIT ".VLISTPT;
|
||||
$query = "SELECT * FROM video WHERE featured = 'yes' AND $query_param ORDER BY date_added DESC $limit";
|
||||
$text = 'Featured';
|
||||
Assign('text',$text);
|
||||
|
||||
$link = BASEURL.videos_link.'?order=fr';
|
||||
Assign('link',$link);
|
||||
|
||||
$data = $db->Execute($query);
|
||||
$videos = $data->getrows();
|
||||
$total = $data->recordcount() + 0;
|
||||
|
||||
|
||||
Assign('videos',$videos);
|
||||
Assign('show',$show);
|
||||
if(isset($msg))
|
||||
{
|
||||
Assign('msg',$msg);
|
||||
}
|
||||
|
||||
|
||||
subtitle('index');
|
||||
Template('header.html');
|
||||
Template('message.html');
|
||||
Template('index.html');
|
||||
Template('footer.html');
|
||||
//Displaying The Template
|
||||
template_files('index.html');
|
||||
display_it();
|
||||
?>
|
44
upload/player/cbplayer/cbplayer.plug.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
/**
|
||||
* ClipBucket v2 Player
|
||||
*
|
||||
* @Author : Arslan Hassan
|
||||
* @Script : ClipBucket v2
|
||||
* @License : CBLA
|
||||
* @Since : September 15 2009
|
||||
*/
|
||||
|
||||
|
||||
if(!function_exists('cbplayer'))
|
||||
{
|
||||
|
||||
define("CBV2PLAYER",TRUE);
|
||||
define("AUTOPLAY",false);
|
||||
|
||||
function cbplayer($vdata)
|
||||
{
|
||||
global $swfobj;
|
||||
|
||||
$vid_file = get_video_file($vdata,false,false);
|
||||
if($vid_file)
|
||||
{
|
||||
$code = "var flashvars = {\n";
|
||||
$code .= " htmlPage: document.location,\n";
|
||||
$code .= "settingsFile: \"".PLAYER_URL."/cbplayer/settings.php?vid=".$vdata['videoid']."\"\n";
|
||||
$code .= "};\n";
|
||||
$code .= "var params = {\n";
|
||||
$code .= " allowFullScreen: \"true\"\n";
|
||||
$code .= "};\n";
|
||||
$code .= "swfobject.embedSWF(\"".PLAYER_URL."/cbplayer/videoPlayer.swf\",
|
||||
\"videoPlayer\", \"600\", \"350\", \"9.0.115\",
|
||||
\"swfobject/expressInstall.swf\", flashvars
|
||||
, params)";
|
||||
return $code;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
register_actions_play_video('cbplayer');
|
||||
}
|
||||
?>
|
62
upload/player/cbplayer/settings.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/**
|
||||
* ClipBucket Player v2 Settings File
|
||||
*/
|
||||
|
||||
include('../../includes/common.php');
|
||||
$vid = $_GET['vid'];
|
||||
$v = $cbvideo->get_video($vid);
|
||||
header ("content-type: text/xml");
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>';
|
||||
?>
|
||||
<settings>
|
||||
<options>
|
||||
<autoResize value="true"/>
|
||||
<playerWidth value="500"/>
|
||||
<playerHeight value="350"/>
|
||||
|
||||
<autoLoad value="true"/>
|
||||
<autoPlay value="false"/>
|
||||
<loop value="false"/>
|
||||
|
||||
<keepAspectRatio value="true"/>
|
||||
|
||||
<volume value="50"/>
|
||||
<controlsPadding value="10"/>
|
||||
|
||||
<showPreviewImage value="true"/>
|
||||
<showShareBtn value="false"/>
|
||||
<showFullScreenBtn value="true"/>
|
||||
<showMiddlePlayBtn value="true"/>
|
||||
|
||||
<showWatermark value="true"/>
|
||||
<watermarkPos value="BR"/>
|
||||
|
||||
<spaceKeyListener value="true"/>
|
||||
<clickListener value="true"/>
|
||||
</options>
|
||||
|
||||
<colors>
|
||||
<playerBackground value="0x000000"/>
|
||||
<preloader background="0x000000" bckAlpha="70" text="0xCCCCCC" circle="0x559BB5"/>
|
||||
<middlePlayBtn arrowNormal="0xFFFFFF" bckNormal="0x000000" alphaNormal="60" arrowOver="0xFFFFFF" bckOver="0x000000" alphaOver="80" arrowDown="0xFFFFFF" bckDown="0x000000" alphaDown="100"/>
|
||||
<controllerBackground value="0x000000"/>
|
||||
<controllerButtons normal="0xCCCCCC" over="0xFFFFFF" down="0xFFFFFF"/>
|
||||
<volume border="0x666666" background="0x000000" speaker="0xCCCCCC" bar="0x559BB5"/>
|
||||
<volumeScrubBtn brdNormal="0xCCCCCC" bckNormal="0x000000" brdOver="0xFFFFFF" bckOver="0x000000" brdDown="0xFFFFFF" bckDown="0x000000" />
|
||||
<progressBar border="0x666666" background="0x000000" elapse="0x559BB5" download="0x999999"/>
|
||||
<progressScrubBtn brdNormal="0xCCCCCC" bckNormal="0x000000" brdOver="0xFFFFFF" bckOver="0x000000" brdDown="0xFFFFFF" bckDown="0x000000" />
|
||||
<times value="0xCCCCCC"/>
|
||||
<share background="0x000000" bckAlpha="40" boxBck="0x000000" boxBckAlpha="70" labels="0xFFFFFF" errorText="0x00FF00" text="0x000000" textBck="0xFFFFFF" textBrd="0x000000" btnsNormal="0xCCCCCC" btnsOver="0xFFFFFF" btnsDown="0xFFFFFF"/>
|
||||
</colors>
|
||||
|
||||
|
||||
<video>
|
||||
<videoPath value="<?=get_video_file($v,true,true);?>"/>
|
||||
<stafImage value="images/ratatouilleStaf.jpg"/>
|
||||
<aspectRatio value="4:3"/>
|
||||
<totalTime value="<?=$v['duration']?>"/>
|
||||
<watermarkPath value="<?=get_player_logo()?>"/>
|
||||
<watermarkLink value="<?=video_link($v)?>"/>
|
||||
</video>
|
||||
</settings>
|
23
upload/player/cbplayer/staf.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
$playerPath = urldecode($_POST["playerPath"]);
|
||||
$to = urldecode($_POST["toEmail"]);
|
||||
|
||||
$subject = "Message from your friend";
|
||||
|
||||
$from_header = "MIME-Version: 1.0"."\r\n";
|
||||
$from_header .= "Content-type: text/html; charset=iso-8859-1"."\r\n";
|
||||
$from_header .= "From: ".urldecode($_POST["fromEmail"]);
|
||||
|
||||
$imgPath = urldecode($_POST["imgPath"]);
|
||||
$playerPage = urldecode($_POST["playerPage"]);
|
||||
|
||||
$file = $playerPath."stafTemplate.html";
|
||||
$f = fopen($file, "r");
|
||||
$content = fread($f, 8192);
|
||||
fclose($f);
|
||||
$content = str_replace(array('[videoPage]','[imgPath]'), array($playerPage, $imgPath), $content);
|
||||
|
||||
mail($to, $subject, $content, $from_header);
|
||||
|
||||
echo "status=sent";
|
||||
?>
|
13
upload/player/cbplayer/stafTemplate.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Hi,<br/>Your friend thought you might be interested in this video:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="[videoPage]" target="_blank"><img border="0" src="[imgPath]" alt="Go to Video!" /></a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
BIN
upload/player/cbplayer/videoPlayer.swf
Normal file
48
upload/player/jwplayer/cbplayer.plug.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is used to instruct ClipBucket
|
||||
* for how to operate JW PLayer
|
||||
* this file is protype
|
||||
* you can get complete instructions
|
||||
* from docs.clip-bucket.com
|
||||
*
|
||||
* @Author : Arslan Hassan
|
||||
* @Script : ClipBucket v2
|
||||
* @License : CBLA
|
||||
* @Since : September 15 2009
|
||||
*/
|
||||
|
||||
|
||||
if(!function_exists('jwplayer'))
|
||||
{
|
||||
|
||||
define("JWPLAYER",TRUE);
|
||||
define("AUTOPLAY",false);
|
||||
define("SKIN","default.swf");
|
||||
|
||||
function jwplayer($vdata)
|
||||
{
|
||||
global $swfobj;
|
||||
$vid_file = get_video_file($vdata,false,false);
|
||||
|
||||
if($vid_file)
|
||||
{
|
||||
$swfobj->playerFile = PLAYER_URL.'/jwplayer/player.swf';
|
||||
$swfobj->FlashObj();
|
||||
//Writing Param
|
||||
$swfobj->addParam('allowfullscreen','true');
|
||||
$swfobj->addParam('allowscriptaccess','always');
|
||||
$swfobj->addParam('wmode','opaque');
|
||||
|
||||
$swfobj->addVar('file',BASEURL.'/files/videos/'.$vid_file);
|
||||
$swfobj->CreatePlayer();
|
||||
return $swfobj->code;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
register_actions_play_video('jwplayer');
|
||||
}
|
||||
?>
|
BIN
upload/player/jwplayer/skin/Snel.swf
Normal file
BIN
upload/player/jwplayer/skin/dangdang.swf
Normal file
BIN
upload/player/jwplayer/skin/nacht.swf
Normal file
BIN
upload/player/jwplayer/skin/new.swf
Normal file
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
require_once('../includes/common.php');
|
||||
|
||||
/**
|
||||
* This file is used to install Embed Video Mod
|
||||
*/
|
||||
|
||||
function uninstall_embed_video_mode()
|
||||
{
|
||||
global $db;
|
||||
$db->Execute("ALTER TABLE `video` DROP `embed_code` ");
|
||||
}
|
||||
uninstall_embed_video_mode();
|
||||
?>
|
BIN
upload/styles/cbv2/images/dot.gif
Normal file
After Width: | Height: | Size: 43 B |
BIN
upload/styles/cbv2/images/field_bg.png
Normal file
After Width: | Height: | Size: 557 B |
BIN
upload/styles/cbv2/images/gradients.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
upload/styles/cbv2/images/header/navs.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
upload/styles/cbv2/images/icons.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
upload/styles/cbv2/images/logo.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
upload/styles/cbv2/images/preview.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
upload/styles/cbv2/images/the_bg.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
26
upload/styles/cbv2/layout/blocks/add_comment.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<div class="add_comment_box">
|
||||
<div class="a_comment"><a href="javascript:void(0)"><span class="add_comment_icon"> </span> Add Comment</a>
|
||||
|
||||
{if $userquery->login_check('',true) || $Cbucket->configs.anonym_comments == 'yes'}
|
||||
<form name="form1" method="post" action="">
|
||||
{if !$userquery->login_check('',true) && $Cbucket->configs.anonym_comments == 'yes'}
|
||||
<label for="name" class="label">Name</label>
|
||||
<br>
|
||||
<input type="text" name="name" id="name" class="input"><br>
|
||||
<label for="email" class="label">Email (Wont display)</label>
|
||||
<br>
|
||||
<input type="text" name="email" id="email" class="input"><br>
|
||||
{else}
|
||||
Name : {$userquery->username}<br>
|
||||
{/if}
|
||||
<label for="comment_box" class="label">Comment</label>
|
||||
<br>
|
||||
{ANCHOR place='before_compose_box'}
|
||||
<textarea name="comment" id="comment_box" cols="45" rows="5" class="input" ></textarea>
|
||||
<br>
|
||||
<input type="submit" name="add_comment" id="add_comment" value="Add Comment">
|
||||
</form>
|
||||
{else}
|
||||
Please login to comment
|
||||
{/if}
|
||||
</div>
|
9
upload/styles/cbv2/layout/blocks/category_list.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<div class="category_list">
|
||||
<span class="heading">Categories</span>
|
||||
{assign var='category_list' value=func->getCategoryList(video)}
|
||||
<ul>
|
||||
{foreach from=$category_list item=cat}
|
||||
<li><a href="#">{$cat.category_name}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
12
upload/styles/cbv2/layout/blocks/comments.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{assign var='comments' value=$myquery->get_comments($id,$type)}
|
||||
{foreach from=$comments item=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>
|
||||
{else}
|
||||
<a href='#comment_{$comment_id}'>{$comment.anonym_name}</a>
|
||||
{/if}
|
||||
wrote on {$comment.date_added|date_format}<br />
|
||||
{$comment.comment}
|
||||
</div>
|
||||
{/foreach}
|
3
upload/styles/cbv2/layout/blocks/pagination.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div class="pagination" align="center">
|
||||
Pages : {if $first_link !=''}<a {$first_link}>«</a>{/if} {if $pre_link !=''}<a {$pre_link} >‹</a>{/if} {$pagination} {if $next_link !=''}<a {$next_link}>›</a>{/if} {if $last_link !=''}<a {$last_link}>»</a>{/if}
|
||||
</div>
|
5
upload/styles/cbv2/layout/blocks/video.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="video_block" align="center">
|
||||
<img src="{getThumb vdetails=$video}" width="120" height="90" border="0" /> <br>
|
||||
<a href="{videoLink vdetails=$video}"> <span class="tabs_01" style="padding:3px">
|
||||
{$video.title|truncate:20}</span></a>
|
||||
</div>
|
24
upload/styles/cbv2/layout/body.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{* 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" }
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="footer">
|
||||
© {$title} {$smarty.now|date_format:"%Y"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
157
upload/styles/cbv2/layout/global_header.html
Normal file
|
@ -0,0 +1,157 @@
|
|||
<!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" />
|
||||
<!-- ClipBucket v2 -->
|
||||
<meta name="copyright" content="ClipBucket - PHPBucket ClipBucket 2007 - {$smarty.now|date_format:"%Y"}" />
|
||||
<meta name="author" content="Arslan Hassan - http://clip-bucket.com/Arslan-Hassan" />
|
||||
|
||||
<meta name="keywords" content="{$meta_keywords}" />
|
||||
<meta name="description" content="{$meta_description}" />
|
||||
<meta name="distribution" content="global" />
|
||||
|
||||
|
||||
<title>{$title}</title>
|
||||
|
||||
<link href="{$theme}/main.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
var baseurl = '{$baseurl}';
|
||||
var imageurl = '{$imageurl}';
|
||||
{if $upload_form_name !=''}
|
||||
var upload_form_name = '{$upload_form_name}';
|
||||
function submit_upload_form()
|
||||
{literal}
|
||||
{
|
||||
{/literal}
|
||||
document.{$upload_form_name}.submit();
|
||||
{literal}
|
||||
}
|
||||
{/literal}
|
||||
{/if}
|
||||
</script>
|
||||
<!-- Including JS Files-->
|
||||
{foreach from=$Cbucket->JSArray key=file item=type}
|
||||
{if $curActive == $type || $type=='global' }
|
||||
<script src="{$js}/{$file}"></script>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<!-- Including JS Files-->
|
||||
|
||||
|
||||
<!-- Including Headers -->
|
||||
{foreach from=$Cbucket->header_files key=type item=file}
|
||||
{if $curActive == $type || $type=='global' }
|
||||
{include file="$file"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<!-- Ending Headers -->
|
||||
|
||||
|
||||
|
||||
{if $page == 'upload_video'}
|
||||
|
||||
<script type="text/javascript">
|
||||
var swfu;
|
||||
var file_name = {$file_name};
|
||||
{literal}
|
||||
window.onload = function() {
|
||||
var settings = {
|
||||
{/literal}
|
||||
flash_url : "{$js}/swfupload/swfupload.swf",
|
||||
upload_url: "{$baseurl}/actions/file_uploader.php",
|
||||
button_image_url: "{$baseurl}/images/icons/XPButton.png",
|
||||
post_params:
|
||||
{literal}
|
||||
{
|
||||
{/literal}
|
||||
"file_name" : file_name,
|
||||
{literal}
|
||||
}
|
||||
{/literal},
|
||||
|
||||
|
||||
file_size_limit : "{$Clipbucket->configs.max_upload_size} MB",
|
||||
{literal}
|
||||
file_types : "*.*",
|
||||
file_types_description : "All Files",
|
||||
file_upload_limit : 2,
|
||||
file_queue_limit : 0,
|
||||
custom_settings : {
|
||||
progressTarget : "fsUploadProgress",
|
||||
cancelButtonId : "btnCancel"
|
||||
},
|
||||
debug: false,
|
||||
|
||||
// Button settings
|
||||
|
||||
button_placeholder_id: "spanButtonPlaceHolder",
|
||||
button_width: 61,
|
||||
button_height: 22,
|
||||
|
||||
// The event handler functions are defined in handlers.js
|
||||
file_queued_handler : fileQueued,
|
||||
file_queue_error_handler : fileQueueError,
|
||||
file_dialog_complete_handler : fileDialogComplete,
|
||||
upload_start_handler : uploadStart,
|
||||
upload_progress_handler : uploadProgress,
|
||||
upload_error_handler : uploadError,
|
||||
upload_success_handler : uploadSuccess,
|
||||
upload_complete_handler : uploadComplete,
|
||||
queue_complete_handler : queueComplete // Queue plugin event
|
||||
|
||||
|
||||
}
|
||||
|
||||
swfu = new SWFUpload(settings);
|
||||
};
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{/if}
|
||||
<!-- Including Plugin Headers -->
|
||||
{php}
|
||||
global $plugin_list;
|
||||
if(!empty($plugin_list) && is_array($plugin_list))
|
||||
{
|
||||
foreach($plugin_list as $plugin)
|
||||
{
|
||||
if(!empty($plugin['plugin_header_file']))
|
||||
{
|
||||
if( !empty($plugin['plugin_folder']) &&
|
||||
file_exists(PLUG_DIR.'/'.$plugin['plugin_folder'].'/'.$plugin['plugin_header_file'])
|
||||
)
|
||||
{
|
||||
template(PLUG_DIR.'/'.$plugin['plugin_folder'].'/'.$plugin['plugin_header_file'],false);
|
||||
}else{
|
||||
if(file_exists(PLUG_DIR.'/'.$plugin['plugin_header_file']))
|
||||
template(PLUG_DIR.'/'.$plugin['plugin_header_file'],false);
|
||||
}}
|
||||
}
|
||||
}
|
||||
{/php}
|
||||
|
||||
<!-- Including Plugin Headers -->
|
||||
|
||||
<!-- Including Module Headers -->
|
||||
{php}
|
||||
global $Cbucket;
|
||||
$modlist = $Cbucket->moduleList;
|
||||
if(!empty($modlist) && is_array($modlist))
|
||||
{
|
||||
foreach($modlist as $mod)
|
||||
{
|
||||
if(!empty($mod['module_include_file']) &&
|
||||
file_exists(MODULEDIR.'/'.$mod['module_include_file']))
|
||||
template(MODULEDIR.'/'.$mod['module_include_file'],false);
|
||||
}
|
||||
}
|
||||
{/php}
|
||||
<!-- Including Module Headers -->
|
||||
|
||||
</head>
|
||||
|
||||
<!-- Global Header Ends Here -->
|
24
upload/styles/cbv2/layout/header.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<div id="header">
|
||||
<div class="logo">
|
||||
<img src="{$imageurl}/dot.gif" id="logo_icon" alt="{$title} Logo" title="{$title}" >
|
||||
</div>
|
||||
<div class="header_box" align="right">
|
||||
{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>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="nav_container">
|
||||
<div class="nav_menu">
|
||||
<ul>
|
||||
<li><a href="{$baseurl}">Home</a></li>
|
||||
<li><a href="{link name='videos'}">Videos</a></li>
|
||||
<li><a href="{link name='signup'}">Signup</a></li>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
4
upload/styles/cbv2/layout/index.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
asdasd
|
||||
asd
|
||||
asd
|
||||
as
|
53
upload/styles/cbv2/layout/message.html
Normal file
|
@ -0,0 +1,53 @@
|
|||
<br />
|
||||
|
||||
{assign var=msg value=$eh->message_list}
|
||||
{assign var=err value=$eh->error_list}
|
||||
{if $err.0 neq ''}
|
||||
<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>
|
||||
<td width="888" background="{$imageurl}/message_t.png"></td>
|
||||
<td width="11"><img src="{$imageurl}/message_tr.png" width="11" height="12" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td background="{$imageurl}/message_l.png"> </td>
|
||||
<td bgcolor="#FFEAEB"><ul>
|
||||
{foreach from=$err item=show_msg}
|
||||
<li> {$show_msg} </li>
|
||||
{/foreach}
|
||||
</ul></td>
|
||||
<td background="{$imageurl}/message_r.png"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$imageurl}/message_bl.png" width="11" height="12" /></td>
|
||||
<td background="{$imageurl}/message_b.png"></td>
|
||||
<td><img src="{$imageurl}/message_br.png" width="11" height="12" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
{/if}
|
||||
|
||||
{if $msg.0 neq ''}
|
||||
<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>
|
||||
<td width="888" background="{$imageurl}/message_t.png"></td>
|
||||
<td width="11"><img src="{$imageurl}/message_tr.png" width="11" height="12" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td background="{$imageurl}/message_l.png"> </td>
|
||||
<td bgcolor="#B9E3FF"><ul>
|
||||
{foreach from=$msg item=show_msg}
|
||||
<li> {$show_msg} </li>
|
||||
{/foreach}
|
||||
</ul></td>
|
||||
<td background="{$imageurl}/message_r.png"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$imageurl}/message_bl.png" width="11" height="12" /></td>
|
||||
<td background="{$imageurl}/message_b.png"></td>
|
||||
<td><img src="{$imageurl}/message_br.png" width="11" height="12" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
{/if}
|
17
upload/styles/cbv2/layout/videos.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
<!-- Listing Categories -->
|
||||
{include file="$style_dir/blocks/category_list.html" type='video'}
|
||||
<!-- Listing Categories 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"}
|
49
upload/styles/cbv2/layout/watch_video.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
<div class="video_title">{$vdo.title}</div>
|
||||
{if has_access('admin_access')}<div>{ANCHOR place=watch_admin_options}</div>{/if}
|
||||
|
||||
<div class="player_container">
|
||||
<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}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Video Details option -->
|
||||
<div class="video_details">
|
||||
<span class="vd_heading">About This Video</span>
|
||||
<div class="vd_user">
|
||||
{assign var='udetails' value=$userquery->get_user_details($vdo.userid)}
|
||||
<a class="vd_thumb" href="#"><img src="{$userquery->getUserThumb($udetails)}" class="mid_user_thumb" /></a>
|
||||
{$udetails.username} uploaded on {$vdo.date_added|date_format}<br />
|
||||
{$vdo.views|number_format} times viewed<br />
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
<div class="vd_desc">
|
||||
{$vdo.description}
|
||||
</div>
|
||||
<img src="{$imageurl}/dot.gif" class="tags_icon" /> {$vdo.tags|tags:video}<br />
|
||||
Categories : {$vdo.category|categories:video}
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<!-- Video Right -->
|
||||
<div class="video_right">
|
||||
<!-- Video Options -->
|
||||
<div class="video_options" align="center">
|
||||
<a href="#"><span class="share_video"> </span> Share This Video</a>
|
||||
<a href="#"><span class="add_favorite"> </span> Add To Favorites</a>
|
||||
<a href="#"><span class="flag_video"> </span> Flag this video</a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Video Comments Options -->
|
||||
{include file="$style_dir/blocks/add_comment.html"}
|
||||
|
||||
<!-- Displaying Comments -->
|
||||
{include file="$style_dir/blocks/comments.html" id=$vdo.videoid type=v}
|
||||
</div>
|
9
upload/styles/cbv2/template.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>ClipBucket v2</name>
|
||||
<author>Arslan Hassan</author>
|
||||
<version>1</version>
|
||||
<released>2009 September 15</released>
|
||||
<description>ClipBucket version 2.0 Theme by Arslan Hassan</description>
|
||||
<website title="ClipBucket">http://clip-bucket.com</website>
|
||||
</template>
|
9
upload/styles/cbv2/theme/blocks.css
Normal file
|
@ -0,0 +1,9 @@
|
|||
@charset "utf-8";
|
||||
/* CSS Document */
|
||||
.video_block{width:130px; margin:5px; float:left}
|
||||
|
||||
/* Category List */
|
||||
.category_list{width:160px; float:left; margin-right:10px;}
|
||||
.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}
|
68
upload/styles/cbv2/theme/body.css
Normal file
|
@ -0,0 +1,68 @@
|
|||
@charset "utf-8";
|
||||
/* CSS Document */
|
||||
body{
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
font-size:12px;
|
||||
color:#333;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
a{text-decoration:none; font-family:Arial, Helvetica, sans-serif;color:#333; }
|
||||
|
||||
#header{width:990px; margin:auto}
|
||||
#logo_icon{ width:350px; height:65px; background-image:url(../images/logo.png)}
|
||||
.logo{float:left; width:400px;}
|
||||
|
||||
.clear{clear:both}
|
||||
.clear_left{clear:left}
|
||||
.clear_left{clear:right}
|
||||
|
||||
#content{width:970px; margin:auto; padding-top:10px; min-height:800px}
|
||||
#content_container{background-image:url(../images/the_bg.png); background-position:center; background-repeat:no-repeat; min-height:500px }
|
||||
|
||||
.header_box{ padding-right:10px; padding-top:5px; font-size:13px; font-weight:bold}
|
||||
.header_box a{color:#0099cc}
|
||||
|
||||
.heading{font-size:16px; color:#333; font-weight:bold}
|
||||
|
||||
.verticle_ad{width:160px; float:left}
|
||||
|
||||
#footer{ background-image:url(../images/gradients.png); height:29px;}
|
||||
.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}
|
||||
|
||||
.video_options { width:100%; margin:10px 0px 10px 0px}
|
||||
.video_options a{display:inline-block; height:37px; line-height:37px; width:180px; color:#333; font-size:16px; font-weight:bold}
|
||||
.share_video,.flag_video,.add_favorite,.add_comment_icon,.tags_icon{background-image:url(../images/icons.png); height:37px; width:37px; background-repeat:no-repeat; display:inline-block}
|
||||
.share_video{background-position:-37px 0px;}
|
||||
.flag_video{background-position:-74px -0px}
|
||||
.add_comment_icon{background-position:-111px -0px}
|
||||
.tags_icon{background-position:-0px -36px; width:15px; height:15px}
|
||||
|
||||
|
||||
|
||||
|
||||
.player_container{width:620px; float:left}
|
||||
.video_right{width:600px;}
|
||||
|
||||
|
||||
.add_comment_box .a_comment a{display:inline-block; height:37px; line-height:37px; width:300px;color:#333; font-size:16px; font-weight:bold}
|
||||
|
||||
|
||||
|
||||
.video_details{width:320px; border:1px solid #0099cc; float:left; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; padding:5px}
|
||||
.vd_heading{display:block; border-bottom:1px solid #999; font-size:14px; font-weight:bold}
|
||||
|
||||
.vd_user{margin:5px 0px 5px 0px}
|
||||
.vd_thumb{display:inline-block; float:left;}
|
||||
.mid_user_thumb{max-width:60px; max-height:60px; display:inline-block; margin-right:5px}
|
||||
.vd_desc{ border-bottom:1px solid #999; margin-bottom:5px }
|
||||
|
||||
|
||||
/* 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}
|
10
upload/styles/cbv2/theme/main.css
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
ClipBucket 'ClipBucket v2' Template Theme by Arslan Hassan
|
||||
--------------------------------------------------------------
|
||||
Style name: ClipBucket v2
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@import url("body.css");
|
||||
@import url("navbar.css");
|
||||
@import url("blocks.css");
|
7
upload/styles/cbv2/theme/navbar.css
Normal file
|
@ -0,0 +1,7 @@
|
|||
#nav_container{background-image:url(../images/gradients.png); height:35px}
|
||||
|
||||
.nav_menu{width:990px; margin:auto; }
|
||||
.nav_menu ul{padding:0px; margin:0px; padding-top:6px}
|
||||
.nav_menu ul li{padding:0px; margin:0px; list-style:none; float:left; margin-right:2px}
|
||||
.nav_menu a{display:block; width:127px; background-image:url(../images/header/navs.png); height:29px; color:#fff; font-size:14px; font-weight:bold; text-align:center; line-height:29px; font-family:Arial, Helvetica, sans-serif; text-decoration:none}
|
||||
.nav_menu a:hover{background-position:0px -29px}
|
BIN
upload/styles/clipbucketblue/images/preview.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
7
upload/styles/clipbucketblue/layout/body.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
{include file="$style_dir/header.html" }
|
||||
{include file="$style_dir/message.html"}
|
||||
{foreach from=$template_files item=file}
|
||||
{include file="$style_dir/$file" }
|
||||
{/foreach}
|
||||
{include file="$style_dir/footer.html"}
|
|
@ -26,7 +26,7 @@
|
|||
<tr>
|
||||
<td height="30" colspan="2" align="center" class="Tags">
|
||||
|
||||
<div id="{$player_div_id}">
|
||||
<div id="videoPlayer">
|
||||
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">
|
||||
|
|
9
upload/styles/clipbucketblue/template.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>ClipBucket Aqua Classic</name>
|
||||
<author>Arslan Hassan</author>
|
||||
<version>1</version>
|
||||
<released>2009 September 15</released>
|
||||
<description>ClipBucket Aqua (ClipBucket Blue) 2.0 Theme by Arslan Hassan</description>
|
||||
<website title="ClipBucket">http://clip-bucket.com</website>
|
||||
</template>
|
|
@ -1,110 +1,33 @@
|
|||
<?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",'videos');
|
||||
require 'includes/config.inc.php';
|
||||
$pages->page_redir();
|
||||
subtitle('videos');
|
||||
|
||||
$cat_id = "";
|
||||
$featured = "";
|
||||
$orderby = "";
|
||||
$query_limit = "";
|
||||
|
||||
$myquery->getVideoList(array('limit'=>'nolimit','featured'=>'yes','order'=>'date_added DESC'));
|
||||
//Getting Video List
|
||||
$page = mysql_clean($_GET['page']);
|
||||
$get_limit = create_query_limit($page,VLISTPP);
|
||||
$videos = $db->select("video",'*',$cond,$get_limit,"date_added DESC");
|
||||
Assign('videos', $videos);
|
||||
|
||||
//Listing Videos
|
||||
$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 = "$from,$limit";
|
||||
//Getting Category
|
||||
@$cat = mysql_clean($_GET['ct']);
|
||||
if(!empty($cat) && $cat !='all'){
|
||||
$cat_id = $cat;
|
||||
}
|
||||
$cur_cat = $myquery->GetCategory($cat);
|
||||
|
||||
Assign('cur_cat',$cur_cat);
|
||||
|
||||
//Getting Order
|
||||
@$order = mysql_clean($_GET['order']);
|
||||
if(empty($order)){
|
||||
$order = 'all';
|
||||
}
|
||||
Assign('order',$order);
|
||||
$orders = array(
|
||||
'all' => 'date_added DESC',
|
||||
'mr' => 'date_added DESC',
|
||||
'mv' => 'views DESC',
|
||||
'ra' => 'RAND()'
|
||||
//Collecting Data for Pagination
|
||||
$total_rows = $db->count('video','*',$cond);
|
||||
$records = $total_rows/VLISTPP;
|
||||
$total_pages = round($records+0.49,0);
|
||||
|
||||
);
|
||||
if($order != 'fr')
|
||||
{
|
||||
$orderby = $orders[$order];
|
||||
}
|
||||
else
|
||||
{
|
||||
$featured = 'yes';
|
||||
}
|
||||
|
||||
//$sql = "SELECT * FROM video WHERE $cat_query AND $query_param $orderby $query_limit";
|
||||
//$sql_p = "SELECT * FROM video WHERE $cat_query AND $query_param $orderby";
|
||||
$sql = $myquery->getVideoList(array(
|
||||
'feature'=>$featured,
|
||||
'order'=>$orderby,
|
||||
'limit'=>$query_limit
|
||||
),true,'query');
|
||||
$sql_p = $myquery->getVideoList(array(
|
||||
'feature'=>$featured,
|
||||
'order'=>$orderby,
|
||||
'limit'=>'nolimit'
|
||||
),true,'query');
|
||||
$vdo_data = $db->Execute($sql);
|
||||
$total_vdo = $vdo_data->recordcount() + 0;
|
||||
$videos = $vdo_data->getrows();
|
||||
|
||||
|
||||
Assign('videos',$videos);
|
||||
Assign('ct','&ct='.$cat);
|
||||
|
||||
//Pagination
|
||||
$link = '?ct='.$cat.'&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;
|
||||
$total_pages = round($records+0.49,0);
|
||||
|
||||
$show_pages = ShowPagination($total_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);
|
||||
$pages->paginate($total_pages,$page);
|
||||
|
||||
|
||||
Template('header.html');
|
||||
Template('message.html');
|
||||
Template('videos.html');
|
||||
Template('footer.html');
|
||||
|
||||
//Displaying The Template
|
||||
template_files('videos.html');
|
||||
display_it();
|
||||
?>
|
||||
|
|
@ -7,257 +7,26 @@
|
|||
*******************************************************************
|
||||
*/
|
||||
|
||||
define("THIS_PAGE",'watch_video');
|
||||
require 'includes/config.inc.php';
|
||||
|
||||
$pages->page_redir();
|
||||
if(VIDEO_REQUIRE_LOGIN == 1){
|
||||
$userquery->logincheck();
|
||||
}
|
||||
|
||||
//Getting Video Key
|
||||
$vkey = @$_GET['v'];
|
||||
|
||||
if(isset($_REQUEST['delete_video']) && $is_admin == 1){
|
||||
$userquery->admin_login_check();
|
||||
$video = $_REQUEST['delete_video'];
|
||||
$myquery->DeleteVideo($video);
|
||||
header( 'Location: '.BASEURL.videos_link.'' ) ;
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['delete_video']) && $is_admin != 1)
|
||||
{
|
||||
header( 'Location: '.BASEURL.videos_link.'' );
|
||||
}
|
||||
|
||||
//Checking Video Key
|
||||
if(!empty($vkey) && $myquery->CheckVideoExists($vkey) && $vkey !=""){
|
||||
$videos = $myquery->GetVideDetails($vkey);
|
||||
$video_flv = $videos['flv'];
|
||||
if($videos['active'] == 'yes'){
|
||||
$myquery->UpdateVideoViews($vkey);
|
||||
|
||||
//assigning Tags
|
||||
$tags = $videos['tags'];
|
||||
$tags = explode(" ", $tags );
|
||||
Assign("tags",$tags);
|
||||
|
||||
//Getting Categories
|
||||
$categories[] = $myquery->GetCategory($videos['category01']);
|
||||
$categories[] = $myquery->GetCategory($videos['category02']);
|
||||
$categories[] = $myquery->GetCategory($videos['category03']);
|
||||
Assign("categories",$categories);
|
||||
$videos['url'] = VideoLink($vkey,$videos['title']);
|
||||
//Adding Comment
|
||||
if(isset($_POST['add_comment'])){
|
||||
$comment = $_POST['comment'];
|
||||
$reply_to = $_POST['reply_to'];
|
||||
$msg = $myquery->add_comment($comment,$videos['videoid'],$reply_to);
|
||||
}
|
||||
|
||||
//Rating Comments
|
||||
if(isset($_POST['thumb_up'])){
|
||||
$rate = 1;
|
||||
$commentid = $_POST['comment_id'];
|
||||
$msg = $myquery->RateComment($rate,$commentid);
|
||||
}
|
||||
if(isset($_POST['thumb_down'])){
|
||||
$rate = -1;
|
||||
$commentid = $_POST['comment_id'];
|
||||
$msg = $myquery->RateComment($rate,$commentid);
|
||||
}
|
||||
|
||||
//Deleting Comment
|
||||
if(isset($_GET['delete_comment'])){
|
||||
$cid = $_GET['delete_comment'];
|
||||
$query = mysql_query("SELECT videoid FROM video_comments WHERE comment_id='".$cid."'");
|
||||
$data = mysql_fetch_array($query);
|
||||
$query = mysql_query("SELECT username FROM video WHERE videoid='".$data['videoid']."'");
|
||||
$data = mysql_fetch_array($query);
|
||||
if(!is_numeric($cid)){
|
||||
$msg = $LANG['vdo_cheat_msg'];
|
||||
}
|
||||
elseif($is_admin)
|
||||
{
|
||||
$msg = "Comment Has Been Deleted";
|
||||
$myquery->DeleteComment($cid,$videos['videoid']);
|
||||
}
|
||||
elseif($_SESSION['username'] != $videos['username'] || $_SESSION['username'] !=$data['username']){
|
||||
$msg = $LANG['vdo_limits_warn_msg'];
|
||||
}else{
|
||||
$msg = $LANG['vdo_cmt_del_msg'];
|
||||
$myquery->DeleteComment($cid,$videos['videoid']);
|
||||
if(video_playable($vkey))
|
||||
{
|
||||
$vdo = $cbvid->get_video($vkey);
|
||||
assign('vdo',$vdo);
|
||||
//Addming Comment
|
||||
if(isset($_POST['add_comment']))
|
||||
{
|
||||
$cbvideo->add_comment($_POST['comment'],$vdo['videoid']);
|
||||
}
|
||||
}
|
||||
|
||||
//Getting Comments
|
||||
$sql = "Select * FROM comments WHERE type='v' AND type_id='".$videos['videoid']."' ORDER BY date_added DESC";
|
||||
$rs = $db->Execute($sql);
|
||||
$total_comments = $rs->recordcount() + 0;
|
||||
$comments = $rs->getrows();
|
||||
|
||||
|
||||
Assign('total_comments',$total_comments);
|
||||
Assign('comments',$comments);
|
||||
|
||||
//Check Video Favourites
|
||||
$sql = "Select * from video_favourites WHERE videoid='".$videos['videoid']."'";
|
||||
$rs = $db->Execute($sql);
|
||||
$favourited = $rs->recordcount() + 0;
|
||||
Assign('favourited',$favourited);
|
||||
|
||||
|
||||
|
||||
//Getting Duration and Original File
|
||||
$details = $myquery->GetVideoDetail($videos['flv']);
|
||||
$details['duration'] = SetTime($details['duration']);
|
||||
$flv_status = @$details['status'];
|
||||
Assign("details",$details);
|
||||
|
||||
//Get User Data
|
||||
assign("udetails",$userquery->get_user_details($videos['userid']));
|
||||
|
||||
//Subscribing User
|
||||
if(isset($_POST['subscribe'])){
|
||||
$userquery->logincheck();
|
||||
$sub_user = $_COOKIE['username'];
|
||||
$sub_to = $user_data['username'];
|
||||
$msg = $userquery->SubscribeUser($sub_user,$sub_to);
|
||||
}
|
||||
|
||||
//Get Rating Details
|
||||
$rating = $videos['rating']/2;
|
||||
$rated_by = $videos['rated_by'];
|
||||
Assign("rating",$rating);
|
||||
Assign("rated_by",$rated_by);
|
||||
|
||||
if(VIDEO_RATING == '1' && $videos['allow_rating']=='yes'){
|
||||
$vote = '';
|
||||
}else{
|
||||
$vote = 'novote';
|
||||
}
|
||||
Assign('show_rating',pullRating($videos['videoid'],false,false,false,$vote));
|
||||
|
||||
//Setting Login
|
||||
if(isset($_COOKIE['userid'])){
|
||||
Assign('isLogged',1);
|
||||
}
|
||||
$niddle = "|";
|
||||
$niddle .= @$_COOKIE['userid'];
|
||||
$niddle .= "|";
|
||||
$flag = strstr($videos['voter_ids'], $niddle);
|
||||
if(!empty($flag)){
|
||||
Assign('a_v','yes');
|
||||
}
|
||||
//Add Br in Description
|
||||
$videos['description'] = nl2br($videos['description']);
|
||||
//Decoding Embedcode
|
||||
$videos['embed_code_encoded'] = htmlentities($videos['embed_code']);
|
||||
//Decoding Url
|
||||
$videos['flv_file_url'] = urlencode($videos['flv_file_url']);
|
||||
Assign("videos",$videos);
|
||||
|
||||
$query_param = "broadcast='public' AND active='yes' AND status='Successful'";
|
||||
//Getting Featured Vieo List 0,5
|
||||
$sql = "SELECT * FROM video WHERE featured = 'yes' AND $query_param ORDER BY date_added DESC LIMIT 0,5";
|
||||
$rs = $db->Execute($sql);
|
||||
$featured = $rs->getrows();
|
||||
$total_featured = $rs->recordcount() + 0;
|
||||
for($id=0;$id<$total_featured;$id++){
|
||||
$flv = $featured[$id]['flv'];
|
||||
$thumb = GetThumb($flv);
|
||||
$featured[$id]['thumb'] = $thumb;
|
||||
$featured[$id]['url'] = VideoLink($featured[$id]['videokey'],$featured[$id]['title']);
|
||||
}
|
||||
Assign('featured',$featured);
|
||||
|
||||
|
||||
//Getting Related Videos List
|
||||
$title = mysql_clean($videos['title']);
|
||||
$tags = mysql_clean($videos['tags']);
|
||||
$c1 = $videos['category01'];
|
||||
$c2 = $videos['category02'];
|
||||
$c3 = $videos['category03'];
|
||||
|
||||
$limit = VLISTPT;
|
||||
$limit = "LIMIT ".$limit;
|
||||
$query = "SELECT * FROM video WHERE
|
||||
broadcast = 'public' AND
|
||||
(title like '%$title%' OR
|
||||
tags like '%$tags%' OR
|
||||
category like '%$c1%' ) AND $query_param AND videokey!='".$videos['videokey']."' ORDER BY date_added DESC $limit";
|
||||
|
||||
$rs = $db->Execute($query);
|
||||
$related = $rs->getrows();
|
||||
$total_related = $rs->recordcount() + 0;
|
||||
for($id=0;$id<$total_related;$id++){
|
||||
$flv = $related[$id]['flv'];
|
||||
$thumb = GetThumb($flv);
|
||||
$related[$id]['thumb'] = $thumb;
|
||||
$flv_details = $myquery->GetVideoDetail($related[$id]['flv']);
|
||||
$related[$id]['duration'] = SetTime($flv_details['duration']);
|
||||
$related[$id]['url'] = VideoLink($related[$id]['videokey'],$related[$id]['title']);
|
||||
}
|
||||
Assign('related',$related);
|
||||
|
||||
//Assigning TagClouds
|
||||
$TagClouds = TagClouds("SELECT tags FROM video WHERE
|
||||
broadcast = 'public' AND
|
||||
(title like '%$title%' OR
|
||||
tags like '%$tags%' OR
|
||||
category like '%$c1%' ) AND $query_param ORDER BY videoid ASC LIMIT 0,20");
|
||||
Assign('TagClouds', $TagClouds);
|
||||
|
||||
//Adding Video To Favourite
|
||||
if(isset($_POST['add_to_fav']) || isset($_POST['add_to_fav_x']) || isset($_POST['add_to_fav_y'])){
|
||||
$userquery->logincheck();
|
||||
$msg=$myquery->AddToFavourite($_COOKIE['userid'],$videos['videoid']);
|
||||
}
|
||||
|
||||
if(isset($_POST['flag_video']) || isset($_POST['flag_video_x']) || isset($_POST['flag_video_y'])){
|
||||
$userquery->logincheck();
|
||||
$msg=$myquery->FlagAsInappropriate($_COOKIE['username'],$videos['videoid']);
|
||||
}
|
||||
|
||||
//Share Video
|
||||
if(isset($_POST['share_video']) || isset($_POST['share_video_x']) || isset($_POST['share_video_y'])){
|
||||
$email = mysql_clean($_POST['emails']);
|
||||
$message = mysql_clean($_POST['message']);
|
||||
$userquery->logincheck();
|
||||
if(isset($_SESSION['username'])){
|
||||
$msg=$myquery->ShareVideo($_COOKIE['username'],$videos['videoid'],$message,$email);
|
||||
}
|
||||
}
|
||||
|
||||
//Update Number Of Watched Videos of User
|
||||
if(isset($_COOKIE['userid'])){
|
||||
$userquery->UpdateWatched($_COOKIE['userid']);
|
||||
}
|
||||
|
||||
}else{
|
||||
$msg = $LANG['vdo_iac_msg'];
|
||||
//if(!isset($_SESSION['admin'])){
|
||||
Assign('show_video','no');
|
||||
header( 'Location:' .BASEURL.'/inactive.php' ) ;
|
||||
//}
|
||||
}
|
||||
}else{
|
||||
$msg = $LANG['class_vdo_del_err'];
|
||||
Assign('show_video','no');
|
||||
}
|
||||
|
||||
//This Function Create in some critical situation When Video Failed to get the duration and then this function initialized
|
||||
if($myquery->CheckVideoExists($vkey) && @$videos['status'] != 'Successful'){
|
||||
//$msg = $LANG['vdo_is_in_process'];
|
||||
if(!isset($_SESSION['admin'])){
|
||||
Assign('show_video','no');
|
||||
header( 'Location:' .BASEURL.'/inactive.php' ) ;
|
||||
}
|
||||
}
|
||||
|
||||
@Assign('msg',$msg);
|
||||
subtitle('watch_video',$videos['title']);
|
||||
Template('header.html');
|
||||
Template('message.html');
|
||||
Template('watch_video.html');
|
||||
Template('footer.html');
|
||||
//Displaying The Template
|
||||
template_files('watch_video.html');
|
||||
display_it();
|
||||
?>
|