Added : Playlist System

Added : Ajax System
Added : Ajax comments
Added : New rating
Added : Ajax Add to favorites
Added : Ajax share this
Added : Ajax Flag Video
Added : new watch video page
Added : New ClipBucket V2 Template
This commit is contained in:
Arslan Hassan 2009-11-30 19:46:45 +00:00
parent 704cd8dcd9
commit 280d287981
357 changed files with 4396 additions and 630 deletions

View file

@ -49,8 +49,9 @@ RewriteRule ^([^.]*)/?$ index.php [L]
#
#
#URL Rewriting for Videos
RewriteRule ^videos videos.php [nc]
RewriteRule ^video/(.*)/(.*)$ watch_video.php?v=$1&%{QUERY_STRING} [nc]
RewriteRule ^videos/([0-9a-z].+)/(.*)/(.*)/(.*)/(.*) videos.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^videos videos.php [L]
RewriteRule ^video/(.*)/(.*) watch_video.php?v=$1&%{QUERY_STRING} [L]
RewriteRule ^user/videos/(.*)$ user_videos.php?user=$1&%{QUERY_STRING}
#
#

View file

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

View file

@ -10,34 +10,6 @@
require'../includes/admin_config.php';
$userquery->admin_login_check();
$pages->page_redir();
@$page = $pages->show_admin_page(clean($_GET['settings']));
if(!empty($page)){
$pages->redirect($page);
}
if(@$_GET['mode'] == 'force_update'){
$stats->__FORCEUPDATE__();
$msg = "Everything Has Been Updated";
}
$stats->Refresh();
//$stats->UpdateDate();
//Getting Website Statistics
Assign('stats',$stats->stats);
Assign('server',$stats->ServerDetails());
$logs = "No Logfile Found";
if(file_exists(BASEDIR.'/logs/logs.txt'))
{
$logs = nl2br(htmlentities(file_get_contents(BASEDIR.'/logs/logs.txt')));
}
Assign('con_log',$logs );
/*Template('header.html');
Template('leftmenu.html');
Template('index.html');
Template('footer.html');
*/
template_files('index.html');

View file

