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
|
@ -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}
|
||||
#
|
||||
#
|
||||
|
|
10
upload/actions/get_videos.php
Normal 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>
|
|
@ -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');
|
||||
|
|
|
@ -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
|
@ -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);
|
||||
|
||||
|
||||
?>
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
| @ Software : ClipBucket , © PHPBucket.com |
|
||||
****************************************************************************************************
|
||||
*/
|
||||
define("THIS_PAGE","groups");
|
||||
define("PARENT_PAGE","groups");
|
||||
require 'includes/config.inc.php';
|
||||
$pages->page_redir();
|
||||
|
||||
|
|
BIN
upload/images/icons/country/ac.png
Normal file
After Width: | Height: | Size: 599 B |
BIN
upload/images/icons/country/ad.png
Normal file
After Width: | Height: | Size: 643 B |
BIN
upload/images/icons/country/ae.png
Normal file
After Width: | Height: | Size: 408 B |
BIN
upload/images/icons/country/af.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
upload/images/icons/country/ag.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
upload/images/icons/country/ai.png
Normal file
After Width: | Height: | Size: 643 B |
BIN
upload/images/icons/country/al.png
Normal file
After Width: | Height: | Size: 600 B |
BIN
upload/images/icons/country/am.png
Normal file
After Width: | Height: | Size: 497 B |
BIN
upload/images/icons/country/an.png
Normal file
After Width: | Height: | Size: 488 B |
BIN
upload/images/icons/country/ao.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
upload/images/icons/country/aq.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
upload/images/icons/country/ar.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
upload/images/icons/country/as.png
Normal file
After Width: | Height: | Size: 647 B |
BIN
upload/images/icons/country/at.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
upload/images/icons/country/au.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
upload/images/icons/country/aw.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
upload/images/icons/country/ax.png
Normal file
After Width: | Height: | Size: 663 B |
BIN
upload/images/icons/country/az.png
Normal file
After Width: | Height: | Size: 589 B |
BIN
upload/images/icons/country/ba.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
upload/images/icons/country/bb.png
Normal file
After Width: | Height: | Size: 585 B |
BIN
upload/images/icons/country/bd.png
Normal file
After Width: | Height: | Size: 504 B |
BIN
upload/images/icons/country/be.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
upload/images/icons/country/bf.png
Normal file
After Width: | Height: | Size: 497 B |
BIN
upload/images/icons/country/bg.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
upload/images/icons/country/bh.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
upload/images/icons/country/bi.png
Normal file
After Width: | Height: | Size: 675 B |
BIN
upload/images/icons/country/bj.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
upload/images/icons/country/bm.png
Normal file
After Width: | Height: | Size: 611 B |
BIN
upload/images/icons/country/bn.png
Normal file
After Width: | Height: | Size: 639 B |
BIN
upload/images/icons/country/bo.png
Normal file
After Width: | Height: | Size: 500 B |
BIN
upload/images/icons/country/br.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
upload/images/icons/country/bs.png
Normal file
After Width: | Height: | Size: 526 B |
BIN
upload/images/icons/country/bt.png
Normal file
After Width: | Height: | Size: 631 B |
BIN
upload/images/icons/country/bv.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
upload/images/icons/country/bw.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
upload/images/icons/country/by.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
upload/images/icons/country/bz.png
Normal file
After Width: | Height: | Size: 600 B |
BIN
upload/images/icons/country/ca.png
Normal file
After Width: | Height: | Size: 628 B |
BIN
upload/images/icons/country/cc.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
upload/images/icons/country/cd.png
Normal file
After Width: | Height: | Size: 528 B |
BIN
upload/images/icons/country/cf.png
Normal file
After Width: | Height: | Size: 614 B |
BIN
upload/images/icons/country/cg.png
Normal file
After Width: | Height: | Size: 521 B |
BIN
upload/images/icons/country/ch.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
upload/images/icons/country/ci.png
Normal file
After Width: | Height: | Size: 453 B |
BIN
upload/images/icons/country/ck.png
Normal file
After Width: | Height: | Size: 586 B |
BIN
upload/images/icons/country/cl.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
upload/images/icons/country/cm.png
Normal file
After Width: | Height: | Size: 525 B |
BIN
upload/images/icons/country/cn.png
Normal file
After Width: | Height: | Size: 472 B |
BIN
upload/images/icons/country/co.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
upload/images/icons/country/cr.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
upload/images/icons/country/cu.png
Normal file
After Width: | Height: | Size: 563 B |
BIN
upload/images/icons/country/cv.png
Normal file
After Width: | Height: | Size: 529 B |
BIN
upload/images/icons/country/cx.png
Normal file
After Width: | Height: | Size: 608 B |
BIN
upload/images/icons/country/cy.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
upload/images/icons/country/cz.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
upload/images/icons/country/de.png
Normal file
After Width: | Height: | Size: 545 B |
BIN
upload/images/icons/country/dj.png
Normal file
After Width: | Height: | Size: 572 B |
BIN
upload/images/icons/country/dk.png
Normal file
After Width: | Height: | Size: 495 B |
BIN
upload/images/icons/country/dm.png
Normal file
After Width: | Height: | Size: 620 B |
BIN
upload/images/icons/country/do.png
Normal file
After Width: | Height: | Size: 508 B |
BIN
upload/images/icons/country/dz.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
upload/images/icons/country/ec.png
Normal file
After Width: | Height: | Size: 500 B |
BIN
upload/images/icons/country/ee.png
Normal file
After Width: | Height: | Size: 429 B |
BIN
upload/images/icons/country/eg.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
upload/images/icons/country/eh.png
Normal file
After Width: | Height: | Size: 508 B |
BIN
upload/images/icons/country/er.png
Normal file
After Width: | Height: | Size: 653 B |
BIN
upload/images/icons/country/es.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
upload/images/icons/country/et.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
upload/images/icons/country/fi.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
upload/images/icons/country/fj.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
upload/images/icons/country/fk.png
Normal file
After Width: | Height: | Size: 648 B |
BIN
upload/images/icons/country/fm.png
Normal file
After Width: | Height: | Size: 552 B |
BIN
upload/images/icons/country/fo.png
Normal file
After Width: | Height: | Size: 474 B |
BIN
upload/images/icons/country/fr.png
Normal file
After Width: | Height: | Size: 545 B |
BIN
upload/images/icons/country/ga.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
upload/images/icons/country/gd.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
upload/images/icons/country/ge.png
Normal file
After Width: | Height: | Size: 594 B |
BIN
upload/images/icons/country/gf.png
Normal file
After Width: | Height: | Size: 545 B |
BIN
upload/images/icons/country/gg.png
Normal file
After Width: | Height: | Size: 392 B |
BIN
upload/images/icons/country/gh.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
upload/images/icons/country/gi.png
Normal file
After Width: | Height: | Size: 463 B |
BIN
upload/images/icons/country/gl.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
upload/images/icons/country/gm.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
upload/images/icons/country/gn.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
upload/images/icons/country/gp.png
Normal file
After Width: | Height: | Size: 488 B |
BIN
upload/images/icons/country/gq.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
upload/images/icons/country/gr.png
Normal file
After Width: | Height: | Size: 487 B |
BIN
upload/images/icons/country/gs.png
Normal file
After Width: | Height: | Size: 630 B |
BIN
upload/images/icons/country/gt.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
upload/images/icons/country/gu.png
Normal file
After Width: | Height: | Size: 509 B |
BIN
upload/images/icons/country/gw.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
upload/images/icons/country/gy.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
upload/images/icons/country/hk.png
Normal file
After Width: | Height: | Size: 527 B |