示例#1
0
                    }
                }
            }
            $child_ids[] = mysql_clean($category);
        }
    }
    $search->category = $child_ids;
}
$search->date_margin = mysql_clean($_GET['datemargin']);
$search->sort_by = mysql_clean($_GET['sort']);
$search->limit = create_query_limit($page, $search->results_per_page);
$results = $search->search();
//echo $db->db_query;
//Collecting Data for Pagination
$total_rows = $search->total_results;
$total_pages = count_pages($total_rows, $search->results_per_page);
//Pagination
$pages->paginate($total_pages, $page);
Assign('results', $results);
Assign('template_var', $search->template_var);
Assign('display_template', $search->display_template);
if (empty($search->key)) {
    Assign('search_type_title', $search->search_type[$type]['title']);
} else {
    Assign('search_type_title', sprintf(lang('searching_keyword_in_obj'), mysql_clean(get('query')), $search->search_type[$type]['title']));
}
if (mysql_clean(get('query'))) {
    subtitle($search->search_type[$type]['title'] . ' » ' . mysql_clean(get('query')));
}
//Displaying The Template
template_files('search.html');
示例#2
0
            $userquery->removeProfileItem();
        }
        //Getting Video List
        $vid_array = array('user' => $udetails['userid'], 'limit' => $get_limit);
        if (get('query') != '') {
            $vid_array['title'] = mysql_clean(get('query'));
            $vid_array['tags'] = mysql_clean(get('query'));
        }
        if (get('order') == 'oldest') {
            $vid_array['order'] = ' date_added ASC ';
        } else {
            $vid_array['order'] = ' date_added DESC ';
        }
        if (get('broadcast') && is_valid_broadcast(get('broadcast'))) {
            $vid_array['broadcast'] = mysql_clean(get('broadcast'));
        }
        $videos = get_videos($vid_array);
        Assign('uservids', $videos);
        Assign('videos', $videos);
        //Collecting Data for Pagination
        $vid_array['count_only'] = true;
        $total_rows = get_videos($vid_array);
        assign('total_videos', $total_rows);
        $total_pages = count_pages($total_rows, VLISTPP);
        //Pagination
        $pages->paginate($total_pages, $page);
        subtitle(lang("vdo_manage_vdeos"));
        break;
}
template_files('manage_videos.html');
display_it();
示例#3
0
        assign('mode', 'favorites');
        //Removing video from favorites
        if (!empty($_GET['vid_delete'])) {
            $video = mysql_clean($_GET['vid_delete']);
            $cbvideo->action->remove_favorite($video);
        }
        //Removing Multiple Videos
        if (isset($_POST['delete_fav_videos'])) {
            for ($id = 0; $id <= VLISTPP; $id++) {
                $cbvideo->delete_video($_POST['check_vid'][$id]);
            }
            $eh->flush();
            e(lang("vdo_multi_del_fav_msg"), m);
        }
        if (get('query') != '') {
            $cond = " (video.title LIKE '%" . mysql_clean(get('query')) . "%' OR video.tags LIKE '%" . mysql_clean(get('query')) . "%' )";
        }
        $params = array('userid' => userid(), 'limit' => $get_limit, 'cond' => $cond);
        $videos = $cbvid->action->get_favorites($params);
        Assign('uservids', $videos);
        //Collecting Data for Pagination
        $params['count_only'] = 'yes';
        $favorites_count = $cbvid->action->get_favorites($params);
        $total_pages = count_pages($favorites_count, VLISTPP);
        //Pagination
        $pages->paginate($total_pages, $page);
        subtitle(lang("com_manage_fav"));
        break;
}
template_files('manage_videos.html');
display_it();
示例#4
0
        case "getComments":
            $params = array();
            $limit = config('comments_per_page');
            $page = $_POST['page'];
            $params['type'] = mysql_clean($_POST['type']);
            $params['type_id'] = mysql_clean($_POST['type_id']);
            $params['last_update'] = mysql_clean($_POST['last_update']);
            $params['limit'] = create_query_limit($page, $limit);
            $admin = "";
            if ($_POST['admin'] == 'yes' && has_access('admin_access', true)) {
                $params['cache'] = 'no';
                $admin = "yes";
            }
            $comments = $myquery->getComments($params);
            //Adding Pagination
            $total_pages = count_pages($_POST['total_comments'], $limit);
            assign('object_type', mysql_clean($_POST['object_type']));
            //Pagination
            $pages->paginate($total_pages, $page, NULL, NULL, '<a href="javascript:void(0)"
			onClick="getComments(\'' . $params['type'] . '\',\'' . $params['type_id'] . '\',\'' . $params['last_update'] . '\',
			\'#page#\',\'' . $_POST['total_comments'] . '\',\'' . mysql_clean($_POST['object_type']) . '\',\'' . $admin . '\')">#page#</a>');
            assign('comments', $comments);
            assign('type', $params['type']);
            assign('type_id', $params['type_id']);
            assign('last_update', $params['last_update']);
            assign('total', $_POST['total_comments']);
            assign('total_pages', $total_pages);
            assign('comments_voting', $_POST['comments_voting']);
            if ($_POST['admin'] == 'yes' && has_access('admin_access', true)) {
                Template(BASEDIR . '/' . ADMINDIR . '/' . TEMPLATEFOLDER . '/cbv3/layout/blocks/comments.html', false);
                exit;
示例#5
0
        $eh->flush();
        $cbphoto->action->delete_flags($_POST['check_photo'][$id]);
    }
}
switch ($mode) {
    case "view":
    default:
        assign("mode", "view");
        //Getting Video List
        $page = mysql_clean($_GET['page']);
        $get_limit = create_query_limit($page, 5);
        $photos = $cbphoto->action->get_flagged_objects($get_limit);
        assign('photos', $photos);
        //Collecting Data for Pagination
        $total_rows = $cbphoto->action->count_flagged_objects();
        $total_pages = count_pages($total_rows, 5);
        //Pagination
        $pages->paginate($total_pages, $page);
        break;
    case "view_flags":
        assign("mode", "view_flags");
        $pid = mysql_clean($_GET['pid']);
        $pdetails = $cbphoto->get_photo($pid);
        if ($pdetails) {
            $flags = $cbphoto->action->get_flags($pid);
            assign('flags', $flags);
            assign('photo', $pdetails);
        } else {
            e("Photo does not exist");
        }
}
示例#6
0
    $total = count($_POST['check_photo']);
    for ($i = 0; $i < $total; $i++) {
        $id_array[] = $_POST['check_photo'][$i];
    }
    //$eh->flush();
}
if (isset($_GET['search'])) {
    $array = array('title' => $_GET['title'], 'pid' => $_GET['photoid'], 'key' => $_GET['photokey'], 'tags' => $_GET['tags'], 'featured' => $_GET['featured'], 'active' => $_GET['active'], 'user' => $_GET['userid'], 'extension' => $_GET['extension'], 'order' => $_GET['order']);
}
$parr = $array;
// Creating Limit
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, RESULTS);
$parr['limit'] = $get_limit;
if (!$parr['order']) {
    $parr['order'] = " date_added DESC ";
} else {
    $parr['order'] = $parr['order'] . " DESC";
}
$collections = $cbcollection->get_collections(array("type" => "photos"));
$photos = $cbphoto->get_photos($parr);
Assign('photos', $photos);
assign('c', $collections);
$pcount = $parr;
$pcount['count_only'] = true;
$total_rows = $cbphoto->get_photos($pcount);
$total_pages = count_pages($total_rows, RESULTS);
$pages->paginate($total_pages, $page);
subtitle("Photo Manager");
template_files('photo_manager.html');
display_it();
示例#7
0
     }
     exit;
     break;
 case "get_favorite_videos":
 case "getFavoriteVideos":
     $limit = 20;
     $get_limit = create_query_limit($page, $limit);
     $uid = $request['userid'];
     if (!$uid) {
         $uid = userid();
     }
     $params = array('userid' => $uid, 'limit' => $get_limit);
     $videos = $cbvid->action->get_favorites($params);
     $params['count_only'] = "yes";
     $total_rows = $cbvid->action->get_favorites($params);
     $total_pages = count_pages($total_rows, $get_limit);
     if ($total_rows > 0) {
         $new_videos = array();
         foreach ($videos as $video) {
             if (!$video['email']) {
                 $udetails = $userquery->get_user_details($video['userid']);
             }
             $video = array_merge($video, $udetails);
             $video['thumbs'] = array('default' => get_thumb($video));
             $video['videos'] = array('mobile' => get_mob_video(array('video' => $video)));
             $video['url'] = $video['video_link'] = $video['videoLink'] = videoLink($video);
             $video['avatar'] = $video['user_photo'] = $video['displayPic'] = $userquery->avatar($video);
             foreach ($blacklist_fields as $field) {
                 unset($video[$field]);
             }
             $new_videos[] = $video;
示例#8
0
            subtitle(sprintf(lang("title_usr_fav_vids"), $udetails['username']));
            $total_pages = count_pages($total_rows, config('videos_items_ufav_page'));
            //pr($total_pages,true);
            break;
        case 'playlists':
            $get_limit = create_query_limit($page, 10);
            $params = array('userid' => $udetails['userid'], 'limit' => $get_limit);
            $playlists = get_playlists($params);
            /*$items = $cbvid->get_playlist_items( $pid, 'playlist_items.date_added DESC' );
            		pr($items,true);
                       assign('items',$items);*/
            assign('playlist_mode', 'on');
            assign('playlists', $playlists);
            $params['count_only'] = true;
            $total_rows = get_playlists($params);
            $total_pages = count_pages($total_rows, config('videos_items_ufav_page'));
            //pr($videos,true);
            break;
    }
    Assign('videos', $videos);
    //Pagination
    $pages->paginate($total_pages, $page);
} else {
    e(lang("usr_exist_err"));
    $Cbucket->show_page = false;
}
if ($Cbucket->show_page) {
    Template('user_videos.html');
} else {
    display_it();
}
示例#9
0
 switch ($mode) {
     case 'view_topics':
         if ($_GET['topic_action'] == "delete") {
             if (!empty($_GET['topic_id'])) {
                 $tid = $_GET['topic_id'];
                 $cbgroup->delete_topic($tid);
             }
         }
         break;
 }
 $topics_limit = 10;
 $page = mysql_clean($_GET['page']);
 $get_limit = create_query_limit($page, $topics_limit);
 //Getting list of topics
 $topics = $cbgroup->get_topics(array('group' => $details['group_id'], 'limit' => $get_limit));
 $total_pages = count_pages($details['total_topics'], $topics_limit);
 $pages->paginate($total_pages, $page);
 //Group feeds
 $feeds = $cbgroup->get_group_feeds($details['group_id']);
 assign('feeds', $feeds);
 //Group links
 $group_links = $cbgroup->group_links($details);
 assign('group_links', $group_links);
 assign('total_topic_pages', $total_pages);
 assign('topics', $topics);
 assign('mode', $mode);
 assign('group', $details);
 //$cbgroup->add_group_status($details['group_id'],'Yar ye kamal chiz lag rae a?');
 /*$cbgroup->add_group_video_feed(array(
       'videoid' => '1238',
       'group_id' => $details['group_id'],
示例#10
0
function cb_get_user_favorite_collections()
{
    global $usercontent, $pages, $cbcollection, $db;
    $user = $usercontent->get_current_user();
    $page = mysql_clean(get('page'));
    $limit = create_query_limit($page, config('collection_user_favorites'));
    $favC = array("userid" => $user['userid'], "limit", $limit);
    $collections = $cbcollection->action->get_favorites($favC);
    $favC['count_only'] = true;
    $total_rows = $cbcollection->action->get_favorites($favC);
    $total_pages = count_pages($total_rows, config('collection_user_favorites'));
    $pages->paginate($total_pages, $page);
    $params['file'] = 'user_collections.html';
    $params['the_title'] = $params['heading'] = name($user) . " " . lang('favorite') . " " . lang('collections');
    $params['collections'] = $collections;
    $params['mode'] = 'favorite';
    $params['total_collections'] = $total_rows;
    return fetch_template_file($params);
}
示例#11
0
        case "uploaded":
        default:
            $limit = create_query_limit($page, config('photo_user_photos'));
            assign("the_title", $user['username'] . " " . lang('photos'));
            $photos = get_photos(array("limit" => $limit, "user" => $user['userid']));
            $total_rows = get_photos(array("count_only" => true, "user" => $user['userid']));
            $total_pages = count_pages($total_rows, config('photo_user_photos'));
            break;
        case "favorites":
        case "fav_photos":
        case "favorite":
            $limit = create_query_limit($page, config('photo_user_favorites'));
            assign("the_title", $user['username'] . " " . lang('Favorite') . " " . lang('photos'));
            $favP = array("user" => $user['userid'], "limit", $limit);
            $photos = $cbphoto->action->get_favorites($favP);
            $favP['count_only'] = true;
            $total_rows = $cbphoto->action->get_favorites($favP);
            $total_pages = count_pages($total_rows, config('photo_user_favorites'));
            break;
    }
    assign('photos', $photos);
    $pages->paginate($total_pages, $page);
} else {
    e(lang("usr_exist_err"));
    $Cbucket->show_page = false;
}
if ($Cbucket->show_page) {
    Template('user_photos.html');
} else {
    display_it();
}
示例#12
0
         case "videos":
         case "video":
         case "v":
             $items = $cbvideo->collection->get_collection_items_with_details($c, $order, $get_limit);
             $count = $cbvideo->collection->get_collection_items_with_details($c, NULL, NULL, TRUE);
             break;
         case "photos":
         case "photo":
         case "p":
             $items = $cbphoto->collection->get_collection_items_with_details($c, $order, $get_limit);
             $count = $cbphoto->collection->get_collection_items_with_details($c, NULL, NULL, TRUE);
             break;
     }
     // Calling nesscary function for view collection
     call_view_collection_functions($cdetails);
     $total_pages = count_pages($count, COLLIP);
     //Pagination
     //$pages->paginate($total_pages,$page);
     $link == NULL;
     $extra_params = NULL;
     $tag = '<li><a #params#>#page#</a><li>';
     $pages->paginate($total_pages, $page, $link, $extra_params, $tag);
     assign('objects', $items);
     assign("c", $cdetails);
     assign("type", $type);
     assign("cid", $c);
     subtitle($cdetails['collection_name']);
 } else {
     e(lang("collection_not_exists"));
     $Cbucket->show_page = false;
 }
示例#13
0
} elseif (!$cbgroup->is_member(userid(), $details['group_id'])) {
    e(lang("you_not_allowed_add_grp_vids"));
} else {
    $add_group_videos = 24;
    $add_group_videos = apply_filters($add_group_videos, 'add_group_videos_limit');
    ///Getting User Videos
    $page = mysql_clean($_GET['page']);
    $get_limit = create_query_limit($page, $add_group_videos);
    $array = array('user' => userid(), 'limit' => $get_limit);
    $usr_vids = get_videos($array);
    //echo $db->db_query;
    assign('usr_vids', $usr_vids);
    assign('videos', $usr_vids);
    $array['count_only'] = true;
    $total_rows = get_videos($array);
    $total_pages = count_pages($total_rows, $add_group_videos);
    //Pagination
    $pages->paginate($total_pages, $page);
    //Adding videos to group
    if (isset($_POST['add_videos'])) {
        $total = count($usr_vids);
        for ($i = 0; $i < $total; $i++) {
            $videoid = $usr_vids[$i]['videoid'];
            if ($_POST['check_video_' . $videoid] == 'yes') {
                $cbgroup->add_group_video($videoid, $details['group_id'], false);
            } else {
                $cbgroup->remove_group_video($videoid, $details['group_id'], false);
            }
        }
        //Update Group Total Videos
        $cbgroup->update_group_videos_count($details['group_id']);
示例#14
0
 ****************************************************************
*/
define("THIS_PAGE", "view_group_videos");
define("PARENT_PAGE", "videos");
require 'includes/config.inc.php';
$pages->page_redir();
$url = mysql_clean($_GET['url']);
$details = $cbgroup->group_details_url($url);
//Group links
$group_links = $cbgroup->group_links($details);
assign('group_links', $group_links);
assign('group', $details);
if ($details) {
    $group_videos_limit = 18;
    $group_videos_limit = apply_filters($group_videos_limit, 'group_videos_limit');
    ///Getting User Videos
    $page = mysql_clean($_GET['page']);
    $get_limit = create_query_limit($page, $group_videos_limit);
    //Getting List of all videos
    $videos = $cbgroup->get_group_videos($details['group_id'], "yes", $get_limit);
    $total_rows = $details['total_videos'];
    $total_pages = count_pages($total_rows, $group_videos_limit);
    //Pagination
    $pages->paginate($total_pages, $page);
    assign('total_pages', $total_pages);
    assign("videos", $videos);
    assign("mode", "view_videos");
    subtitle($details['group_name']);
}
template_files('view_group.html');
display_it();
示例#15
0
<?php

