Beispiel #1
0
 function index()
 {
     $this->load->helper('form');
     $this->load->helper('template_files');
     $template_files = template_files();
     $data = array('template_files' => $template_files, 'paywall_auto' => setting('paywall_auto'), 'paywall_template' => setting('paywall_template'));
     $this->load->view('paywall_configuration', $data);
 }
Beispiel #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();
Beispiel #3
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();
Beispiel #4
0
*	@author Saqib Razzaq
*	@since 9th July, 2015 (ClipBucket 2.7.4)
*/
define('CB_CAPTCHA', basename(dirname(__FILE__)));
// checks user's input
function validate_user_ans()
{
    if (isset($_POST['signup'])) {
        $result = $_POST['g-recaptcha-response'];
        if ($result == '') {
            header("Location: http://localhost/cb_svn/upload/signup.php?valid=fail");
        }
    }
}
if (isset($_POST['signup'])) {
    validate_user_ans();
}
// displaying the form
function the_form()
{
    global $db;
    $key_check = $db->_select('SELECT the_key FROM ' . tbl("the_captcha"));
    $the_key = $key_check[0]['the_key'];
    $site_key = $the_key;
    echo '<div class="g-recaptcha" data-sitekey=' . $site_key . '></div>';
}
register_anchor_function("the_form", "the_form");
add_admin_menu("CB Captcha", "reCaptcha Key", "cb_captcha_admin.php", CB_CAPTCHA);
// used for displaying message on failure of captcha
template_files(PLUG_DIR . "/cb_captcha/captcha.html");
Beispiel #5
0
<?php