@ -52,7 +52,7 @@ Website : <a href="{$curplayer.website}">{$curplayer.website}</a></td>
$(function() {
$("#resizable").resizable({
maxHeight: 800,
maxWidth: 600,
maxWidth: 800,
minHeight: 100,
minWidth: 100,
grid: 10,
@ -68,7 +68,7 @@ Website : <a href="{$curplayer.website}">{$curplayer.website}</a></td>
$(function() {
$("#resizable-channel").resizable({
maxHeight: 800,
maxWidth: 600,
maxWidth: 800,
minHeight: 100,
minWidth: 100,
grid: 10,

337
upload/ajax.php Normal file
View file

@ -0,0 +1,337 @@
<?php
/*
******************************************************************
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
*******************************************************************
*/
define("THIS_PAGE",'ajax');
require 'includes/config.inc.php';
$mode = $_POST['mode'];
if(!empty($mode))
{
switch($mode)
{
case 'recent_viewed_vids':
{
$videos = get_videos(array('limit'=>'20','order'=>'last_viewed DESC'));
foreach($videos as $video)
{
assign('video',$video);
Template('blocks/video.html');
}
}
break;
case 'most_viewed':
{
$videos = get_videos(array('limit'=>'20','order'=>'views DESC'));
foreach($videos as $video)
{
assign('video',$video);
Template('blocks/video.html');
}
}
break;
case 'recently_added':
{
$videos = get_videos(array('limit'=>'20','order'=>'date_added DESC'));
foreach($videos as $video)
{
assign('video',$video);
Template('blocks/video.html');
}
}
break;
case 'rating':
{
switch($_POST['type'])
{
case "video":
{
$rating = $_POST['rating']*2;
$id = $_POST['id'];
$result = $cbvid->rate_video($id,$rating);
$result['is_rating'] = true;
$cbvid->show_video_rating($result);
}
break;
}
}
break;
case 'share_object':
{
$type = strtolower($_POST['type']);
switch($type)
{
case 'v':
case 'video':
default:
{
$id = $_POST['id'];
$vdo = $cbvid->get_video($id);
$cbvid->set_share_email($vdo);
$cbvid->action->share_content($vdo['videoid']);
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';
}
if(error())
{
$msg = error_list();
$msg = '<div class="error">'.$msg[0].'</div>';
}
echo $msg;
}
break;
}
}
break;
case 'add_to_fav':
{
$type = strtolower($_POST['type']);
switch($type)
{
case 'v':
case 'video':
default:
{
$id = $_POST['id'];
$cbvideo->action->add_to_fav($id);
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';
}
if(error())
{
$msg = error_list();
$msg = '<div class="error">'.$msg[0].'</div>';
}
echo $msg;
}
break;
}
}
break;
case 'flag_object':
{
$type = strtolower($_POST['type']);
switch($type)
{
case 'v':
case 'video':
default:
{
$id = $_POST['id'];
$cbvideo->action->report_it($id);
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';
}
if(error())
{
$msg = error_list();
$msg = '<div class="error">'.$msg[0].'</div>';
}
echo $msg;
}
break;
}
}
break;
case 'subscribe_user':
{
$subscribe_to = mysql_clean($_POST['subscribe_to']);
$userquery->subscribe_user($subscribe_to);
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';
}
if(error())
{
$msg = error_list();
$msg = '<div class="error">'.$msg[0].'</div>';
}
echo $msg;
}
break;
case 'rate_comment':
{
$thumb = $_POST['thumb'];
$cid = mysql_clean($_POST['cid']);
if($thumb!='down')
$rate = 1;
else
$rate = -1;
$rating = $myquery->rate_comment($rate,$cid);
if(msg())
{
$msg = msg_list();
$msg = $msg[0];
}
if(error())
{
$msg = error_list();
$msg = $msg[0];
}
$ajax['msg'] = $msg;
$ajax['rate'] = comment_rating($rating);
echo json_encode($ajax);
}
break;
case 'add_comment';
{
$type = $_POST['type'];
switch($type)
{
case 'v':
case 'video':
default:
{
$id = mysql_clean($_POST['obj_id']);
$comment = $_POST['comment'];
if($comment=='undefined')
$comment = '';
$reply_to = $_POST['reply_to'];
$cid = $cbvid->add_comment($comment,$id,$reply_to);
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';;
}
if(error())
{
$err = error_list();
$err = '<div class="error">'.$err[0].'</div>';;
}
$ajax['msg'] = $msg ? $msg : '';
$ajax['err'] = $err;
//Getting Comment
if($cid)
{
$ajax['cid'] = $cid;
}
echo json_encode($ajax);
}
}
}
break;
case 'get_comment';
{
$id = mysql_clean($_POST['cid']);
$new_com = $myquery->get_comment($id);
assign('comment',$new_com);
Template('blocks/comments/comment.html');
}
break;
/**
* Function used to add item in playlist
*/
case 'add_playlist';
{
$vid = mysql_clean($_POST['vid']);
$pid = mysql_clean($_POST['pid']);
$cbvid->action->add_playlist_item($pid,$vid);
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';;
}
if(error())
{
$err = error_list();
$err = '<div class="error">'.$err[0].'</div>';;
}
$ajax['msg'] = $msg ? $msg : '';
$ajax['err'] = $err ? $err : '';
echo json_encode($ajax);
}
break;
case 'add_new_playlist';
{
$vid = mysql_clean($_POST['vid']);
$params = array('name'=>mysql_clean($_POST['plname']));
$pid = $cbvid->action->create_playlist($params);
if($pid)
{
$eh->flush();
$cbvid->action->add_playlist_item($pid,$vid);
}
if(msg())
{
$msg = msg_list();
$msg = '<div class="msg">'.$msg[0].'</div>';;
}
if(error())
{
$err = error_list();
$err = '<div class="error">'.$err[0].'</div>';;
}
$ajax['msg'] = $msg ? $msg : '';
$ajax['err'] = $err ? $err : '';
echo json_encode($ajax);
}
break;
default:
header('location:'.BASEURL);
}
}else
header('location:'.BASEURL);
?>

View file

@ -30,6 +30,7 @@ if($vdetails['userid'] != userid())
$_POST['videoid'] = $vid;
$cbvid->update_video();
$cbvid->set_default_thumb($vid,mysql_clean(post('default_thumb')));
$vdetails = $cbvid->get_video_details($vid);
}
}

View file

@ -6,6 +6,8 @@
| @ Software : ClipBucket , © PHPBucket.com |
****************************************************************************************************
*/
define("THIS_PAGE","groups");
define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$pages->page_redir();

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Some files were not shown because too many files have changed in this diff Show more