/* 
 ***********************************************************************
 | Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.		
 | @ Author 	: ArslanHassan												
 | @ Software 	: ClipBucket , © PHPBucket.com							
 *************************************************************************
*/
require '../includes/admin_config.php';
$userquery->admin_login_check();
$pages->page_redir();
if ($_GET['kick']) {
    if ($sess->kick(mysql_clean($_GET['kick']))) {
        e("User has been kicked out", "m");
    }
}
$results = 30;
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, $results);
$online_users = $userquery->get_online_users(false, false, $get_limit);
$total_rows = $userquery->get_online_users(false, true);
$total_pages = count_pages($total_rows, $results);
$pages->paginate($total_pages, $page);
assign('total', count($online_users));
assign('online_users', $online_users);
assign('queryString', queryString(NULL, 'kick'));
subtitle("View online users");
template_files('online_users.html');
display_it();
示例#16
0
        case "uploaded":
        default:
            $limit = create_query_limit($page, config('collection_user_collections'));
            assign("the_title", $user['username'] . " " . lang('collections'));
            $collections = get_collections(array("limit" => $limit, "user" => $user['userid']));
            $total_rows = get_collections(array("count_only" => true, "user" => $user['userid']));
            $total_pages = count_pages($total_rows, config('collection_user_collections'));
            break;
        case "favorites":
        case "fav_collections":
        case "favorite":
            $limit = create_query_limit($page, config('collection_user_favorites'));
            assign("the_title", $user['username'] . " " . lang('favorite') . " " . lang('collections'));
            $favC = array("user" => $user['userid'], "limit", $limit);
            $collections = $cbcollection->action->get_favorites($favC);
            $favC['count_only'] = true;
            $total_rows = $cbcollection->action->get_favorites($favC);
            $total_pages = count_pages($total_rows, config('collection_user_favorites'));
            break;
    }
    assign('collections', $collections);
    $pages->paginate($total_pages, $page);
} else {
    e(lang("usr_exist_err"));
    $Cbucket->show_page = false;
}
if ($Cbucket->show_page) {
    Template('user_collections.html');
} else {
    display_it();
}
示例#17
0
        break;
    case "most_commented":
        $cond['order'] = $table_name . ".total_comments DESC";
        break;
    case "top_rated":
        $cond['order'] = $table_name . ".rating DESC, " . $table_name . ".rated_by DESC";
        break;
}
//Getting Photo List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, MAINPLIST);
$clist = $cond;
$clist['limit'] = $get_limit;
$photos = get_photos($clist);
Assign('photos', $photos);
$collections = $cbcollection->get_collections($clist);
Assign('collections', $collections);
//Collecting Data for Pagination
$ccount = $cond;
$ccount['count_only'] = true;
$total_rows = get_photos($ccount);
$total_pages = count_pages($total_rows, MAINPLIST);
//Pagination
$link == NULL;
$extra_params = NULL;
$tag = '<li><a #params#>#page#</a><li>';
$pages->paginate($total_pages, $page, $link, $extra_params, $tag);
subtitle(lang('photos'));
//Displaying The Template
template_files('photos.html');
display_it();
示例#18
0
    $total = count($_POST['check_queue']);
    for ($i = 0; $i <= $total; $i++) {
        $myquery->queue_action("delete", $_POST['check_queue'][$i]);
    }
    e("Selected items have been deleted", "m");
}
if (isset($_POST['processed'])) {
    $total = count($_POST['check_queue']);
    for ($i = 0; $i <= $total; $i++) {
        $myquery->queue_action("processed", $_POST['check_queue'][$i]);
    }
    e("Selected items have been set changed to processed", "m");
}
if (isset($_POST['pending'])) {
    $total = count($_POST['check_queue']);
    for ($i = 0; $i <= $total; $i++) {
        $myquery->queue_action("pending", $_POST['check_queue'][$i]);
    }
    e("Selected items have been set changed to processed", "m");
}
//Getting List of Conversion Queue
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, RESULTS);
$queue_list = $myquery->get_conversion_queue(NULL, $get_limit);
assign('queues', $queue_list);
$total_rows = get_videos($vcount);
$total_pages = count_pages($db->count(tbl('conversion_queue'), "cqueue_id"), RESULTS);
$pages->paginate($total_pages, $page);
subtitle("Conversion Queue Manager");
template_files("cb_conversion_queue.html");
display_it();
示例#19
0
/* 
 ****************************************************************
 | Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
 | @ Author : ArslanHassan										
 | @ Software : ClipBucket , © PHPBucket.com					
 ****************************************************************
*/
define("THIS_PAGE", "view_group_videos");
define("PARENT_PAGE", "videos");
require 'includes/config.inc.php';
$pages->page_redir();
$url = mysql_clean($_GET['url']);
$details = $cbgroup->group_details_url($url);
assign('group', $details);
if ($details) {
    ///Getting User Videos
    $page = mysql_clean($_GET['page']);
    $get_limit = create_query_limit($page, 28);
    //Getting List of all videos
    $videos = $cbgroup->get_group_videos($details['group_id'], "yes", $get_limit);
    $total_rows = $details['total_videos'];
    $total_pages = count_pages($total_rows, 28);
    //Pagination
    $pages->paginate($total_pages, $page);
    assign("videos", $videos);
    assign("mode", "view_videos");
    subtitle($details['group_name']);
}
template_files('view_group.html');
display_it();
示例#20
0
        break;
    case "most_items":
        $cond['order'] = " total_objects DESC";
        break;
}
switch ($content) {
    case "videos":
        $cond['type'] = "videos";
        break;
    case "photos":
        $cond['type'] = "photos";
}
//$cond['has_items'] = true;
//Getting Collection List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, COLLPP);
$clist = $cond;
$clist['limit'] = $get_limit;
$collections = $cbcollection->get_collections($clist);
Assign('collections', $collections);
//Collecting Data for Pagination
$ccount = $cond;
$ccount['count_only'] = true;
$total_rows = $cbcollection->get_collections($ccount);
$total_pages = count_pages($total_rows, COLLPP);
//Pagination
$pages->paginate($total_pages, $page);
subtitle(lang('collections'));
//Displaying The Template
template_files('collections.html');
display_it();
示例#21
0
文件: get.php 项目: Coding110/cbvideo
 private function getFavoriteVideos()
 {
     $request = $_REQUEST;
     $limit = 20;
     $page = $request['page'];
     if (!$page || !is_numeric($page) || $page < 1) {
         $page = 1;
     }
     $get_limit = create_query_limit($page, $limit);
     $uid = $request['userid'];
     if (!$uid) {
         $uid = userid();
     }
     if (!$uid) {
         // exit(json_encode(array('err' => lang('Please login'))));
         $data = array('code' => "418", 'status' => "failure", "msg" => "Please Login", "data" => "");
         $this->response($this->json($data));
     }
     $blacklist_fields = array('password', 'video_password', 'avcode', 'session');
     global $cbvid;
     $params = array('userid' => $uid, 'limit' => $get_limit);
     $videos = $cbvid->action->get_favorites($params);
     $params['count_only'] = "yes";
     $total_rows = $cbvid->action->get_favorites($params);
     $total_pages = count_pages($total_rows, $get_limit);
     global $userquery;
     if ($total_rows > 0) {
         $new_videos = array();
         foreach ($videos as $video) {
             if (!$video['email']) {
                 $udetails = $userquery->get_user_details($video['userid']);
             }
             $video = array_merge($video, $udetails);
             $video['thumbs'] = array('default' => get_thumb($video));
             $video['videos'] = array('mobile' => get_mob_video(array('video' => $video)));
             $video['url'] = $video['video_link'] = $video['videoLink'] = videoLink($video);
             $video['avatar'] = $video['user_photo'] = $video['displayPic'] = $userquery->avatar($video);
             foreach ($blacklist_fields as $field) {
                 unset($video[$field]);
             }
             $new_videos[] = $video;
         }
         //echo json_encode($new_videos);
         $data = array('code' => "200", 'status' => "success", "msg" => "Success", "data" => $new_videos);
         $this->response($this->json($data));
     } else {
         //echo json_encode(array('err' => lang('No favorite videos were found')));
         $data = array('code' => "204", 'status' => "success", "msg" => "No Record Found", "data" => "");
         $this->response($this->json($data));
     }
 }