/* 
 ***************************************************************
 | Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved.
 | @ Author : ArslanHassan										
 | @ Software : ClipBucket , © PHPBucket.com					
 ****************************************************************
*/
require '../includes/admin_config.php';
$userquery->admin_login_check();
$pages->page_redir();
/* Assigning page and subpage */
if (!defined('MAIN_PAGE')) {
    define('MAIN_PAGE', 'Tool Box');
}
if (!defined('SUB_PAGE')) {
    define('SUB_PAGE', 'Server Modules Info');
}
$ffmpegVersion = check_ffmpeg("ffmpeg");
assign("ffmpegVersion", $ffmpegVersion);
$phpVersion = check_php_cli("php");
assign("phpVersion", $phpVersion);
$MP4BoxVersion = check_mp4box("MP4Box");
assign("MP4BoxVersion", $MP4BoxVersion);
$imagick_version = Imagick::getVersion();
$imagick_version_string = $imagick_version['versionString'];
assign("imagick_version", $imagick_version_string);
subtitle("ClipBucket Server Module Checker");
template_files("cb_mod_check.html");
display_it();
Beispiel #6
0
    $collections = get_collections(array("active" => "yes", "limit" => $start_index . "," . $loop_size));
    $total_collections = get_collections(array("count_only" => true, "active" => "yes"));
    $percent = $cbindex->percent(50, $total_collections);
    $i = 0;
    assign('total', $total_collections);
    assign('from', $start_index + 1);
    $to = $start_index + $loop_size;
    if ($to > $total_collections) {
        $to = $total_collections;
        e($total_collections . " collections have been reindexed successfully.", "m");
        assign("stop_loop", "yes");
    }
    assign('to', $to);
    while ($i < $total_collections) {
        if ($collections[$i]['collection_id']) {
            $params = array("collection_id" => $collections[$i]['collection_id'], "total_items" => true, "total_comments" => true);
            $indexes = $cbindex->count_index("collections", $params);
            $fields = $cbindex->extract_fields("collections", $params);
            $msg[] = $collections[$i]['collection_id'] . ": Updating <strong><em>" . $collections[$i]['collection_name'] . "</em></strong>";
            $cbindex->update_index("collections", array("fields" => $fields, "values" => $indexes, "photo_id" => $collections[$i]['collection_id']));
        }
        $i++;
    }
    e($start_index + 1 . " - " . $to . "  collections have been reindexed successfully.", "m");
    assign("index_msgs", $msg);
    assign("indexing", "yes");
    assign('mode', 'index_collections');
}
subtitle("Re-index Clipbucket");
template_files('reindex_cb.html');
display_it();
Beispiel #7
0
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, RESULTS);
if (isset($_GET['search'])) {
    $array = array('group_id' => $_GET['group_id'], 'user' => $_GET['userid'], 'title' => $_GET['title'], 'tags' => $_GET['tags'], 'category' => $_GET['category'], 'featured' => $_GET['featured'], 'active' => $_GET['active']);
}
$result_array = $array;
//Getting Video List
$result_array['limit'] = $get_limit;
if (!$array['order']) {
    $result_array['order'] = " date_added DESC ";
}
$groups = $cbgroup->get_groups($result_array);
Assign('groups', $groups);
//Collecting Data for Pagination
$gcount = $array;
$gcount['count_only'] = true;
$total_rows = $cbgroup->get_groups($gcount);
$total_pages = count_pages($total_rows, RESULTS);
$pages->paginate($total_pages, $page);
//Category Array
if (is_array($_GET['category'])) {
    $cats_array = array($_GET['category']);
} else {
    preg_match_all('/#([0-9]+)#/', $_GET['category'], $m);
    $cats_array = array($m[1]);
}
$cat_array = array(lang('vdo_cat'), 'type' => 'checkbox', 'name' => 'category[]', 'id' => 'category', 'value' => array('category', $cats_array), 'hint_1' => lang('vdo_cat_msg'), 'display_function' => 'convert_to_categories', 'category_type' => 'groups');
assign('cat_array', $cat_array);
subtitle("Group Manager");
template_files('groups_manager.html');
display_it();
Beispiel #8
0
}
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");
        }
}
subtitle("Flagged Photos");
template_files('flagged_photos.html');
display_it();
Beispiel #9
0
        if (isset($_POST['update_level_perms'])) {
            $perm_array = $_POST;
            $userquery->update_user_level($lid, $perm_array);
        }
        //Getting Details of $level
        $levelDetails = $userquery->get_level_details($lid);
        Assign('level_details', $levelDetails);
        //GettinG Level Permission
        $level_perms = $userquery->get_level_permissions($lid);
        //pr($level_perms, true);
        $plugin_perms = $level_perms['plugins_perms'];
        $plugin_perms = json_decode($plugin_perms, true);
        assign('plugin_perms', $plugin_perms);
        Assign('level_perms', $level_perms);
        Assign('view', 'edit');
        break;
    case 'add':
        if (isset($_POST['add_new_level'])) {
            $array = $_POST;
            if ($userquery->add_user_level($array)) {
                redirect_to('user_levels.php?added=true');
            }
        }
        Assign('view', 'add');
}
//$lev = $userquery->get_level_types();
//$per = $userquery->get_permissions(2);
//pr($per, true);
subtitle("User levels");
template_files('user_levels.html');
display_it();
Beispiel #10
0
        }
    }
    # Generating more thumbs
    if (isset($_GET['gen_more'])) {
        $num = config('num_thumbs');
        $dim = '503x283';
        $big_dim = config('big_thumb_width') . 'x' . config('big_thumb_height');
        require_once BASEDIR . '/includes/classes/sLog.php';
        $log = new SLog();
        $configs = array();
        require_once BASEDIR . '/includes/classes/conversion/ffmpeg.class.php';
        $ffmpeg = new FFMpeg($configs, $log);
        $ffmpeg->regenerateThumbs($vid_file, $data['file_directory'], $data['duration'], $dim, $num, $rand = NULL, $is_big = false, $data['file_name']);
        e(lang('Video thumbs has been regenrated successfully'), 'm');
        /*
        		  require_once(BASEDIR.'/includes/classes/conversion/ffmpeg.class.php');
          $ffmpeg = new FFMpeg();
        		  //Generating Thumbs
        		  $ffmpeg->generate_Thumbs($vid_file,$data['duration'],$dim,$num,$rand=NULL,$is_big=false);
                  //Generating Big Thumb
        		  $ffmpeg->generate_thumbs($vid_file,$data['duration'],$big_dim,$num,true,true);
        */
    }
    Assign('data', $data);
    Assign('rand', rand(44, 444));
} else {
    $msg[] = lang('class_vdo_del_err');
}
subtitle("Video Thumbs Manager");
template_files('upload_thumbs.html');
display_it();
Beispiel #11
0
assign('videos', $videos);
$result_array['limit'] = $get_limit;
$result_array['user'] = $udetails["userid"];
$get_limit = create_query_limit($page, 5);
$videos = $cbvid->action->get_flagged_objects($get_limit);
Assign('flagedVideos', $videos);
$result_array['limit'] = $get_limit;
$result_array['user'] = $udetails["userid"];
$get_limit = create_query_limit($page, 5);
$photos = $cbphoto->action->get_flagged_objects($get_limit);
assign('flagedPhotos', $photos);
if (isset($_GET['delete_video'])) {
    $video = mysql_clean($_GET['delete_video']);
    $cbvideo->delete_video($video);
}
template_files('myaccount.html');
display_it();
/*
define("THIS_PAGE",'myaccount');
define("PARENT_PAGE",'home');
require 'includes/config.inc.php';
$userquery->logincheck();
$u = $_GET['user'];
$u = $u ? $u : $_GET['userid'];
$u = $u ? $u : $_GET['username'];
$u = $u ? $u : $_GET['uid'];
$u = $u ? $u : $_GET['u'];
$u = mysql_clean($u);
$udetails = $userquery->get_user_details($u);
if($udetails)
{
Beispiel #12
0
<?php

/* 
 ***************************************************************
 | Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
 | @ Author   : ArslanHassan									
 | @ Software : ClipBucket , © PHPBucket.com					
 ***************************************************************
*/
define("THIS_PAGE", "create_group");
define("PARENT_PAGE", "groups");
require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
// Creating Group if button is pressed
if (isset($_POST['create_group'])) {
    $cbgroup->create_group($_POST, userid(), true);
}
subtitle(lang('grp_crt_grp'));
template_files('create_group.html');
display_it();
    $current_page = is_numeric($current_page) && $current_page > 0 ? $current_page : 1;
    $curr_limit = ($current_page - 1) * $limit . ',' . $limit;
    if (isset($_GET['search_phrase'])) {
        $varname = mysql_clean($_GET['varname']);
        $text = mysql_clean($_GET['text']);
        if (!empty($varname)) {
            $varname_query = "varname LIKE '%{$varname}%'";
        }
        if (!empty($text)) {
            $text_query = "text LIKE '%{$text}%'";
        }
        if (!empty($text_query) || !empty($varname_query)) {
            if (!empty($text_query) && !empty($varname_query)) {
                $or = ' OR ';
            }
            $extra_param = " AND ( {$varname_query} {$or}  {$text_query} )";
        }
    }
    $lang_phrases = $lang_obj->get_phrases($edit_id, '*', $curr_limit, $extra_param);
    $total_phrases = $lang_obj->count_phrases($edit_id, $extra_param);
    assign('lang_phrases', $lang_phrases);
    //Collecting Data for Pagination
    //echo 'id='.$edit_id.',toalal='.$total_phrases;
    $total_pages = $total_phrases / $limit;
    $total_pages = round($total_pages + 0.49, 0);
    //Pagination
    $pages->paginate($total_pages - 2, $current_page);
}
subtitle("Language Settings");
template_files('language_settings.html');
display_it();
Beispiel #14
0
    }
}
//Set Mode
assign('mode', $_GET['mode']);
if (isset($_POST['update'])) {
    $configs = $Cbucket->configs;
    $rows = array('autoplay_video', 'buffer_time', 'logo_placement', 'use_playlist', 'youtube_enabled', 'enlarge_button', 'embed_player_height', 'embed_player_width', 'autoplay_embed', 'pseudostreaming', 'pak_license', 'pakplayer_contextmsg');
    //Checking for logo
    if (isset($_FILES['logo_file']['name'])) {
        $logo_file = $Upload->upload_website_logo($_FILES['logo_file']);
        if ($logo_file) {
            $myquery->Set_Website_Details('player_logo_file', $logo_file);
        }
    }
    if ($_POST['pak_license'] && !file_exists(BASEDIR . '/player/pak_player/pakplayer.unlimited.swf')) {
        $_POST['pak_license'] = "";
    }
    foreach ($rows as $field) {
        $value = mysql_clean($_POST[$field]);
        $myquery->Set_Website_Details($field, $value);
    }
    e("Player Settings Have Been Updated", 'm');
}
if ($_GET['set']) {
    $cbplayer->set_player($_GET);
}
$row = $myquery->Get_Website_Details();
Assign('row', $row);
subtitle("Manage Players");
template_files('manage_players.html');
display_it();
Beispiel #15
0
if (isset($_GET['search'])) {
    $array = array('userid' => $_GET['userid'], 'username' => $_GET['username'], 'category' => $_GET['category'], 'featured' => $_GET['search_featured'], 'ban' => $_GET['search_ban'], 'status' => $_GET['status'], 'email' => $_GET['email'], 'gender' => $_GET['gender'], 'level' => $_GET['level']);
}
$result_array = $array;
//Getting Video List
$result_array['limit'] = $get_limit;
if (!$array['order']) {
    $result_array['order'] = " doj DESC ";
}
$users = get_users($result_array);
Assign('users', $users);
//Collecting Data for Pagination
$mcount = $array;
$mcount['count_only'] = true;
$total_rows = get_users($mcount);
$total_pages = count_pages($total_rows, RESULTS);
$pages->paginate($total_pages, $page);
//Pagination
$pages->paginate($total_pages, $page);
//Category Array
if (is_array($_GET['category'])) {
    $cats_array = array($_GET['category']);
} else {
    preg_match_all('/#([0-9]+)#/', $_GET['category'], $m);
    $cats_array = array($m[1]);
}
$cat_array = array(lang('vdo_cat'), 'type' => 'checkbox', 'name' => 'category[]', 'sep' => '<div></div>', 'id' => 'category', 'class' => 'checkbox', 'value' => array('category', $cats_array), 'hint_1' => lang('vdo_cat_msg'), 'display_function' => 'convert_to_categories', 'category_type' => 'user');
assign('cat_array', $cat_array);
subtitle("Members Manager");
template_files('members.html');
display_it();
    $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();
    foreach ($videos as $video) {
        $log = get_file_details($video['file_name']);
        if ($log && $_POST['fix_duration']) {
            //$duration = $log['output_duration'];
            //if(!$duration)
            //	$duration = $log['duration'];
            $duration = parse_duration(LOGS_DIR . '/' . $video['file_name'] . '.log');
            if (!$duration) {
                e("Can't do anything about \"" . $video['title'] . "\"");
            } else {
                $db->update(tbl('video'), array('duration'), array($duration), "videoid='" . $video['videoid'] . "'");
                $fixed_array[$video['file_name']] = 'yes';
                e("Succesfully updated duration of \"" . $video['title'] . "\" to " . SetTime($duration), 'm');
            }
        }
        if (!$log && $_POST['mark_failed']) {
            $db->update(tbl("video"), array("status", "failed_reason"), array('Failed', "Unable to get video duration"), " file_name='" . $video['file_name'] . "'");
            e("\"" . $video['title'] . "\" status has been changed to Failed", "m");
        }
        if (!$log && $_POST['mark_delete']) {
            $db->update(tbl("video"), array("status", "failed_reason"), array('Failed', "Unable to get video duration"), " file_name='" . $video['file_name'] . "'");
            $cbvideo->delete_video($video['videoid']);
        }
    }
    $videos = get_videos($params);
}
subtitle("Repair videos duration");
assign('videos', $videos);
assign('fixed_array', $fixed_array);
template_files('repair_vid_duration.html');
display_it();
Beispiel #18
0
    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));
template_files('template_editor.html');
display_it();
Beispiel #19
0
 | Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
 | @ Author	   : ArslanHassan									
 | @ Software  : ClipBucket , © PHPBucket.com					
 *************************************************************
*/
define("THIS_PAGE", 'edit_group');
define("PARENT_PAGE", 'groups');
require 'includes/config.inc.php';
$userquery->logincheck();
$udetails = $userquery->get_user_details(userid());
assign('user', $udetails);
assign('p', $userquery->get_user_profile($udetails['userid']));
$gid = mysql_clean($_GET['group_id']);
//get group details
$gdetails = $cbgroup->get_group_details($gid);
$gArray = array('group' => $gdetails, 'groupid' => $gid, 'uid' => userid(), 'user' => $userquery->udetails, 'checkowner' => 'yes');
if (!$cbgroup->is_admin($gArray) && !has_access('admin_access', true)) {
    e(lang("you_cant_edit_group"));
    $Cbucket->show_page = false;
} else {
    //Updating Video Details
    if (isset($_POST['update_group'])) {
        $_POST['group_id'] = $gid;
        $cbgroup->update_group();
        $gdetails = $cbgroup->get_group_details($gid);
    }
    assign('group', $gdetails);
}
subtitle(lang("grp_edit_grp_title"));
template_files('edit_group.html');
display_it();
Beispiel #20
0
if (is_installed('cb_mass_embed')) {
    //$array['mass_embed_status'] = 'approved';
}
$result_array = $array;
//Getting Video List
$result_array['limit'] = $get_limit;
if (!$array['order']) {
    $result_array['order'] = " videoid DESC ";
}
$videos = get_videos($result_array);
Assign('videos', $videos);
//pr($videos,true);
//Collecting Data for Pagination
$vcount = $array;
$vcount['count_only'] = true;
$total_rows = get_videos($vcount);
$total_pages = count_pages($total_rows, RESULTS);
$pages->paginate($total_pages, $page);
//Category Array
if (is_array($_GET['category'])) {
    $cats_array = array($_GET['category']);
} else {
    preg_match_all('/#([0-9]+)#/', $_GET['category'], $m);
    $cats_array = array($m[1]);
}
$cat_array = array(lang('vdo_cat'), 'type' => 'checkbox', 'name' => 'category[]', 'id' => 'category', 'value' => array('category', $cats_array), 'hint_1' => lang('vdo_cat_msg'), 'display_function' => 'convert_to_categories');
assign('cat_array', $cat_array);
//echo $db->db_query;
subtitle("Video Manager");
template_files('video_manager.html');
display_it();
Beispiel #21
0
if (!defined('SUB_PAGE')) {
    define('SUB_PAGE', "Editor's Pick");
}
//Removing
if (isset($_GET['remove'])) {
    $id = mysql_clean($_GET['remove']);
    remove_vid_editors_pick($id);
}
if (isset($_POST['delete_selected'])) {
    for ($id = 0; $id <= count($_POST['check_video']); $id++) {
        remove_vid_editors_pick($_POST['check_video'][$id]);
    }
    $eh->flush();
    e("Selected videos have been removed from editors pick", "m");
}
$ep_videos = get_ep_videos();
if (isset($_POST['update_order'])) {
    if (is_array($ep_videos)) {
        foreach ($ep_videos as $epvid) {
            $order = $_POST['ep_order_' . $epvid['pick_id']];
            move_epick($epvid['videoid'], $order);
        }
    }
    $ep_videos = get_ep_videos();
}
assign('videos', $ep_videos);
assign('max', get_highest_sort_number());
assign('min', get_lowest_sort_number());
subtitle("Editor's Pick");
template_files('editor_pick.html');
display_it();
Beispiel #22
0
<?php