示例#22
0
    if ($sort != $vsort) {
        assign('sort', $vsort);
    } else {
        $sort = false;
    }
    if ($vsort == 'most_recent') {
        $sort = false;
    }
}
$counter = get_counter('channel', $count_query);
if (!$counter) {
    //Collecting Data for Pagination
    $ucount = $u_cond;
    $ucount['count_only'] = true;
    $total_rows = get_users($ucount);
    $counter = $total_rows;
    update_counter('channel', $count_query, $counter);
}
$total_pages = count_pages($counter, CLISTPP);
//Pagination
$pages->paginate($total_pages, $page);
$subtitle = lang('Channels');
if ($category) {
    $subtitle .= " &#8250; " . $category;
}
if ($sort) {
    $subtitle .= " &#8226; " . $sort;
}
subtitle($subtitle);
template_files('channels.html');
display_it();
示例#23
0
         if ($gdetails) {
             $video_limit = 20;
             $video_limit = apply_filters($video_limit, 'manage_group_videos_limit');
             $page = mysql_clean($_GET['page']);
             $get_limit = create_query_limit($page, $video_limit);
             assign("group", $gdetails);
             //Getting Group Videos (Active Only)
             $grp_vids = $cbgroup->get_group_videos($gid, NULL, $get_limit);
             assign('grp_vids', $grp_vids);
             assign('videos', $grp_vids);
             //Getting pending videos
             $pending_videos = $cbgroup->get_group_videos($gid, 'no', $get_limit);
             assign('pending_videos', $pending_videos);
             $group_videos = array('all_videos' => $grp_vids, 'pending_videos' => $pending_videos);
             assign('group_videos', $group_videos);
             $total_pages = count_pages($gdetails['total_videos'], $video_limit);
             //Pagination
             $pages->paginate($total_pages, $page);
         } else {
             e(lang("grp_exist_err"));
         }
     }
     break;
 case 'joined':
     //Leaving Groups
     if (isset($_POST['leave_groups'])) {
         $total = count($_POST['check_gid']);
         for ($i = 0; $i < $total; $i++) {
             $cbgroup->leave_group($_POST['check_gid'][$i], userid());
         }
     }