define('THIS_PAGE', 'index');
require 'includes/config.inc.php';
$pages->page_redir();
if (is_installed('editorspick')) {
    assign('editor_picks', get_ep_videos());
}
// Displaying The Template
template_files('index.html');
display_it();
Beispiel #23
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();
Beispiel #24
0
//Installing Plugin
if (isset($_GET['install_plugin'])) {
    $folder = $_GET['f'];
    $installed = $cbplugin->installPlugin(mysql_clean($_GET['install_plugin']), $folder);
    if ($installed) {
        include $installed;
    }
}
/**
 * Installing Multiple Plugins
 */
if ($_POST['action-mode'] == 'install') {
    $plugs = count($_POST['check_plugin']);
    for ($i = 0; $i < $plugs; $i++) {
        $itr = $_POST['check_plugin'][$i];
        $installed = $cbplugin->installPlugin($_POST['plugin_file_' . $itr], $_POST['plugin_folder_' . $itr]);
        if ($installed) {
            include $installed;
        }
    }
}
//Get New Plugin List
$availabe_plugin_list = $cbplugin->getNewPlugins();
Assign('new_plugin_list', $availabe_plugin_list);
//Get Installed Plugin List
$installed_plugin_list = $cbplugin->getInstalledPlugins();
Assign('installed_plugin_list', $installed_plugin_list);
Assign('msg', @$msg);
subtitle("Plugin Manager");
template_files('plugin_manager.html');
display_it();
Beispiel #25
0
<?php

/* 
 ***************************************************************
 | Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.						
 | @ Author : ArslanHassan													
 | @ Software : ClipBucket , © PHPBucket.com								
 ***************************************************************
*/
define("THIS_PAGE", "invite_group");
define("PARENT_PAGE", "groups");
require 'includes/config.inc.php';
$pages->page_redir();
$url = mysql_clean($_GET['url']);
$details = $cbgroup->group_details_url($url);
assign('group', $details);
if (!$cbgroup->is_owner($details)) {
    e(lang("you_cant_invite_mems"));
} else {
    if ($details) {
        assign('friends', $userquery->get_contacts(userid(), 0));
    }
    //Inviting Friends
    if (isset($_POST['invite_friends'])) {
        $cbgroup->invite_members($_POST['friend'], $details['group_id']);
    }
    assign('mode', "invite_group");
    template_files('view_group.html');
    subtitle(lang("grp_invite_msg"));
    display_it();
}
if (!defined('MAIN_PAGE')) {
    define('MAIN_PAGE', 'Advertisement');
}
if (!defined('SUB_PAGE')) {
    define('SUB_PAGE', 'Manage Placements');
}
//Removing Placement
if (isset($_GET['remove'])) {
    $placement = mysql_clean($_GET['remove']);
    $msg = $ads_query->RemovePlacement($placement);
}
//Adding Placement
if (isset($_POST['AddPlacement'])) {
    $placement_name = mysql_clean($_POST['placement_name']);
    $placement_code = mysql_clean($_POST['placement_code']);
    $array = array($placement_name, $placement_code);
    $msg = $ads_query->AddPlacement($array);
}
//Getting List Of Placement
$sql = "SELECT * FROM " . tbl("ads_placements");
$ads_placements = db_select($sql);
$total_placements = $db->num_rows;
//Getting total Ads in each placement
for ($id = 0; $id <= $total_placements; $id++) {
    $ads_placements[$id]['total_ads'] = $adsObj->count_ads_in_placement($ads_placements[$id]['placement']);
}
Assign('ads_placements', $ads_placements);
//pr($ads_placements,true);
subtitle("Add Advertisment Placement");
template_files('ads_add_placements.html');
display_it();
Beispiel #27
0
//Edit Categoty
if (isset($_GET['category'])) {
    assign("edit_category", "show");
    if (isset($_POST['update_category'])) {
        $userquery->thumb_dir = 'users';
        $userquery->update_category($_POST);
    }
    assign('cat_details', $userquery->get_category($_GET['category']));
}
//Delete Category
if (isset($_GET['delete_category'])) {
    $userquery->delete_category($_GET['delete_category']);
}
$cats = $userquery->get_categories();
//Updating Category Order
if (isset($_POST['update_order'])) {
    foreach ($cats as $cat) {
        if (!empty($cat['category_id'])) {
            $order = $_POST['category_order_' . $cat['category_id']];
            $userquery->update_cat_order($cat['category_id'], $order);
        }
    }
    $cats = $userquery->get_categories();
}
//Assing Category Values
assign('category', $cats);
assign('total', $userquery->total_categories());
Assign('msg', @$msg);
subtitle("User Category Manager");
template_files('user_category.html');
display_it();
Beispiel #28
0
}
switch ($mode) {
    case "view":
    default:
        assign("mode", "view");
        //Getting Video List
        $page = mysql_clean($_GET['page']);
        $get_limit = create_query_limit($page, 5);
        $videos = $cbvid->action->get_flagged_objects($get_limit);
        Assign('videos', $videos);
        //Collecting Data for Pagination
        $total_rows = $cbvid->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");
        $vid = mysql_clean($_GET['vid']);
        $vdetails = $cbvid->get_video($vid);
        if ($vdetails) {
            $flags = $cbvid->action->get_flags($vid);
            assign('flags', $flags);
            assign('video', $vdetails);
        } else {
            e("Video does not exist");
        }
}
subtitle("Flagged Videos");
template_files('flagged_videos.html');
display_it();
Beispiel #29
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();
    $cbcollection->delete_category($_GET['delete_category']);
}
//$cats = $cbcollection->get_categories();
//$pid = $cbcollection->get_category_field($_GET['category'],'parent_id');
$cats = getCategoryList(array('type' => 'collection'));
if ($pid) {
    $selected = $pid;
}
//$parent_cats = $cbcollection->admin_area_cats($selected);
//Updating Category Order
if (isset($_POST['update_order'])) {
    foreach ($cats as $cat) {
        if (!empty($cat['category_id'])) {
            $order = $_POST['category_order_' . $cat['category_id']];
            $cbcollection->update_cat_order($cat['category_id'], $order);
        }
    }
    $cats = getCategoryList(array('type' => 'collection'));
}
assign('manage_categories_title', 'Manage collection categories');
assign('type', 'collection');
$Smarty->assign_by_ref('obj', $cbcollection);
//Assing Category Values
assign('category', $cats);
assign('categories', $cats);
//Assing Category Values
assign('total', $cbcollection->total_categories());
subtitle("Collection Category Manager");
Assign('msg', @$msg);
template_files('category.html');
display_it();