Example #1
0
             echo json_encode(array("error" => "Nothing Found"));
         }
     }
     break;
 case "channelObjects":
     $contentType = strtolower(mysql_clean($_POST['content']));
     $u = $userquery->get_user_details($_POST['user']);
     $assign = $_POST['assign'];
     if (is_array($assign)) {
         foreach ($assign as $var => $value) {
             assign($var, $value);
         }
     }
     switch ($contentType) {
         case "videos":
             $videos = get_videos(array("user" => $u['userid'], "order" => " date_added DESC", "limit" => config('videos_item_channel_page')));
             if ($videos) {
                 foreach ($videos as $video) {
                     assign('video', $video);
                     assign('channelVideo', true);
                     $content['html'] .= Fetch("/blocks/video.html");
                 }
                 $content['html'] .= '<div align="right" class="clearfix channelAjaxMoreLink videosMoreLink" style="clear:both; display:block;">';
                 $content['html'] .= '<a href="' . cblink(array("name" => "user_videos")) . $u['username'] . '">' . lang('more') . '</a> | <a href="' . cblink(array("name" => "user_favorites")) . $u['username'] . '">' . lang('Favorites') . '</a>';
                 $content['html'] .= '</div>';
             } else {
                 $content['html'] = '<div align="center"><em>' . lang('user_have_no_vide') . '</em></div>';
             }
             break;
         case "photos":
             $photos = get_photos(array("user" => $u['userid'], "order" => " date_added DESC", "limit" => config('photo_channel_page')));
Example #2
0
        $videos = get_videos(array('limit' => $limit, 'order' => 'last_viewed DESC'));
        $title = "Videos Being Watched";
        break;
    case 'user':
        $user = mysql_clean($_GET['username']);
        //Get userid from username
        $uid = $userquery->get_user_field_only($user, 'userid');
        $uid = $uid ? $uid : 'x';
        $videos = get_videos(array('limit' => $limit, 'user' => $uid, 'order' => 'date_added DESC'));
        //Count Total Videos of this user
        $total_vids = get_videos(array('count_only' => true, 'user' => $uid));
        $title = "Videos uploaded by " . $user;
        break;
    case 'featured':
    default:
        $videos = get_videos(array('limit' => $limit, 'order' => 'featured_date DESC', 'featured' => 'yes'));
        $title = "Featured Videos";
        break;
}
subtitle($title);
?>

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title><?php 
echo cbtitle();
?>
</title>
<link><?php 
echo BASEURL;
?>
Example #3
0
if (!$details) {
    e(lang("grp_exist_error"));
} elseif (!$cbgroup->is_viewable($details)) {
    $Cbucket->show_page = false;
} elseif (!$cbgroup->is_member(userid(), $details['group_id'])) {
    e(lang("you_not_allowed_add_grp_vids"));
} else {
    ///Getting User Videos
    $page = mysql_clean($_GET['page']);
    $get_limit = create_query_limit($page, 28);
    $array = array('user' => userid(), 'limit' => $get_limit);
    $usr_vids = get_videos($array);
    //echo $db->db_query;
    assign('usr_vids', $usr_vids);
    $array['count_only'] = true;
    $total_rows = get_videos($array);
    $total_pages = count_pages($total_rows, 28);
    //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
Example #4
0
function p_r($array)
{
    echo "<pre>";
    print_r($array);
    echo "</pre>";
}
$start_index = $_GET['start_index'] ? $_GET['start_index'] : 0;
$loop_size = $_GET['loop_size'];
$loop_size = $loop_size ? $loop_size : 5;
assign('loop_size', $loop_size);
$next_index = $start_index + $loop_size;
assign('next_index', $next_index);
//Reindex Videos
if (isset($_GET['index_vids'])) {
    $videos = get_videos(array("active" => "yes", "status" => "Successful", "limit" => $start_index . "," . $loop_size));
    $total_videos = get_videos(array("count_only" => true, "active" => "yes", "status" => "Successful"));
    $percent = number_format(50 * $total_videos / 100);
    $i = 0;
    assign('total', $total_videos);
    assign('from', $start_index + 1);
    $to = $start_index + $loop_size;
    if ($to > $total_videos) {
        $to = $total_videos;
        e($total_videos . " videos have been reindexed successfully.", "m");
        assign("stop_loop", "yes");
    }
    assign('to', $to);
    while ($i < $total_videos) {
        if ($videos[$i]['videoid']) {
            $params = array("video_id" => $videos[$i]['videoid'], "video_comments" => true, "favs_count" => true, "playlist_count" => true);
            $indexes = $cbindex->count_index("vid", $params);
<div id="gallery" class="row">
    <div id="content" class="row">
        <header class="content">
            <h3><?php 
get_text($gallery_title);
?>
</h3>
            <p><?php 
get_text($gallery_description);
?>
</p>
        </header>
        
        <div id="thumbs" class="content grid">
            <?php 
get_videos('gallery', 'content-gallery-item');
?>
        </div>
    </div>
    
    <footer id="footer" class="row">
        <div class="content">
            <div class="left">
                <span><?php 
get_text($footer_text);
?>
</span><br>
                <a class="cinematico" href="http://cinemati.co" target="_blank">Powered by Cinematico</a>
            </div>
            
            <div class="right">
Example #6
0
$u = mysql_clean($u);
$udetails = $userquery->get_user_details($u);
$page = mysql_clean($_GET['page']);
if ($udetails) {
    assign("u", $udetails);
    $mode = $_GET['mode'];
    assign("u", $udetails);
    assign('p', $userquery->get_user_profile($udetails['userid']));
    switch ($mode) {
        case 'uploads':
        case 'videos':
        default:
            $get_limit = create_query_limit($page, config('videos_items_uvid_page'));
            assign("the_title", $udetails['username'] . " videos");
            $videos = get_videos(array('user' => $udetails['userid'], 'limit' => $get_limit));
            $total_rows = get_videos(array('user' => $udetails['userid'], 'count_only' => true));
            subtitle(sprintf(lang("users_videos"), $udetails['username']));
            $total_pages = count_pages($total_rows, config('videos_items_uvid_page'));
            break;
        case 'favorites':
            $get_limit = create_query_limit($page, config('videos_items_ufav_page'));
            assign("the_title", $udetails['username'] . " favorites");
            $params = array('userid' => $udetails['userid'], 'limit' => $get_limit);
            $videos = $cbvid->action->get_favorites($params);
            $params['count_only'] = "yes";
            $total_rows = $cbvid->action->get_favorites($params);
            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':
    $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();
Example #8
0
            $msg = $msg[0];
        }
        if (error()) {
            $err = error_list();
            $err = $err[0];
        }
        $ajax['msg'] = $msg;
        $ajax['err'] = $err;
        echo json_encode($ajax);
        break;
}
/////////////////////////ending notes
if (!$array['order']) {
    $result_array['order'] = " views DESC LIMIT 8 ";
}
$videos = get_videos($result_array);
Assign('videos', $videos);
$comments = getComments($comment_cond);
assign("comments", $comments);
$get_limit = create_query_limit($page, 5);
$videos = $cbvid->action->get_flagged_objects($get_limit);
Assign('flaggedVideos', $videos);
$get_limit = create_query_limit($page, 5);
$users = $userquery->action->get_flagged_objects($get_limit);
Assign('flaggedUsers', $users);
$get_limit = create_query_limit($page, 5);
$photos = $cbphoto->action->get_flagged_objects($get_limit);
assign('flaggedPhotos', $photos);
$numbers = array(100, 1000, 15141, 3421);
function format_number($number)
{
    function content_56afd78d1fea15_55283541($_smarty_tpl)
    {
        ?>
	<?php 
        if ($_smarty_tpl->tpl_vars['userquery']->value->udetails['soclid'] != '') {
            ?>
		<?php 
            if (isset($_smarty_tpl->tpl_vars["usr_head_thumb"])) {
                $_smarty_tpl->tpl_vars["usr_head_thumb"] = clone $_smarty_tpl->tpl_vars["usr_head_thumb"];
                $_smarty_tpl->tpl_vars["usr_head_thumb"]->value = (string) $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb('', '', userid());
                $_smarty_tpl->tpl_vars["usr_head_thumb"]->nocache = null;
                $_smarty_tpl->tpl_vars["usr_head_thumb"]->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars["usr_head_thumb"] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb('', '', userid()), null, 0);
            }
            ?>
		<?php 
        } else {
            ?>
		<?php 
            if (isset($_smarty_tpl->tpl_vars["usr_head_thumb"])) {
                $_smarty_tpl->tpl_vars["usr_head_thumb"] = clone $_smarty_tpl->tpl_vars["usr_head_thumb"];
                $_smarty_tpl->tpl_vars["usr_head_thumb"]->value = (string) $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb('', 'small', userid());
                $_smarty_tpl->tpl_vars["usr_head_thumb"]->nocache = null;
                $_smarty_tpl->tpl_vars["usr_head_thumb"]->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars["usr_head_thumb"] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb('', 'small', userid()), null, 0);
            }
            ?>
	<?php 
        }
        ?>
	<div id="quick_container">
		<div id="quicklist_box">
		</div>
	</div>
<?php 
        if (isset($_smarty_tpl->tpl_vars['logged_in_user'])) {
            $_smarty_tpl->tpl_vars['logged_in_user'] = clone $_smarty_tpl->tpl_vars['logged_in_user'];
            $_smarty_tpl->tpl_vars['logged_in_user']->value = $_smarty_tpl->tpl_vars['userquery']->value->get_user_details(userid());
            $_smarty_tpl->tpl_vars['logged_in_user']->nocache = null;
            $_smarty_tpl->tpl_vars['logged_in_user']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['logged_in_user'] = new Smarty_variable($_smarty_tpl->tpl_vars['userquery']->value->get_user_details(userid()), null, 0);
        }
        if (isset($_smarty_tpl->tpl_vars['searchPage'])) {
            $_smarty_tpl->tpl_vars['searchPage'] = clone $_smarty_tpl->tpl_vars['searchPage'];
            $_smarty_tpl->tpl_vars['searchPage']->value = $_GET['query'];
            $_smarty_tpl->tpl_vars['searchPage']->nocache = null;
            $_smarty_tpl->tpl_vars['searchPage']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['searchPage'] = new Smarty_variable($_GET['query'], null, 0);
        }
        ?>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
	<div class="navbar-container clearfix">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle navig-resp-bg" data-toggle="collapse" data-target="#khulja-sim-sim">
				<!--<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span> -->
			</button>
			<button type="button" class="navbar-toggle nav-toggle search-resp-bg" data-toggle="collapse" data-target="#navbar-search-collapse">
				<!--  <span class="glyphicon glyphicon-search"></span> -->
			</button>
			<a class="navbar-brand cb-logo" href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
"><?php 
        echo $_smarty_tpl->tpl_vars['website_title']->value;
        ?>
</a>
		</div>
		<?php 
        echo ANCHOR(array('place' => 'mature_content'), $_smarty_tpl);
        ?>
 

		<?php 
        if (isset($_smarty_tpl->tpl_vars['head_menu'])) {
            $_smarty_tpl->tpl_vars['head_menu'] = clone $_smarty_tpl->tpl_vars['head_menu'];
            $_smarty_tpl->tpl_vars['head_menu']->value = cb_menu();
            $_smarty_tpl->tpl_vars['head_menu']->nocache = null;
            $_smarty_tpl->tpl_vars['head_menu']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['head_menu'] = new Smarty_variable(cb_menu(), null, 0);
        }
        ?>

		<div class="responsive-search collapse" id="navbar-search-collapse">
			<!--<form class="" role="search" action="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
">-->
			<form class="navbar-form navbar-left no-border" role="search" action="<?php 
        echo cblink(array('name' => 'search_result'), $_smarty_tpl);
        ?>
">
				<div class="input-group cbsearchtype">
					<input type="text" class="form-control" name="query" placeholder="search keyword here" value="<?php 
        echo get_form_val('query', true);
        ?>
" id="query">
					<div class="input-group-btn">
						<input type="hidden" name="type" class="type" value="<?php 
        if (isset($_GET['type'])) {
            echo $_GET['type'];
        } else {
            ?>
videos<?php 
        }
        ?>
" id="type">
						<button tabindex="-1" data-toggle="dropdown" class="btn btn-default dropdown-toggle search-drop-btn" type="button">
							<span class="search-type"><?php 
        if ($_GET['type']) {
            echo $_GET['type'];
        } else {
            ?>
Videos<?php 
        }
        ?>
</span>
							<span class="caret"></span>
							<span class="sr-only">Toggle Dropdown</span>
						</button>
						<ul class="dropdown-menu" role="menu">
							<?php 
        if (isset($_smarty_tpl->tpl_vars['counter'])) {
            $_smarty_tpl->tpl_vars['counter'] = clone $_smarty_tpl->tpl_vars['counter'];
            $_smarty_tpl->tpl_vars['counter']->value = 1;
            $_smarty_tpl->tpl_vars['counter']->nocache = null;
            $_smarty_tpl->tpl_vars['counter']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable(1, null, 0);
        }
        ?>
							<?php 
        $_smarty_tpl->tpl_vars['t'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['t']->_loop = false;
        $_smarty_tpl->tpl_vars['stypes'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->search_types;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['t']->key => $_smarty_tpl->tpl_vars['t']->value) {
            $_smarty_tpl->tpl_vars['t']->_loop = true;
            $_smarty_tpl->tpl_vars['stypes']->value = $_smarty_tpl->tpl_vars['t']->key;
            ?>
							<?php 
            if ($_smarty_tpl->tpl_vars['counter']->value == 3) {
                ?>
							<li value="<?php 
                echo $_smarty_tpl->tpl_vars['stypes']->value;
                ?>
" <?php 
                if ($_GET['type'] == $_smarty_tpl->tpl_vars['stypes']->value || $_GET['type'] == '') {
                    ?>
  class="active"  <?php 
                }
                ?>
>
								<a  class="s-types" href="#"><?php 
                echo ucfirst($_smarty_tpl->tpl_vars['stypes']->value);
                ?>
</a>
							</li>
							<?php 
            } else {
                ?>
							<li value="<?php 
                echo $_smarty_tpl->tpl_vars['stypes']->value;
                ?>
" <?php 
                if ($_GET['type'] == $_smarty_tpl->tpl_vars['stypes']->value) {
                    ?>
  class="active" <?php 
                }
                ?>
>
								<a  class="s-types" href="#"><?php 
                echo ucfirst($_smarty_tpl->tpl_vars['stypes']->value);
                ?>
</a>
							</li>
							<?php 
            }
            ?>
							<?php 
            if (isset($_smarty_tpl->tpl_vars['counter'])) {
                $_smarty_tpl->tpl_vars['counter'] = clone $_smarty_tpl->tpl_vars['counter'];
                $_smarty_tpl->tpl_vars['counter']->value = $_smarty_tpl->tpl_vars['counter']->value + 1;
                $_smarty_tpl->tpl_vars['counter']->nocache = null;
                $_smarty_tpl->tpl_vars['counter']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable($_smarty_tpl->tpl_vars['counter']->value + 1, null, 0);
            }
            ?>
							<?php 
        }
        ?>
						</ul>
						<input tabindex="-1" type="submit" name="cbsearch" id="cbsearch" value="<?php 
        echo smarty_lang(array('code' => 'Go'), $_smarty_tpl);
        ?>
" class="btn btn-default minus-marginLeft" />
					</div>
				</div>
			</form>
		</div>

		<ul class="nav navbar-nav main-nav navbar-collapse collapse manual-height left-margin-xero pad-left-xero" id="khulja-sim-sim">
			<li class="dropdown hidden-xs mega-dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-bars"></i>&nbsp;Menu <span class="caret"></span></a>
				<ul class="dropdown-menu clearfix mega-dropdown-menu noclose">
					<li class="col col-lg-3 col-md-3 col-sm-4 col-xs-12">
						<div id="menCollection" class="carousel slide clearfix" data-ride="carousel">
							<div class="carousel-inner">
							<?php 
        if (isset($_smarty_tpl->tpl_vars['videos'])) {
            $_smarty_tpl->tpl_vars['videos'] = clone $_smarty_tpl->tpl_vars['videos'];
            $_smarty_tpl->tpl_vars['videos']->value = get_videos(array("order" => "date_added DESC", "limit" => 4, "featured" => "yes"));
            $_smarty_tpl->tpl_vars['videos']->nocache = null;
            $_smarty_tpl->tpl_vars['videos']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['videos'] = new Smarty_variable(get_videos(array("order" => "date_added DESC", "limit" => 4, "featured" => "yes")), null, 0);
        }
        ?>
							<?php 
        if ($_smarty_tpl->tpl_vars['videos']->value) {
            ?>
				        	<?php 
            $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['video']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['videos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['video']->iteration = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) {
                $_smarty_tpl->tpl_vars['video']->_loop = true;
                $_smarty_tpl->tpl_vars['video']->iteration++;
                ?>
				        	<?php 
                if ($_smarty_tpl->tpl_vars['video']->iteration == 1) {
                    ?>
				        	<div class="item active">
				        	<?php 
                } else {
                    ?>
				        	<div class="item">
				        	<?php 
                }
                ?>
				  
								<?php 
                echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/videos/video_head.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                ?>

							</div>
				        	<?php 
            }
            ?>
							                              
							</div><!-- End Carousel Inner -->
						  	<!-- Controls -->
							<a class="left carousel-control" href="#menCollection" role="button" data-slide="prev">
								<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
								<span class="sr-only">Previous</span>
							</a>
							<a class="right carousel-control" href="#menCollection" role="button" data-slide="next">
								<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
								<span class="sr-only">Next</span>
							</a>
						</div><!-- /.carousel -->
						<?php 
        } else {
            ?>
						<span class="well well-info btn-block">
						No Featured Video Added !
						</span>
						<?php 
        }
        ?>
 
					</li>
					<li class="col col-lg-9 col-md-9 col-sm-8 clearfix col-xs-12">
						<div class="col-lg-2 col-md-2 col-sm-4 col-xs-12">
							<h2><i class="fa fa-video-camera"></i>&nbsp;Videos</h2>
							<?php 
        if (isset($_smarty_tpl->tpl_vars['sorting_links'])) {
            $_smarty_tpl->tpl_vars['sorting_links'] = clone $_smarty_tpl->tpl_vars['sorting_links'];
            $_smarty_tpl->tpl_vars['sorting_links']->value = sorting_links();
            $_smarty_tpl->tpl_vars['sorting_links']->nocache = null;
            $_smarty_tpl->tpl_vars['sorting_links']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['sorting_links'] = new Smarty_variable(sorting_links(), null, 0);
        }
        ?>
     
                            <?php 
        $_smarty_tpl->tpl_vars['name'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['name']->_loop = false;
        $_smarty_tpl->tpl_vars['sort'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['sorting_links']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['name']->key => $_smarty_tpl->tpl_vars['name']->value) {
            $_smarty_tpl->tpl_vars['name']->_loop = true;
            $_smarty_tpl->tpl_vars['sort']->value = $_smarty_tpl->tpl_vars['name']->key;
            ?>
                            <ul>
                                <li class="head_sort_link">
                                	<a class="" href="<?php 
            echo cblink(array('name' => 'sort', 'sort' => $_smarty_tpl->tpl_vars['sort']->value, 'type' => 'videos'), $_smarty_tpl);
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
</a>
                                </li>
                            </ul>  
                            <?php 
        }
        ?>
						</div>
						<div class="col-lg-2 col-md-2 col-sm-4 col-xs-12">
							<h2><i class="fa fa-camera"></i>&nbsp;Photos</h2>
							<?php 
        if (isset($_smarty_tpl->tpl_vars['sorting_links'])) {
            $_smarty_tpl->tpl_vars['sorting_links'] = clone $_smarty_tpl->tpl_vars['sorting_links'];
            $_smarty_tpl->tpl_vars['sorting_links']->value = sorting_links();
            $_smarty_tpl->tpl_vars['sorting_links']->nocache = null;
            $_smarty_tpl->tpl_vars['sorting_links']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['sorting_links'] = new Smarty_variable(sorting_links(), null, 0);
        }
        ?>
     
                            <?php 
        $_smarty_tpl->tpl_vars['name'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['name']->_loop = false;
        $_smarty_tpl->tpl_vars['sort'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['sorting_links']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['name']->key => $_smarty_tpl->tpl_vars['name']->value) {
            $_smarty_tpl->tpl_vars['name']->_loop = true;
            $_smarty_tpl->tpl_vars['sort']->value = $_smarty_tpl->tpl_vars['name']->key;
            ?>
                            <ul>
                                <li class="head_sort_link">
                                	<a class="" href="<?php 
            echo cblink(array('name' => 'sort', 'sort' => $_smarty_tpl->tpl_vars['sort']->value, 'type' => 'photos'), $_smarty_tpl);
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
</a>
                                </li>
                            </ul>  
                            <?php 
        }
        ?>
						</div>
						<div class="col-lg-2 col-md-2 col-sm-4 col-xs-12">
							<h2><i class="fa fa-desktop"></i>&nbsp;Channels</h2>
							<?php 
        if (isset($_smarty_tpl->tpl_vars['sorting_links'])) {
            $_smarty_tpl->tpl_vars['sorting_links'] = clone $_smarty_tpl->tpl_vars['sorting_links'];
            $_smarty_tpl->tpl_vars['sorting_links']->value = sorting_links();
            $_smarty_tpl->tpl_vars['sorting_links']->nocache = null;
            $_smarty_tpl->tpl_vars['sorting_links']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['sorting_links'] = new Smarty_variable(sorting_links(), null, 0);
        }
        ?>
     
                            <?php 
        $_smarty_tpl->tpl_vars['name'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['name']->_loop = false;
        $_smarty_tpl->tpl_vars['sort'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['sorting_links']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['name']->key => $_smarty_tpl->tpl_vars['name']->value) {
            $_smarty_tpl->tpl_vars['name']->_loop = true;
            $_smarty_tpl->tpl_vars['sort']->value = $_smarty_tpl->tpl_vars['name']->key;
            ?>
                            <ul>
                                <li class="head_sort_link">
                                	<a class="" href="<?php 
            echo cblink(array('name' => 'sort', 'sort' => $_smarty_tpl->tpl_vars['sort']->value, 'type' => 'channels'), $_smarty_tpl);
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
</a>
                                </li>
                            </ul>  
                            <?php 
        }
        ?>
						</div>
						<div class="col-lg-2 col-md-2 col-sm-4 col-xs-12">
							<h2><i class="fa fa-th-large"></i>&nbsp;Collections</h2>
							<?php 
        if (isset($_smarty_tpl->tpl_vars['sorting_links'])) {
            $_smarty_tpl->tpl_vars['sorting_links'] = clone $_smarty_tpl->tpl_vars['sorting_links'];
            $_smarty_tpl->tpl_vars['sorting_links']->value = sorting_links();
            $_smarty_tpl->tpl_vars['sorting_links']->nocache = null;
            $_smarty_tpl->tpl_vars['sorting_links']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['sorting_links'] = new Smarty_variable(sorting_links(), null, 0);
        }
        ?>
     
                            <?php 
        $_smarty_tpl->tpl_vars['name'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['name']->_loop = false;
        $_smarty_tpl->tpl_vars['sort'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['sorting_links']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['name']->key => $_smarty_tpl->tpl_vars['name']->value) {
            $_smarty_tpl->tpl_vars['name']->_loop = true;
            $_smarty_tpl->tpl_vars['sort']->value = $_smarty_tpl->tpl_vars['name']->key;
            ?>
                            <ul>
                                <li class="head_sort_link">
                                	<a class="" href="<?php 
            echo cblink(array('name' => 'sort', 'sort' => $_smarty_tpl->tpl_vars['sort']->value, 'type' => 'collections'), $_smarty_tpl);
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
</a>
                                </li>
                            </ul>  
                            <?php 
        }
        ?>
						</div>
						<div class="col-lg-2 col-md-2 col-sm-4 col-xs-12">
							<h2><i class="fa fa-users"></i>&nbsp;Groups</h2>
							<?php 
        if (isset($_smarty_tpl->tpl_vars['sorting_links'])) {
            $_smarty_tpl->tpl_vars['sorting_links'] = clone $_smarty_tpl->tpl_vars['sorting_links'];
            $_smarty_tpl->tpl_vars['sorting_links']->value = sorting_links();
            $_smarty_tpl->tpl_vars['sorting_links']->nocache = null;
            $_smarty_tpl->tpl_vars['sorting_links']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['sorting_links'] = new Smarty_variable(sorting_links(), null, 0);
        }
        ?>
     
                            <?php 
        $_smarty_tpl->tpl_vars['name'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['name']->_loop = false;
        $_smarty_tpl->tpl_vars['sort'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['sorting_links']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['name']->key => $_smarty_tpl->tpl_vars['name']->value) {
            $_smarty_tpl->tpl_vars['name']->_loop = true;
            $_smarty_tpl->tpl_vars['sort']->value = $_smarty_tpl->tpl_vars['name']->key;
            ?>
                            <ul>
                                <li class="head_sort_link">
                                	<a class="" href="<?php 
            echo cblink(array('name' => 'sort', 'sort' => $_smarty_tpl->tpl_vars['sort']->value, 'type' => 'groups'), $_smarty_tpl);
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
</a>
                                </li>
                            </ul>  
                            <?php 
        }
        ?>
						</div>
					</li>
				</ul>				
			</li>
			
			<?php 
        $_smarty_tpl->tpl_vars['menu'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['menu']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['head_menu']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars['menu']->iteration = 0;
        foreach ($_from as $_smarty_tpl->tpl_vars['menu']->key => $_smarty_tpl->tpl_vars['menu']->value) {
            $_smarty_tpl->tpl_vars['menu']->_loop = true;
            $_smarty_tpl->tpl_vars['menu']->iteration++;
            ?>
			<li class="visible-xs"><a href="<?php 
            echo $_smarty_tpl->tpl_vars['menu']->value['link'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['menu']->value['icon'];
            ?>
 <?php 
            echo $_smarty_tpl->tpl_vars['menu']->value['name'];
            ?>
</a></li>
			<?php 
        }
        ?>

			<?php 
        if (userid()) {
            ?>
			<li class="dropdown hvr myaccount-dd hidden-lg hidden-md hidden-sm">
				<span class="dropdown-toggle theme_color col-md-12" data-toggle="dropdown">Setting<b class="caret"></b></span>
				<ul class="dropdown-menu no-padding">
					<li>
						<div class="adminthumb">
						<a href="<?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['logged_in_user']->value);
            ?>
">
							<img class="img-circle" src="<?php 
            echo $_smarty_tpl->tpl_vars['usr_head_thumb']->value;
            ?>
"/>
							<h4><?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->username;
            ?>
</h4> 
						</a>    
						</div>
					</li>
					<?php 
            if (has_access('admin_access')) {
                ?>
					<li><a href="<?php 
                echo $_smarty_tpl->tpl_vars['admin_baseurl']->value;
                ?>
"><i class="fa fa-cogs"></i>&nbsp;<?php 
                echo smarty_lang(array('code' => "Admin area"), $_smarty_tpl);
                ?>
</a></li>
					<?php 
            }
            ?>
					<li><a href="<?php 
            echo cblink(array('name' => 'my_account'), $_smarty_tpl);
            echo userid(array(), $_smarty_tpl);
            ?>
"><i class="fa fa-user"></i></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "my_account"), $_smarty_tpl);
            ?>
</a></li>
					<?php 
            echo ANCHOR(array('place' => 'premium_button_link'), $_smarty_tpl);
            ?>

					<li><a href="<?php 
            echo cblink(array('name' => 'my_videos'), $_smarty_tpl);
            ?>
"><i class="fa fa-video-camera"></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "Manage Videos"), $_smarty_tpl);
            ?>
</a></li>
					<li><a href="<?php 
            echo cblink(array('name' => 'channels'), $_smarty_tpl);
            ?>
"><i class="fa fa-eye"></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "View Channels"), $_smarty_tpl);
            ?>
</a></li>
					<li><a href="<?php 
            echo $_smarty_tpl->tpl_vars['baseurl']->value;
            ?>
/view_channel.php?user=<?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->username;
            ?>
"><i class="fa fa-desktop"></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "My Channel"), $_smarty_tpl);
            ?>
</a></li>
				</ul>
			</li>

			<li class="dropdown hidden-lg hidden-md hidden-sm ">
				<a href="<?php 
            echo cblink(array('name' => 'upload'), $_smarty_tpl);
            ?>
" class="dropdown-toggle" data-toggle="dropdown"><?php 
            echo smarty_lang(array('code' => "Uploads"), $_smarty_tpl);
            ?>
 <b class="caret"></b></a>
				<ul role="menu" class="dropdown-menu">
					<li><a href="<?php 
            echo cblink(array('name' => 'upload'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "Upload Video"), $_smarty_tpl);
            ?>
</a></li>
					<li><a href="<?php 
            echo cblink(array('name' => 'photo_upload'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "Upload Photo"), $_smarty_tpl);
            ?>
</a></li>
				</ul>
			</li>
			<li class="navbar-sm-login-links"><a href="<?php 
            echo cblink(array('name' => 'logout'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => 'logout'), $_smarty_tpl);
            ?>
</a></li>
			<?php 
        } else {
            ?>
			
			<!-- Shown to small devices only Start  @todo : Add condition for logged in user -->

			<li class="navbar-sm-login-links"><a href="#" data-toggle="modal" data-target="#login-modal"><?php 
            echo smarty_lang(array('code' => 'login'), $_smarty_tpl);
            ?>
</a></li>
			<li class="navbar-sm-login-links"><a href="<?php 
            echo cblink(array('name' => "signup"), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => 'Create new account'), $_smarty_tpl);
            ?>
</a></li>
			<!-- Ends -->
			<?php 
        }
        ?>
			<?php 
        if (count($_smarty_tpl->tpl_vars['head_menu']->value) > 4) {
            ?>
			<li class="dropdown">
				<a href="#" class="dropdown-toggle visible-xs" data-toggle="dropdown">More <b class="caret"></b></a>
				<ul class="dropdown-menu">

					<?php 
            $_smarty_tpl->tpl_vars['menu'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['menu']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['head_menu']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['menu']->iteration = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars['menu']->key => $_smarty_tpl->tpl_vars['menu']->value) {
                $_smarty_tpl->tpl_vars['menu']->_loop = true;
                $_smarty_tpl->tpl_vars['menu']->iteration++;
                ?>
					<?php 
                if ($_smarty_tpl->tpl_vars['menu']->iteration > 4) {
                    ?>
					<li <?php 
                    if ($_GET['type'] == mb_strtolower($_smarty_tpl->tpl_vars['menu']->value['name'], 'UTF-8')) {
                        ?>
 class="active"
					<?php 
                    } elseif (!$_GET['type']) {
                        ?>
					<?php 
                        if ($_smarty_tpl->tpl_vars['menu']->value['active']) {
                            ?>
 class="active"<?php 
                        }
                        ?>
					<?php 
                    }
                    ?>
><a href="<?php 
                    echo $_smarty_tpl->tpl_vars['menu']->value['link'];
                    ?>
"><?php 
                    echo $_smarty_tpl->tpl_vars['menu']->value['icon'];
                    ?>
 <?php 
                    echo $_smarty_tpl->tpl_vars['menu']->value['name'];
                    ?>
</a></li>
					<?php 
                }
                ?>
					<?php 
            }
            ?>
				</ul>
			</li>
			<?php 
        }
        ?>
		</ul>

		<!-- Shown to small devices only Start-->
		<form id="search" class="navbar-form navbar-search navbar-left" name="search" method="get" role="search" action="<?php 
        echo cblink(array('name' => 'search_result'), $_smarty_tpl);
        ?>
">
			<div class="input-group mtxs cbsearchtype">
				<input type="text" class="form-control" name="query" placeholder="search keyword here"  value="<?php 
        echo get_form_val('query', true);
        ?>
" id="query">
				<div class="input-group-btn">
					<input type="hidden" name="type" class="type" value="<?php 
        if (isset($_GET['type'])) {
            echo $_GET['type'];
        } else {
            ?>
videos<?php 
        }
        ?>
" id="type">
					<button tabindex="-1" data-toggle="dropdown" class="btn btn-default dropdown-toggle search-drop-btn" type="button">
						<span class="search-type"><?php 
        if ($_GET['type']) {
            echo $_GET['type'];
        } else {
            ?>
Videos<?php 
        }
        ?>
</span>
						<span class="caret"></span>
						<span class="sr-only">Toggle Dropdown</span>
					</button>
					<ul class="dropdown-menu" role="menu">
						<?php 
        if (isset($_smarty_tpl->tpl_vars['counter'])) {
            $_smarty_tpl->tpl_vars['counter'] = clone $_smarty_tpl->tpl_vars['counter'];
            $_smarty_tpl->tpl_vars['counter']->value = 1;
            $_smarty_tpl->tpl_vars['counter']->nocache = null;
            $_smarty_tpl->tpl_vars['counter']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable(1, null, 0);
        }
        ?>
						<?php 
        $_smarty_tpl->tpl_vars['t'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['t']->_loop = false;
        $_smarty_tpl->tpl_vars['stypes'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->search_types;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['t']->key => $_smarty_tpl->tpl_vars['t']->value) {
            $_smarty_tpl->tpl_vars['t']->_loop = true;
            $_smarty_tpl->tpl_vars['stypes']->value = $_smarty_tpl->tpl_vars['t']->key;
            ?>
						<?php 
            if ($_smarty_tpl->tpl_vars['counter']->value == 3) {
                ?>
						<li value="<?php 
                echo $_smarty_tpl->tpl_vars['stypes']->value;
                ?>
" <?php 
                if ($_GET['type'] == $_smarty_tpl->tpl_vars['stypes']->value || $_GET['type'] == '') {
                    ?>
  class="active"  <?php 
                }
                ?>
>
							<a  class="s-types" href="#"><?php 
                echo ucfirst($_smarty_tpl->tpl_vars['stypes']->value);
                ?>
</a>
						</li>
						<?php 
            } else {
                ?>
						<li value="<?php 
                echo $_smarty_tpl->tpl_vars['stypes']->value;
                ?>
" <?php 
                if ($_GET['type'] == $_smarty_tpl->tpl_vars['stypes']->value) {
                    ?>
  class="active" <?php 
                }
                ?>
>
							<a  class="s-types" href="#"><?php 
                echo ucfirst($_smarty_tpl->tpl_vars['stypes']->value);
                ?>
</a>
						</li>
						<?php 
            }
            ?>
						<?php 
            if (isset($_smarty_tpl->tpl_vars['counter'])) {
                $_smarty_tpl->tpl_vars['counter'] = clone $_smarty_tpl->tpl_vars['counter'];
                $_smarty_tpl->tpl_vars['counter']->value = $_smarty_tpl->tpl_vars['counter']->value + 1;
                $_smarty_tpl->tpl_vars['counter']->nocache = null;
                $_smarty_tpl->tpl_vars['counter']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable($_smarty_tpl->tpl_vars['counter']->value + 1, null, 0);
            }
            ?>
						<?php 
        }
        ?>
					</ul>
					<input tabindex="-1" type="submit" name="cbsearch" id="cbsearch" value="<?php 
        echo smarty_lang(array('code' => 'Go'), $_smarty_tpl);
        ?>
" class="btn btn-default minus-marginLeft" />
				</div>
			</div>
		</form>
		<!-- Ends -->

		<!-- Shown to Large displays only Start -->
		<ul class="nav navbar-nav navbar-right nav-login-btns">
			<?php 
        if (userid()) {
            ?>
			<li class="dropdown hvr myaccount-dd">
				<span class="dropdown-toggle theme_color col-md-12" data-toggle="dropdown"> <img class="img-circle" src="<?php 
            echo $_smarty_tpl->tpl_vars['usr_head_thumb']->value;
            ?>
" style="width: 40px; height: 40px;"/> <b class="caret"></b></span>
				<ul class="dropdown-menu no-padding">
					<li>
						<div class="adminthumb">
							 <a href="<?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['logged_in_user']->value);
            ?>
">
							<img class="img-circle" src="<?php 
            echo $_smarty_tpl->tpl_vars['usr_head_thumb']->value;
            ?>
"/>
							<h4><?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->username;
            ?>
</h4>
							</a>     
						</div>
					</li>
					<?php 
            if (has_access('admin_access')) {
                ?>
					<li><a href="<?php 
                echo $_smarty_tpl->tpl_vars['admin_baseurl']->value;
                ?>
"><i class="fa fa-cogs"></i>&nbsp;<?php 
                echo smarty_lang(array('code' => "Admin area"), $_smarty_tpl);
                ?>
</a></li>
					<?php 
            }
            ?>
					<li><a href="<?php 
            echo cblink(array('name' => 'my_account'), $_smarty_tpl);
            echo userid(array(), $_smarty_tpl);
            ?>
"><i class="fa fa-user"></i></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "my_account"), $_smarty_tpl);
            ?>
</a></li>
					<?php 
            echo ANCHOR(array('place' => 'premium_button_link'), $_smarty_tpl);
            ?>

					<li><a href="<?php 
            echo cblink(array('name' => 'my_videos'), $_smarty_tpl);
            ?>
"><i class="fa fa-video-camera"></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "Manage Videos"), $_smarty_tpl);
            ?>
</a></li>
					<li><a href="<?php 
            echo cblink(array('name' => 'channels'), $_smarty_tpl);
            ?>
"><i class="fa fa-eye"></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "View Channels"), $_smarty_tpl);
            ?>
</a></li>
					<li><a href="<?php 
            echo $_smarty_tpl->tpl_vars['baseurl']->value;
            ?>
/view_channel.php?user=<?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->username;
            ?>
"><i class="fa fa-desktop"></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "My Channel"), $_smarty_tpl);
            ?>
</a></li>
					<li class="divider"></li>
					<li><a href="<?php 
            echo cblink(array('name' => 'logout'), $_smarty_tpl);
            ?>
"><i class="fa fa-sign-out"></i>&nbsp;&nbsp;<?php 
            echo smarty_lang(array('code' => "Logout"), $_smarty_tpl);
            ?>
</a></li>
				</ul>
			</li>
			<?php 
        } else {
            ?>
			<li>
				<div class="mrl">
					<a href="<?php 
            echo cblink(array('name' => 'signup'), $_smarty_tpl);
            ?>
" class="btn btn-primary btn-success btn-sm"><?php 
            echo smarty_lang(array('code' => "Create Account"), $_smarty_tpl);
            ?>
</a>
					<a href="#" data-toggle="modal" data-target="#login-modal" class="btn btn-primary btn-sm"><?php 
            echo smarty_lang(array('code' => "Login"), $_smarty_tpl);
            ?>
</a>
				</div>
			</li>
			<?php 
        }
        ?>
		</ul>
		<!-- Ends -->

		<!-- Shown to Large displays only Start -->
		<?php 
        if (userid()) {
            ?>
		<div class="upload-dropdown-btn-d hidden-xs ">
			<div class="btn-group">
				<button title="Upload" class="btn btn-primary" type="button">
					<a class="upload-vid-photo-icon" href="<?php 
            echo cblink(array('name' => 'upload'), $_smarty_tpl);
            ?>
">Upload</a>
				</button>
				<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle" type="button">
					<span class="caret"></span>
					<span class="sr-only">Toggle Dropdown</span>
				</button>
				<ul role="menu" class="dropdown-menu upload-dropdown">
					<li><a href="<?php 
            echo cblink(array('name' => 'upload'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "Upload Video"), $_smarty_tpl);
            ?>
</a></li>
					<li><a href="<?php 
            echo cblink(array('name' => 'photo_upload'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "Upload Photo"), $_smarty_tpl);
            ?>
</a></li>
				</ul>
			</div>
		</div>
		<?php 
        }
        ?>
		<!-- Ends -->

		<!-- SHown to middle size displays only  @todo : Add condition for logged in user -->
		<ul class="nav navbar-nav navbar-right nav-login-dd">
			<li class="search-form show-small-form pull-left mrxll" >
				<i class="glyphicon glyphicon-search cursor-pointer"></i>
			</li>
			<div class="form-small full-width">                    
				<form action="<?php 
        echo cblink(array('name' => 'search_result'), $_smarty_tpl);
        ?>
" role="search" method="get" name="search_small" id="search_small">
					<div class="input-group cbsearchtype">
						<input type="text" class="form-control" name="query" value="<?php 
        echo get_form_val('query', true);
        ?>
" placeholder="search keyword here" id="query">
						<div class="input-group-btn">
							<input type="hidden" name="type" class="type" value="<?php 
        if (isset($_GET['type'])) {
            echo $_GET['type'];
        } else {
            ?>
videos<?php 
        }
        ?>
" id="type">
							<button tabindex="-1" data-toggle="dropdown" class="btn btn-default dropdown-toggle search-drop-btn" type="button">
								<span class="search-type"><?php 
        if ($_GET['type']) {
            echo $_GET['type'];
        } else {
            ?>
Videos<?php 
        }
        ?>
</span>
								<span class="caret"></span>
								<span class="sr-only">Toggle Dropdown</span>
							</button>
							<ul role="menu" class="dropdown-menu">
								<?php 
        if (isset($_smarty_tpl->tpl_vars['counter'])) {
            $_smarty_tpl->tpl_vars['counter'] = clone $_smarty_tpl->tpl_vars['counter'];
            $_smarty_tpl->tpl_vars['counter']->value = 1;
            $_smarty_tpl->tpl_vars['counter']->nocache = null;
            $_smarty_tpl->tpl_vars['counter']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable(1, null, 0);
        }
        ?>
								<?php 
        $_smarty_tpl->tpl_vars['t'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['t']->_loop = false;
        $_smarty_tpl->tpl_vars['stypes'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->search_types;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['t']->key => $_smarty_tpl->tpl_vars['t']->value) {
            $_smarty_tpl->tpl_vars['t']->_loop = true;
            $_smarty_tpl->tpl_vars['stypes']->value = $_smarty_tpl->tpl_vars['t']->key;
            ?>
								<?php 
            if ($_smarty_tpl->tpl_vars['counter']->value == 3) {
                ?>
								<li value="<?php 
                echo $_smarty_tpl->tpl_vars['stypes']->value;
                ?>
" <?php 
                if ($_GET['type'] == $_smarty_tpl->tpl_vars['stypes']->value || $_GET['type'] == '') {
                    ?>
  class="active"  <?php 
                }
                ?>
>
									<a class="s-types" href="#"><?php 
                echo ucfirst($_smarty_tpl->tpl_vars['stypes']->value);
                ?>
</a>
								</li>
								<?php 
            } else {
                ?>
								<li value="<?php 
                echo $_smarty_tpl->tpl_vars['stypes']->value;
                ?>
" <?php 
                if ($_GET['type'] == $_smarty_tpl->tpl_vars['stypes']->value) {
                    ?>
  class="active" <?php 
                }
                ?>
>
									<a class="s-types" href="#"><?php 
                echo ucfirst($_smarty_tpl->tpl_vars['stypes']->value);
                ?>
</a>
								</li>
								<?php 
            }
            ?>
								<?php 
            if (isset($_smarty_tpl->tpl_vars['counter'])) {
                $_smarty_tpl->tpl_vars['counter'] = clone $_smarty_tpl->tpl_vars['counter'];
                $_smarty_tpl->tpl_vars['counter']->value = $_smarty_tpl->tpl_vars['counter']->value + 1;
                $_smarty_tpl->tpl_vars['counter']->nocache = null;
                $_smarty_tpl->tpl_vars['counter']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable($_smarty_tpl->tpl_vars['counter']->value + 1, null, 0);
            }
            ?>
								<?php 
        }
        ?>
							</ul>
							<input tabindex="-1" type="submit" name="cbsearch" id="cbsearch" value="<?php 
        echo smarty_lang(array('code' => 'Go'), $_smarty_tpl);
        ?>
" class="btn btn-default minus-marginLeft" />
						</div>
					</div>
				</form>
			</div>
			<?php 
        if (userid()) {
            ?>
			<li class="dropdown hvr myaccount-dd">
				<span class="dropdown-toggle theme_color col-md-12" data-toggle="dropdown"><img class="img-circle" src="<?php 
            echo $_smarty_tpl->tpl_vars['usr_head_thumb']->value;
            ?>
" style="width: 40px; height: 40px;"/><b class="caret"></b></span>
				<ul class="dropdown-menu">
					<li>
						<div class="adminthumb">
							<a href="<?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['logged_in_user']->value);
            ?>
">
							<img class="img-circle" src="<?php 
            echo $_smarty_tpl->tpl_vars['usr_head_thumb']->value;
            ?>
"/>
							<h4><?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->username;
            ?>
</h4>     
							</a>
		
						</div>
					</li>
					<?php 
            if (has_access('admin_access')) {
                ?>
					<li><a href="<?php 
                echo $_smarty_tpl->tpl_vars['admin_baseurl']->value;
                ?>
"><?php 
                echo smarty_lang(array('code' => "Admin area"), $_smarty_tpl);
                ?>
</a></li>
					<?php 
            }
            ?>
					<li><a href="<?php 
            echo cblink(array('name' => 'my_account'), $_smarty_tpl);
            echo userid(array(), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "my_account"), $_smarty_tpl);
            ?>
</a></li>
					<?php 
            echo ANCHOR(array('place' => 'premium_button_link'), $_smarty_tpl);
            ?>

					<li><a href="<?php 
            echo cblink(array('name' => 'my_videos'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "Manage Videos"), $_smarty_tpl);
            ?>
</a></li>
					<li><a href="<?php 
            echo cblink(array('name' => 'channels'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "View Channels"), $_smarty_tpl);
            ?>
</a></li>
					<li class="divider"></li>
					<li><a href="<?php 
            echo cblink(array('name' => 'logout'), $_smarty_tpl);
            ?>
"><?php 
            echo smarty_lang(array('code' => "Logout"), $_smarty_tpl);
            ?>
</a></li>
				</ul>
			</li>
			<?php 
        } else {
            ?>
			<li>
				<div class=" mlm mrm">
					<a href="#" data-toggle="modal" data-target="#login-modal"><span class="glyphicon glyphicon-user"></span></a>
				</div>
			</li>
			<?php 
        }
        ?>
		</ul>
		
		
	</div>
</nav>

<div class="modal fade" id="login-modal" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<form name="login-form" role="form" action="<?php 
        echo cblink(array('name' => 'signup'), $_smarty_tpl);
        ?>
" method="post">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title"><?php 
        echo smarty_lang(array('code' => "Login"), $_smarty_tpl);
        ?>
</h4>
				</div>
				<div class="modal-body">

					<div class="form-group">
						<label for="login_username"><?php 
        echo smarty_lang(array('code' => "Username"), $_smarty_tpl);
        ?>
</label>
						<input type="text" class="form-control" id="login_username"  name="username"  placeholder="Enter username">
					</div>

					<div class="form-group">
						<label for="login_password"><?php 
        echo smarty_lang(array('code' => "Password"), $_smarty_tpl);
        ?>
</label>
						<input type="password" class="form-control" id="login_password" name="password" placeholder="Enter password">
					</div>

					<div class="checkbox">
						<label>
							<input type="checkbox"> <?php 
        echo smarty_lang(array('code' => "Remember me"), $_smarty_tpl);
        ?>

						</label>
					</div>

					<div align="center"><a href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/forgot.php"><?php 
        echo smarty_lang(array('code' => 'user_forgot_password'), $_smarty_tpl);
        ?>
</a> | <a href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/forgot.php?mode=recover_username"><?php 
        echo smarty_lang(array('code' => 'user_forgot_username'), $_smarty_tpl);
        ?>
</a></div>
				</div>
				<div class="modal-footer">
					<a href="<?php 
        echo cblink(array('name' => 'signup'), $_smarty_tpl);
        ?>
" class="btn btn-primary btn-success btn-sm pull-left"><?php 
        echo smarty_lang(array('code' => "Create Account"), $_smarty_tpl);
        ?>
</a>
					<button type="button" class="btn btn-default" data-dismiss="modal"><?php 
        echo smarty_lang(array('code' => "Cancel"), $_smarty_tpl);
        ?>
</button>
					<input type="submit" class="btn btn-primary" value="<?php 
        echo smarty_lang(array('code' => 'Login'), $_smarty_tpl);
        ?>
" name="login">
				</div>
			</div><!-- /.modal-content -->
		</form>
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script>
function rm_hvr() {
	if ( $(window).width() > 767 )
	{
		$(".dropdown.hvr").on("mouseenter",function(){
			$('.dropdown-menu', this).not('.in .dropdown-menu').stop(true,true).slideDown("400");
		});
		$(".dropdown.hvr").on("mouseleave",function(){
			$('.dropdown-menu', this).not('.in .dropdown-menu').stop(true,true).slideUp("400");
		});
	}
	else
	{
		
	}
}
//header menu-width function
function headerMenuWidth(){
	var headerWidth = $(window).width();
	$(".mega-dropdown-menu .col:nth-child(2)").css("width",headerWidth-350+"px");
}
$(window).resize(function(){
	rm_hvr();
	headerMenuWidth();
});
	$(document).ready(function(){
		rm_hvr();
		headerMenuWidth();
		$(".cbsearchtype a").on({
			click: function(e){
				e.preventDefault();
				var prent_li = $(this).parents();
				$('.type').val($(this).html());
				$('.cbsearchtype li').removeClass('active');
				prent_li.addClass('active');
			}
			});
		
		$('.show-small-form').click(function() {
			$('.form-small').toggleClass('show');   
		});

		$('.s-types').on("click", function(){
			var _this = $(this);
			var text = _this.html();
			$('.search-type').html(text);
		});
	});
</script><?php 
    }
Example #10
0
                $data[$i]['options']['type'] = 'projectMarker';
                $data[$i]['options']['actionType'] = "linkToProject";
            }
            $marker_data['markers'] = $data;
        } else {
            $marker_data['error'] = 'permission denied';
        }
    } else {
        $marker_data['error'] = 'permission denied';
    }
    echo json_encode($marker_data, JSON_NUMERIC_CHECK);
}
//get videos of a project
if ($_GET['req'] == "getVideos") {
    $project_id = $_GET['data']['projectId'];
    $video_rows = get_videos($project_id);
    //chage data form for client side
    $videos = array();
    for ($i = 0; $i < count($video_rows); $i++) {
        $video = $video_rows[$i];
        $videos[] = array('id' => $video['video_id'], 'url' => $video['url'], 'name' => $video['name']);
    }
    echo json_encode($videos, JSON_NUMERIC_CHECK);
}
if ($_GET['req'] == "getPolylines") {
    $project_id = $_GET['data']['projectId'];
    $polyline_rows = get_polylines($project_id);
    //get polylines of a project
    $polylines = array();
    for ($i = 0; $i < count($polyline_rows); $i++) {
        $polyline = $polyline_rows[$i];
Example #11
0
<?php

include '../../../../includes/config.inc.php';
header('Content-Type: text/xml');
$title = mysql_clean($_GET['title']);
$tags = mysql_clean($_GET['tags']);
$videoid = mysql_clean($_GET['vid']);
$related_videos = get_videos(array('title' => $title, 'tags' => $tags, 'exclude' => $videoid, 'show_related' => 'yes', 'limit' => 8, 'order' => 'date_added DESC'));
if (!$related_videos) {
    $related_videos = get_videos(array('exclude' => $videoid, 'limit' => 12, 'order' => 'date_added DESC'));
}
?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
	<?php 
if ($related_videos) {
    foreach ($related_videos as $video) {
        ?>
    <item>
        <title><?php 
        echo $video['title'];
        ?>
</title>
        <link><?php 
        echo videoLink($video);
        ?>
</link>
        <media:thumbnail url="<?php 
        echo get_thumb($video);
        ?>
" height="90" width="120" time="<?php 
function is_video($record)
{
    $videos = get_videos();
    foreach ($videos as $video) {
        if (strstr(strtolower($record['type']), $video)) {
            return true;
        }
    }
    return false;
}
    function content_56afd77ab2a977_56293857($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_truncate')) {
            include '/var/www/html/includes/smartyv3/plugins/modifier.truncate.php';
        }
        if (!is_callable('smarty_modifier_date_format')) {
            include '/var/www/html/includes/smartyv3/plugins/modifier.date_format.php';
        }
        ?>
<div class="heading">
    <h2>ClipBucket V2.7 Dashboard</h2>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="tabbable">
            <ul class="nav nav-tabs" id="myTab">
                <li class="active">
                    <a data-toggle="tab" href="#statistics">
                        <h5>Statistics</h5>
                    </a>
                </li>
                <li class="">
                    <a data-toggle="tab" href="#nusers">
                        <h5>New Users</h5>
                    </a>
                </li>
                <li class="">
                    <a data-toggle="tab" href="#mvideos">
                        <h5>Most Viewed Videos</h5>
                    </a>
                </li>
                <li class="">
                    <a data-toggle="tab" href="#fobjects">
                        <h5>Flagged Objects</h5>
                    </a>
                </li>
            </ul>
            <div class="tab-content">
                <div id="statistics" class="tab-pane active">
                    <div class="tabbable tabs-left">
                        <ul class="nav nav-tabs" id="myTab1">
                            <li class="active">
                                <a data-toggle="tab" href="#sweek">
                                    This Week
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#smonth">
                                    This Month
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#soday">
                                    Today
                                </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div id="sweek" class="tab-pane active">
                                <div id="weekly_stats" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="smonth" class="tab-pane">
                                <div id="monthly_stats"  class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="soday" class="tab-pane">
                                <div id="daily_stats" class="flot_chart1">
                                    <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="nusers" class="tab-pane">
                    <div class="tabbable tabs-left">
                        <ul class="nav nav-tabs" id="myTab1">
                            <li class="active">
                                <a data-toggle="tab" href="#uweek">
                                    This Week
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#umonth">
                                    This Month
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#utoday">
                                    Today
                                </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div id="uweek" class="tab-pane active">
                                <div id="weekly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="umonth" class="tab-pane">
                                <div id="monthly_users"  class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="utoday" class="tab-pane">
                                <div id="daily_users" class="flot_chart1">
                                    <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>


                        </div>
                        <div class="users marginTopLarge">
                            <?php 
        if ($_smarty_tpl->tpl_vars['users']->value) {
            ?>
                                <?php 
            $_smarty_tpl->tpl_vars['u'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['u']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['users']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['u']->key => $_smarty_tpl->tpl_vars['u']->value) {
                $_smarty_tpl->tpl_vars['u']->_loop = true;
                ?>
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="row marginBottom">
                                            <div class="col-md-2">
                                                <a href="view_user.php?uid=<?php 
                echo $_smarty_tpl->tpl_vars['u']->value['userid'];
                ?>
"> <img src="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['u']->value, 'small');
                ?>
" class="img-thumbnail oneUserImage" />
                                                </a>
                                            </div>
                                            <div class="col-md-10">
                                                <a href="view_user.php?uid=<?php 
                echo $_smarty_tpl->tpl_vars['u']->value['userid'];
                ?>
" target="_blank"><?php 
                echo $_smarty_tpl->tpl_vars['u']->value['username'];
                ?>
        </a>(<?php 
                echo $_smarty_tpl->tpl_vars['u']->value['email'];
                ?>
)
                                                <button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle pull-right" data-toggle="dropdown">
                                                    <i class="glyphicon glyphicon-cog"></i><i class="icon-angle-down icon-on-right"></i>
                                                </button>
                                                <ul class="dropdown-menu pull-right" aria-labelledby="dropdownMenu1" role="menu">
                                                    <?php 
                if ($_smarty_tpl->tpl_vars['u']->value['ban_status'] == 'yes') {
                    ?>
                                                    <li><a role="menuitem" tabindex="-1" href="?unban=<?php 
                    echo $_smarty_tpl->tpl_vars['u']->value['userid'];
                    ?>
">Unban Member</a></li>
                                                    <?php 
                }
                ?>
                                                    <?php 
                if ($_smarty_tpl->tpl_vars['u']->value['ban_status'] == 'no') {
                    ?>
                                                    <li><a role="menuitem" tabindex="-1" href="?ban=<?php 
                    echo $_smarty_tpl->tpl_vars['u']->value['userid'];
                    ?>
">Ban Member</a></li>
                                                    <?php 
                }
                ?>
                                                    <li><a role="menuitem" tabindex="-1" href="view_user.php?uid=<?php 
                echo $_smarty_tpl->tpl_vars['u']->value['userid'];
                ?>
">Edit</a></li>
                                                    <li><a role="menuitem" tabindex="-1" href="members.php?deleteuser=<?php 
                echo $_smarty_tpl->tpl_vars['u']->value['userid'];
                ?>
">Delete</a></li>
                                                </ul>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <?php 
            }
            ?>
                                <?php 
        }
        ?>
                        </div>
                    </div>
                </div>
                <div id="mvideos" class="tab-pane">
                    <div class="tabbable tabs-left">
                        <ul class="nav nav-tabs" id="myTab1">
                            <li class="active">
                                <a data-toggle="tab" href="#vweek">
                                    This Week
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#vmonth">
                                    This Month
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#vtoday">
                                    Today
                                </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div id="vweek" class="tab-pane active">
                                <div id="weekly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="vmonth" class="tab-pane">
                                <div id="monthly_users"  class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="vtoday" class="tab-pane">
                                <div id="daily_users" class="flot_chart1">
                                    <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="vids marginTopLarge">
                        <?php 
        if ($_smarty_tpl->tpl_vars['videos']->value) {
            ?>
                        <?php 
            $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['video']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['videos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) {
                $_smarty_tpl->tpl_vars['video']->_loop = true;
                ?>
                        <div class="row">
                            <div class="col-md-3">
                                <img src="<?php 
                echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl);
                ?>
" height="80" class="img-thumbnail" id="thumbs_<?php 
                echo $_smarty_tpl->tpl_vars['video']->value['videoid'];
                ?>
" title="<?php 
                echo $_smarty_tpl->tpl_vars['video']->value['title'];
                ?>
"/>
                            </div>
                            <div class="col-md-9">
                                <a href="<?php 
                echo $_smarty_tpl->tpl_vars['baseurl']->value;
                ?>
/watch_video.php?v=<?php 
                echo $_smarty_tpl->tpl_vars['video']->value['videokey'];
                ?>
"target="_blank">
                                    <?php 
                echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video']->value['title'], 45);
                ?>
 </a>
                                <strong class="btn btn-primary btn-xs pull-right"> <?php 
                echo smarty_lang(array('code' => 'views'), $_smarty_tpl);
                ?>
 : <?php 
                echo format_number($_smarty_tpl->tpl_vars['video']->value['views']);
                ?>
</strong>
                            </div>
                        </div>
                        <hr>
                        <?php 
            }
            ?>
                        <?php 
        }
        ?>
                    </div>
                </div>
                <div id="fobjects" class="tab-pane">
                    <div class="tabbable tabs-left">
                        <ul class="nav nav-tabs" id="myTab1">
                            <li class="active">
                                <a data-toggle="tab" href="#fweek">
                                    This Week
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#fmonth">
                                    This Month
                                </a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#ftoday">
                                    Today
                                </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div id="fweek" class="tab-pane active">
                                <div id="weekly_users" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="fmonth" class="tab-pane">
                                <div id="monthly_users"  class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                            <div id="ftoday" class="tab-pane">
                                <div id="daily_users" class="flot_chart1">
                                    <img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="flaggedUser marginTopLarge">
                        <?php 
        if ($_smarty_tpl->tpl_vars['flaggedUsers']->value) {
            ?>
                            <?php 
            $_smarty_tpl->tpl_vars['u'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['u']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['flaggedUsers']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['u']->key => $_smarty_tpl->tpl_vars['u']->value) {
                $_smarty_tpl->tpl_vars['u']->_loop = true;
                ?>
                            <div class="row">
                                <div class="col-md-3">
                                    <a href="view_user.php?uid=<?php 
                echo $_smarty_tpl->tpl_vars['u']->value['userid'];
                ?>
"> <img src="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['u']->value, 'small');
                ?>
" class="oneUserImage" width="85" />
                                    </a>
                                </div>
                                <div class="col-md-6">
                                    (<?php 
                echo $_smarty_tpl->tpl_vars['u']->value['email'];
                ?>
) <?php 
                echo $_smarty_tpl->tpl_vars['u']->value['username'];
                ?>

                                </div>

                                <div class="col-md-7">
                                    <label class="label label-danger">Last Active  <?php 
                echo niceTime($_smarty_tpl->tpl_vars['u']->value['last_active']);
                ?>
</label>
                                    <label class="label label-primary"> <?php 
                echo smarty_lang(array('code' => 'Flags'), $_smarty_tpl);
                ?>
 : <?php 
                echo $_smarty_tpl->tpl_vars['u']->value['flag_type'];
                ?>
</label>

                                </div>
                            </div>
                            <?php 
            }
            ?>
                        <?php 
        }
        ?>
                    </div>
                </div>
           
                <div class="widget-main">
                    <hr>
                    <table class="table table-stripped table-bordered">
                        <tr>
                            <td>
                                <div class="stats_subitem_d">Total Videos : <strong><?php 
        ob_start();
        echo get_videos(array('count_only' => 'yes'), $_smarty_tpl);
        echo number_format(ob_get_clean());
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Groups : <strong><?php 
        echo get_groups(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Collection : <strong><?php 
        echo get_collections(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Users : <strong><?php 
        echo get_users(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Photos: <strong><?php 
        echo get_photos(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                    </table>
                </div>

            </div>
        </div>
    </div>

    <div class="col-md-6">
        <div class="widget-box">
            <div class="widget-header header-color-red">
                <h5><i class="glyphicon glyphicon-book"></i>ClipBucket News</h5>
                <div class="widget-toolbar">
                    <a href="#" data-action="collapse">
                        <i class="icon-chevron-down"></i>
                    </a>
                    <a href="#" data-action="close">
                        <i class="icon-remove"></i>
                    </a>
                </div>
            </div>
            <div class="widget-body">
                <div id="clipbucket_news" class="widget-main" style="height:419px;overflow:auto">
                    
                </div>
            </div>
        </div>
    </div>

    <hr>
   <!--  <div class="tabbable tabs-left" > -->
    <div class=" col-md-8 todotab" >
   
        <ul class="nav nav-tabs" id="myTab" >
            <li class="active">
                <a data-toggle="tab" href="#todolist">
                    <h5><i class="glyphicon glyphicon-list-alt"></i> ToDo List</h5>
                </a>
            </li>
            <li class="">
                <a data-toggle="tab" href="#pnotes">
                    <h5><i class="glyphicon glyphicon-pencil"></i> Personal Notes</h5>
                </a>
            </li>
            <li class="">
                <a data-toggle="tab" href="#rcomments">
                    <h5><i class="glyphicon glyphicon-comment"></i> Recent Comments</h5>
                </a>
            </li>
        </ul>
        <div class="tab-content">
            <div id="todolist" class="tab-pane active">
                <div class="widgetBox">
                    <div class="addTodo paddingRightSmall paddingLeftLarge marginBottomLarge">
                        <div class="row">
                            <div class="from-group col-md-10">
                                <input type="text" name="addTodo" class="form-control">
                            </div>
                            <div class="from-group  relative">
                                <div class="addTodoButton">
                                    <button id="addTodo" class="btn btn-primary btn-sm">Add</button>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                    <?php 
        if (isset($_smarty_tpl->tpl_vars['todos'])) {
            $_smarty_tpl->tpl_vars['todos'] = clone $_smarty_tpl->tpl_vars['todos'];
            $_smarty_tpl->tpl_vars['todos']->value = $_smarty_tpl->tpl_vars['myquery']->value->get_todos();
            $_smarty_tpl->tpl_vars['todos']->nocache = null;
            $_smarty_tpl->tpl_vars['todos']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['todos'] = new Smarty_variable($_smarty_tpl->tpl_vars['myquery']->value->get_todos(), null, 0);
        }
        ?>
                    <ul class="row todosList" id="note-<?php 
        echo $_smarty_tpl->tpl_vars['the_note']->value['note_id'];
        ?>
" >
                        <?php 
        $_smarty_tpl->tpl_vars['note'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['note']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['todos']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['note']->key => $_smarty_tpl->tpl_vars['note']->value) {
            $_smarty_tpl->tpl_vars['note']->_loop = true;
            ?>
                            <li class="col-md-12">
                                <div class="col-md-12">
                                    <p class="oneTodo paddingLeftSmall col-md-10" id="<?php 
            echo $_smarty_tpl->tpl_vars['note']->value['todo_id'];
            ?>
">
                                        <?php 
            echo $_smarty_tpl->tpl_vars['note']->value['todo'];
            ?>

                                    </p>
                                    <a href="#" class="btn btn-danger btn-xs delete">Delete</a>
                                </div>
                            </li>
                        <?php 
        }
        ?>
                        </ul>
                </div>
            </div>
            <div id="pnotes" class="tab-pane">
                    <div class="widgetBox">
                        <div class="addNote form-group paddingRightSmall">
                            <textarea class="form-control" name="ntoe" id="note"></textarea>
                            <div class="alignRight marginTopSmall">
                                <a href="#" id="add_new_note" class="btn btn-primary btn-xs">Add a note</a>
                            </div>
                        </div>
                        <?php 
        if (isset($_smarty_tpl->tpl_vars['notes'])) {
            $_smarty_tpl->tpl_vars['notes'] = clone $_smarty_tpl->tpl_vars['notes'];
            $_smarty_tpl->tpl_vars['notes']->value = $_smarty_tpl->tpl_vars['myquery']->value->get_notes();
            $_smarty_tpl->tpl_vars['notes']->nocache = null;
            $_smarty_tpl->tpl_vars['notes']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['notes'] = new Smarty_variable($_smarty_tpl->tpl_vars['myquery']->value->get_notes(), null, 0);
        }
        ?>
                        <ul class="notesList row paddingRightSmall" id="note-<?php 
        echo $_smarty_tpl->tpl_vars['the_note']->value['note_id'];
        ?>
" >
                            <?php 
        $_smarty_tpl->tpl_vars['note'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['note']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['notes']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['note']->key => $_smarty_tpl->tpl_vars['note']->value) {
            $_smarty_tpl->tpl_vars['note']->_loop = true;
            ?>
                                <li class="col-md-4">
                                    <div class="">
                                        <p class="oneNote" id="<?php 
            echo $_smarty_tpl->tpl_vars['note']->value['note_id'];
            ?>
">
                                        <?php 
            echo $_smarty_tpl->tpl_vars['note']->value['note'];
            ?>

                                        <a href="#" class="delete">ร—</a>
                                    </p>
                                    </div>
                                </li>
                            <?php 
        }
        ?>
                        </ul>
                    </div>

            </div>
            <div id="rcomments" class="tab-pane">
                <div class="widget-box">
                    <div class="widget-header header-color-blue">
                        <h5>Recent Comments</h5>
                        <div class="widget-toolbar">
                            <a href="#" data-action="collapse">
                                <i class="icon-chevron-down"></i>
                            </a>
                            <a href="#" data-action="close">
                                <i class="icon-remove"></i>
                            </a>
                        </div>
                    </div>
                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="widget-box transparent">
                                <div class="widget-header widget-header-small">
                                </div>
                                <div class="widget-body">
                                    <div class="widget-body">
                                        <div class="widget-main no-padding">
                                            <div class="slimScrollDiv">
                                                <?php 
        if ($_smarty_tpl->tpl_vars['comments']->value) {
            ?>
                                                <?php 
            $_smarty_tpl->tpl_vars['comment'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['comment']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['comments']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['comment']->key => $_smarty_tpl->tpl_vars['comment']->value) {
                $_smarty_tpl->tpl_vars['comment']->_loop = true;
                ?>
                                                <div class="itemdiv dialogdiv">
                                                    <?php 
                $_smarty_tpl->tpl_vars['u'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['u']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['users']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['u']->key => $_smarty_tpl->tpl_vars['u']->value) {
                    $_smarty_tpl->tpl_vars['u']->_loop = true;
                    ?>
                                                    <div class="user">
                                                        <img alt="Alexa's Avatar" src="<?php 
                    echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['u']->value, 'small');
                    ?>
">
                                                    </div>
                                                    <?php 
                }
                ?>
                                                    <div class="body">
                                                        <div class="time">
                                                            <i class="icon-time"></i>
                                                            <span class="green"><?php 
                echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['comment']->value['date_added']);
                ?>
</span>
                                                        </div>
                                                        <div class="name">
                                                            <a href="#"><?php 
                echo $_smarty_tpl->tpl_vars['comment']->value['anonym_name'];
                ?>
</a>
                                                        </div>
                                                        <div class="text"><?php 
                echo $_smarty_tpl->tpl_vars['comment']->value['comment'];
                ?>
</div>
                                                        <div class="tools">
                                                            <a href="#" class="btn btn-minier btn-info">
                                                                <i class="icon-only icon-share-alt"></i>
                                                            </a>
                                                        </div>
                                                    </div>
                                                </div>
                                                <?php 
            }
            ?>
                                                <?php 
        }
        ?>
                                            </div>
                                        </div>/widget-main
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>







<div class="well" style="margin-top: 14px;background:;border:1px solid rgba(128, 213, 255, 1);" >
    <h3>WHO WE ARE</h3>
    <p style="text-align:left;"><strong><a href="http://clip-bucket.com/" target="self">ClipBucket</a></strong> would not been possible without its team hardwork and determination for the betterment of the products quality and its services. We are proud that over _____ users are using worlds most popular open source video,audio and photo sharing script named
    <strong>ClipBucket</strong>. We are team who is  determined to deliver the best  features to the open source community.
    </p>


    <p style="text-align:left;margin-top:20px; "><strong>Clipbucket</strong> was made in the year 2006 with the idea to bring a better platform for organizations and companies interested in launching their own video,audio or photo sharing website. In every version our mission and goal is to simplify the technology by adopting new technological methods and techniques to cut down several frontend and backend issues faced. The idea is to give the user a chance to explore more with the flexibility of our product.



     We never compromise on our product interactivity. We always try to create a simple yet interactive and elegant design so that the user can have the best experience of the functions. With the improved social networking options like channels and groups. With ClipBucketโ€™s unmatched quantifiability, users will stretch their applications from family videos to photo-albums. We started off as a paid product and later realized there is more power in going open-source and here we stand today <strong>#1</strong> video sharing and media management script in the industry.</p>

    <h3>OUR TEAM</h3>

    <p style="text-align:left;padding-bottom:20px;">However the team behind ClipBucket always kept their heads and nerves, though they faced many difficulties and problems in meeting the requirements. But teamโ€™s coordination and their creative techniques of solving issues and overcoming them with the best possible solution helped us in presenting  Pakistan on international platform in the field of technology by bringing โ€œClip Bucketโ€ A complete open source multimedia management script.
    </p>

    <div class="to_display">
        <p>Founders <strong><a href="http://www.linkedin.com/profile/view?id=273050157" target="blank">Jahanzeb Hassan</a></strong> and <strong><a href="http://www.linkedin.com/profile/view?id=37419812" target="blank">Arslan Hassan</a></strong></p>

         <strong><a href="http://www.linkedin.com/profile/view?id=324544384" target="self">Fawaz Tahir</a></strong> - Web Application Team Lead<br>
         <strong><a href="http://www.linkedin.com/profile/view?id=78646794" target="self">Ruman Malik</a></strong> - Project Manager<br>
         <strong><a href="http://www.linkedin.com/profile/view?id=325944697" target="self">Muneeb</a></strong> - Mobile Application Team Lead<br>
         <strong><a href="http://www.linkedin.com/profile/view?id=324542682" target="self">Zomail</a></strong> - Sales and Support<br>
         <strong><a href="http://www.linkedin.com/profile/view?id=324542554" target="self">Shahzaib</a></strong> - Network Engineer<br>
         <strong><a href="http://www.linkedin.com/profile/view?id=324542025" target="self">Zunair</a></strong> - SEO and Publishing Manager<br>
        <br>

        <h5><strong>Kick-ass development team of <strong>ClipBucket</strong></strong></h5>
        <strong><a href="https://github.com/fahad-cb" target="self">Fahad Abbas</a></strong> - Project Head (Developer)<br>
         <strong><a href="https://github.com/imranhassan009" target="self">Imran Hassan</a></strong> - Web Developer<br>
         <strong><a href="https://github.com/shoaib-dev" target="self">Muhammad Shoaib</a></strong> - Web Services provider (Developer)<br>
         <strong><a href="https://github.com/awaistariq123" target="self">Awais Tariq</a></strong> - Video Converison Handler<br>
         <strong><a href="https://pk.linkedin.com/in/saqirzzq" target="self">Saaqib Razzaq</a></strong> - Web Developer<br>
         <strong><a href="https://github.com/jamilrehman" target="self">Jamil Rehman</a></strong> - Front end  Developer (Head)<br>
         <strong><a href="https://github.com/rameez-anees" target="self">Rameez Anees</a></strong> - Front end  Developer<br>
         <strong><a href="https://github.com/usman-des" target="self">Usman Afzal</a></strong> - Front end  Developer<br>
         <strong><a href="https://github.com/epicPenguin" target="self">Muhammad Rizwan</a></strong> - Quality Assurance department<br><br><br>


         <h5><strong>We are from Pakistan with high heads and soft hearts</strong></h5>

        <p style="padding-bottom:20px;">Pakistan is always been in the news for the bad reasons and has been criticized by the rest of the world,even then the people of Pakistan are patriotic and stand united for the goodwill of their country.no matter how worst the situation gets the youth is eager enough to bring out the best in all the fields like media,communication, IT and science. IT industry is fast growing with a large potential and is regarded as a successful sector even in countryโ€™s worst financial crisis. as the IT industry in Pakistan is growing like wise the demand for the softwares and programmes has taken up a rapid growth. ClipBucket is one of the fastest and the most used media sharing script with all the latest features and enhancements in the social media. We as Pakistani feel proud on creating this product which will lead our country to the highest levels in the international market.</p>
    </div>

    <p><button id="addTodo" class="btn btn-primary btn-sm clip_read clip_hide" style="float:right;margin-right:10px;margin-top:-30px;">Read More</button></p>
</div>




<style type="text/css">

.to_display{

   display: none; 
}
    .flot_chart1{
        height: 200px;
        width: 400px;
    }
    .vids{
        height: 250px;
        overflow-y: scroll;
        overflow-x: hidden;
        padding: 5px;
    }
</style>






<script type="text/javascript">
$( document ).ready(function() {

    $(".clip_read").click(function() {

        $(this).toggleClass('clip_hide');


        if(!$(this).hasClass('clip_hide')) 
           
           {
            $('.to_display').show();
            $(".clip_read").text("Hide");
           }
        
        else
           {
            $('.to_display').hide();
            $(".clip_read").text("Read More");
           }     
    });

var baseurl="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
";

$.ajax({
                   // url: baseurl+'/ajax.php',

                   url:baseurl+'/ajax.php',
                    type: "POST",
                    dataType : 'text',
                    data: { mode: "get_news"},
                    success : function(news){ $('#clipbucket_news').html(news) },
                    timeout : 5000,
                    error  :  function(err) { $('#clipbucket_news').html(' <div align="center"><em><strong>Connect with Internet to get News</strong></em></div>')},


                });

 
});





  $(function() {


        var options = {

            series: {
                bars: {
                    show: true,
                    steps: true,
                    barWidth: 0.5,
                    align: "center",
                },
                points: { show: true },
                lines: { show: true }
            },
            xaxis: {
                mode: "categories",
                tickLength: 0
            },
            yaxis: {
                alignTicksWithAxis: false
            },
            grid: {
                hoverable: true, 
                clickable: true,
                labelMargin: 30,
                borderWidth: 0
            }
        };


        var ChartsWorker = function(options){
            this.options = options;

       


            this.getUsersStatistics = function(callback){
                var self = this;
                var ajaxCall = $.ajax({
                    url: "charts/reports/dashboard/get_users_data.php",
                    type: "POST",
                    data:"videos=videos",
                    dataType: "json",
                    success: function(data){
                        callback.call(self, data);
                    },
                    error: function() {
                        //alert('error');
                    },
                });
            };

            this.getVideosStatistics = function(callback){
                var self = this;
                var ajaxCall = $.ajax({
                    url: "charts/reports/dashboard/get_videos_data.php",
                    type: "POST",
                    data:"videos=videos",
                    dataType: "json",
                    success: function(data){
                        callback.call(self, data);
                    },
                    error: function() {
                        //alert('error');
                    },
                });
            };

            this.getFlaggedStatistics = function(callback){
                var self = this;
                var ajaxCall = $.ajax({
                    url: "charts/reports/dashboard/get_flagged_objects_data.php",
                    type: "POST",
                    data:"videos=videos",
                    dataType: "json",
                    success: function(data){
                        callback.call(self, data);
                    },
                    error: function() {
                        //alert('error');
                    },
                });
            };

            this.getOverallStatistics = function(callback){
                var self = this;
                var ajaxCall = $.ajax({
                    url: "charts/reports/dashboard/get_total_status_data.php",
                    type: "POST",
                    data:"videos=videos",
                    dataType: "json",
                    success: function(data){
                        callback.call(self, data);
                    },
                    error: function() {
                        //alert('error');
                    },
                });
            };

        };


        var chartsWorker = new ChartsWorker(options);

        chartsWorker.getUsersStatistics(function(data){
            var today = data.today;
            var week = data.this_week;
            var month = data.this_month;
            $.plot("#nusers #weekly_users", [week] , this.options);
            $.plot("#nusers #monthly_users", [month] , this.options);
            $.plot("#nusers #daily_users", [today], this.options);
        });

        chartsWorker.getVideosStatistics(function(data){
            var today = data.today;
            var week = data.this_week;
            var month = data.this_month;
            $.plot("#mvideos #weekly_users", [week] , this.options);
            $.plot("#mvideos #monthly_users", [month] , this.options);
            $.plot("#mvideos #daily_users", [today], this.options);
        });

        chartsWorker.getFlaggedStatistics(function(data){
            var today = data.today;
            var week = data.this_week;
            var month = data.this_month;
            $.plot("#fobjects #weekly_users", [week] , this.options);
            $.plot("#fobjects #monthly_users", [month] , this.options);
            $.plot("#fobjects #daily_users", [today], this.options);
        });

        chartsWorker.getOverallStatistics(function(data){
            var today = data.today;
            var week = data.this_week;
            var month = data.this_month;
            $.plot("#statistics #weekly_stats", [week] , this.options);
            $.plot("#statistics #monthly_stats", [month] , this.options);
            $.plot("#statistics #daily_stats", [today], this.options);
        });

        // $.plot("#placeholder", data, options);

        var iteration = 0;

        function showTooltip(x, y, contents) {
            $('<div id="tooltip">' + contents + '</div>').css( {
                position: 'absolute',
                display: 'none',
                top: y + 5,
                left: x + 5,
                border: '1px solid #fdd',
                padding: '2px',
                'background-color': '#fee',
                opacity: 0.80
            }).appendTo("body").fadeIn(200);
        }

        var previousPoint = null;
        function tooltip(chart_id,tooltip_id){

            $(chart_id).bind("plothover", function (event, pos, item) {
                $("#x").text(pos.x.toFixed(2));
                $("#y").text(pos.y.toFixed(2));

                if ($(tooltip_id).is(':checked')) {
                    if (item) {
                        if (previousPoint != item.dataIndex) {
                            previousPoint = item.dataIndex;

                            $("#tooltip").remove();
                            var x = item.datapoint[0].toFixed(2),
                                    y = item.datapoint[1].toFixed(2);

                            showTooltip(item.pageX, item.pageY,
                                    item.series.label + " = " + y);
                        }
                    }
                    else {
                        $("#tooltip").remove();
                        previousPoint = null;
                    }
                }
            });
        }

        var page = '<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/admin_area/index.php';

        $(".oneNote .delete").on({
            click: function(e){
                e.preventDefault();
                var noteId = $(this).parent().attr("id");
                delete_note(noteId);
                $(this).parents("li").remove();
            }
        });

        $("#add_new_note").on({
            click: function(e){
                e.preventDefault();
                var self = this;
                var note = $(this).parents(".widgetBox").find("textarea").val();
                if(!note){
                    alert("Please enter something");
                }
                else{
                    $(this).parents(".widgetBox").find("textarea").val("");
                    $.post(page, {   
                        mode : 'add_note',
                        note : note,
                    },function(data) {
                        console.log(data);
                        var li = document.createElement("li");
                        li.className = "col-md-4";
                        var a = document.createElement("a");
                        a.className = "delete";
                        a.href = "#";
                        a.innerHTML = "x";
                        var p = document.createElement("p");
                        p.id = data.id;
                        p.innerHTML = note;
                        p.className = "oneNote";
                        $(p).append(a);
                        $(li).append(p);
                        $(a).on({
                            click: function(e){
                                e.preventDefault();
                                var noteId = $(this).parent().attr("id");
                                delete_note(noteId);
                                $(this).parents("li").remove();
                            }
                        });
                        $(self).parents(".widgetBox").find("ul").prepend(li);
                    },'json');
                }
            }
        });

        $("#addTodo").on({
            click: function(e){
                e.preventDefault();
                var self = this;
                var newVal = $(this).parents(".addTodo").find("input").val();
                if(newVal.length){
                $(this).parents(".addTodo").find("input").val("");
                var ajaxCall = $.ajax({
                    url: page,
                    type: "post",
                    data: {
                        val: newVal,
                        mode: "add_todo",
                    },
                });
                ajaxCall.success(function(data){
                    data = $.parseJSON(data);
                    var li = document.createElement("li");
                    li.className = "col-md-12";
                    var p = document.createElement("p");
                    p.className = "oneTodo paddingLeftSmall col-md-10";
                    p.id = data.id;
                    p.innerHTML = data.todo;
                    var a = document.createElement("a");
                    a.href = "#";
                    a.className = "col-md-2 btn btn-danger btn-xs delete";
                    a.innerHTML = "Delete";
                    $(a).on("click", function(e){
                        e.preventDefault();
                        var self = this;
                        var id = $(this).prev().attr("id");
                        var ajaxCall = $.ajax({
                            url: page,
                            type: "post",
                            data: {
                                id: id,
                                mode: "delete_todo",
                            },
                        });
                        ajaxCall.success(function(data){
                            $(self).parents("li").remove();
                        });

                    });
                    var div = document.createElement("div");
                    div.className = "col-md-12";

                    $(li).append(div).find("div").append(p).append(a);
                    $(self).parents(".widgetBox").find("ul").prepend(li);
                });
                }else{
                alert("Please enter a valid value");
                }
            }
        });
        
        $("#todolist .delete").on("click", function(e){
            e.preventDefault();
            var self = this;
            var id = $(this).prev().attr("id");
            var ajaxCall = $.ajax({
                url: page,
                type: "post",
                data: {
                    id: id,
                    mode: "delete_todo",
                },
            });
            ajaxCall.success(function(data){
                $(self).parents("li").remove();
            });

        });
    });

</script>



<?php 
    }
Example #14
0
                    <video height="480" autobuffer="1" preload="metadata">

                    </video>
                </div>
            </div>
        </div>
        <div id="container">
            <ul class='cams'>
                <?php 
if ($list === false) {
    foreach ($cams as $cam) {
        if (isset($cam_dir[$cam])) {
            if (count($cams) <= 1 || $detail) {
                echo "<li><h4>" . htmlentities($cam_dir[$cam]['section']['title']) . " : " . htmlentities($cam_dir[$cam]['data'][0]) . "</h4>\n";
                echo "<ul class='dates'>";
                $videos = get_videos($cam, $all ? false : RECENT_DEFAULT);
                foreach ($videos as $video) {
                    $date = preg_replace('/.*-(20\\d\\d-\\d\\d-\\d\\d).*/', '\\1', $video);
                    $url = sprintf($vurltmpl, $video);
                    $path = sprintf($vpathtmpl, $video);
                    $htmldate = htmlentities($date);
                    echo "<li><a class='play-link' href='#{$url}' data-video='{$path}'><i class='fa fa-play'></i> {$htmldate}</a></li>";
                }
                if (!$all) {
                    echo "<li><a href='?cam=" . htmlentities($cam) . "&all=1'>more</a></li>\n";
                }
                echo "</ul>";
            } else {
                echo "<li><h4><a href='?cam=" . htmlentities($cam) . "'>" . htmlentities($cam_dir[$cam]['section']['title']) . " : " . htmlentities($cam_dir[$cam]['data'][0]) . "\n";
                echo "</a></h4><ul>";
            }
Example #15
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();
Example #16
0
 /**
  * Function used to delete user videos
  */
 function delete_user_vids($uid)
 {
     global $cbvid, $eh;
     $vids = get_videos(array('user' => $uid));
     if (is_array($vids)) {
         foreach ($vids as $vid) {
             $cbvid->delete_video($vid['videoid']);
         }
     }
     $eh->flush_msg();
     e(lang("user_vids_hv_deleted"), "m");
 }
Example #17
0
<?php

/* 
 *****************************************************************
 | Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.	
 | @ Author : tangi											
 | @ Software : ClipBucket , &#169; PHPBucket.com						
 ******************************************************************
*/
require 'includes/config.inc.php';
header("Content-Type: text/xml charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$limit = 100;
$videos = get_videos(array('limit' => $limit, 'active' => 'yes', 'order' => 'date_added DESC'));
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<!-- by fjulio ( tangi @ clipbucket dev. ) -->
<?php 
foreach ($videos as $video) {
    ?>
<url>
<loc><?php 
    echo video_link($video);
    ?>
</loc>
<video:video>
<video:content_loc><?php 
    echo get_video_file($video);
    ?>
</video:content_loc>
<video:player_loc allow_embed="yes"><?php 
    function content_55e44443075054_87310853($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_truncate')) {
            include '/var/www/includes/smartyv3/plugins/modifier.truncate.php';
        }
        ?>
<div class="container">
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
	    var js, fjs = d.getElementsByTagName(s)[0];
	    if (d.getElementById(id)) return;
	    js = d.createElement(s); js.id = id;
	    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=120542078043680";
	    fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	</script>
	<div class="row cb-box marginBottom">

		<?php 
        if (isset($_smarty_tpl->tpl_vars['row'])) {
            $_smarty_tpl->tpl_vars['row'] = clone $_smarty_tpl->tpl_vars['row'];
            $_smarty_tpl->tpl_vars['row']->value = $_smarty_tpl->tpl_vars['myquery']->value->Get_Website_Details();
            $_smarty_tpl->tpl_vars['row']->nocache = null;
            $_smarty_tpl->tpl_vars['row']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['row'] = new Smarty_variable($_smarty_tpl->tpl_vars['myquery']->value->Get_Website_Details(), null, 0);
        }
        ?>

	    <!--<div class="alert alert-info margin-bottom-10 ">-->
	    <?php 
        echo ANCHOR(array('place' => 'global'), $_smarty_tpl);
        ?>
 
	    <!--	</div> -->
	    <div class="clearfix"></div>
	       
		<?php 
        if (is_installed('editorspick')) {
            ?>
		<?php 
            if ($_smarty_tpl->tpl_vars['editor_picks']->value) {
                ?>
		<div class="row">
	        <div class="col-md-8">
				<!-- Editor Pick Video Main Container START //-->
				<div id="ep_video_container">
					<?php 
                if (is_installed('editorspick')) {
                    ?>
					<?php 
                    if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list'])) {
                        unset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']);
                    }
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['name'] = 'e_list';
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['editor_picks']->value) ? count($_loop) : max(0, (int) $_loop);
                    unset($_loop);
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] = (int) 1;
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = true;
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] < 0) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'];
                    }
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] = 1;
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] - 1;
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = min(ceil(($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] : $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] + 1) / abs($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'])), $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max']);
                        if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] == 0) {
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = false;
                        }
                    } else {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = 0;
                    }
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                        for ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration']++) {
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'];
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == 1;
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'];
                            ?>
					<?php 
                            echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/editor_pick/video_block.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('video' => $_smarty_tpl->tpl_vars['editor_picks']->value[$_smarty_tpl->getVariable('smarty')->value['section']['e_list']['index']]), 0);
                            ?>

					<?php 
                        }
                    } else {
                        ?>
					There is no video in editor's pick, Please Add Videos In Editor's Pick<br />Videos Manager > Add to editor's pick
					<?php 
                    }
                    ?>
					<?php 
                }
                ?>
				</div>
				
				<!-- Editor Pick Video Main Container END //-->

	        </div>

			<!-- Editor Pick Videos Slider Container START //-->
	        <div class="col-md-4 col-sm-12 col-xs-12 editorpick-holder pull-right custom-elements">
	            <div id="slide" class="scrollable-area">
					<?php 
                if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list'])) {
                    unset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']);
                }
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['name'] = 'e_list';
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['editor_picks']->value) ? count($_loop) : max(0, (int) $_loop);
                unset($_loop);
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = true;
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'];
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] = 1;
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] - 1;
                if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'];
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] == 0) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = false;
                    }
                } else {
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = 0;
                }
                if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                    for ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration']++) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'];
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == 1;
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'];
                        ?>
	            	<?php 
                        echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/editor_pick/index_featured_video.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('video' => $_smarty_tpl->tpl_vars['editor_picks']->value[$_smarty_tpl->getVariable('smarty')->value['section']['e_list']['index']]), 0);
                        ?>

					<?php 
                    }
                }
                ?>
	        	</div>
				<div class="next_pre_hold">
					<a href="#" class="col-md-6 btn btn-primary" id="slide_prev">
					<span class="glyphicon glyphicon-chevron-up"></span>
					</a>
					<a href="#" class="col-md-6 btn btn-primary" id="slide_next">
					<span class="glyphicon glyphicon-chevron-down"></span>
					</a>
				</div>
			</div>
	        <!-- Editor Pick Videos Slider Container END //-->
		</div>
		<?php 
            }
            ?>
		<?php 
        }
        ?>
	    <!-- ******************************************* //-->
		<!-- ************ EDITORS BLOCK END ************ //-->
	    <!-- ******************************************* //-->
	       
	    
	         
	   <!-- <div align="center" class="margin-bottom-10">
	    	<a href="http://www.arvixe.com/clipbucket_hosting">
	    		<img class="banner" src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/assets/images/ad-box-728x90.jpg" >

			</a>
		</div>-->
		<div class="ad"><?php 
        echo getAd(array('place' => 'ad_728x90'), $_smarty_tpl);
        ?>
</div>
		<!-- ******************************************* //-->
		<!-- *********** LATEST VIDEOS START *********** //-->
		<!-- ******************************************* //-->
		<div class="row">
			<div class="col-md-12 clearfix">
				<div class="col-md-8 nopadding padding-right-10 featuredvideos-wrapper">
					<h2 class="myHeading theme_color"><?php 
        echo smarty_lang(array('code' => "Featured Videos"), $_smarty_tpl);
        ?>
</h2>
					<?php 
        if (isset($_smarty_tpl->tpl_vars['featured_videos'])) {
            $_smarty_tpl->tpl_vars['featured_videos'] = clone $_smarty_tpl->tpl_vars['featured_videos'];
            $_smarty_tpl->tpl_vars['featured_videos']->value = get_videos(array('featured' => 'yes', 'limit' => 6));
            $_smarty_tpl->tpl_vars['featured_videos']->nocache = null;
            $_smarty_tpl->tpl_vars['featured_videos']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['featured_videos'] = new Smarty_variable(get_videos(array('featured' => 'yes', 'limit' => 6)), null, 0);
        }
        ?>
					<?php 
        if ($_smarty_tpl->tpl_vars['featured_videos']->value) {
            ?>
					<div class="col-md-12 featured-videos nopadding">
						<div class="col-md-12 text-center nopadding ">
							<div class="col-md-8 text-center nopadding mouse_hover featured-imglg">
							
								<?php 
            if (isset($_smarty_tpl->tpl_vars['video_01'])) {
                $_smarty_tpl->tpl_vars['video_01'] = clone $_smarty_tpl->tpl_vars['video_01'];
                $_smarty_tpl->tpl_vars['video_01']->value = $_smarty_tpl->tpl_vars['featured_videos']->value[0];
                $_smarty_tpl->tpl_vars['video_01']->nocache = null;
                $_smarty_tpl->tpl_vars['video_01']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['video_01'] = new Smarty_variable($_smarty_tpl->tpl_vars['featured_videos']->value[0], null, 0);
            }
            ?>
								<div class="col-md-12 text-center nopadding video_thumb_lg">
									<a href="<?php 
            echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['video_01']->value), $_smarty_tpl);
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['video_01']->value['title'];
            ?>
">
										<span class="play-icon fa fa-play"></span>
										<img class="cb_img_thum" src="<?php 
            echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video_01']->value, 'num' => '4', 'size' => 'big'), $_smarty_tpl);
            ?>
" width="500" height="285" border="0" <?php 
            echo ANCHOR(array('place' => "video_thumb", 'data' => $_smarty_tpl->tpl_vars['video_01']->value), $_smarty_tpl);
            ?>
 />
									</a>
									<div class="cbHomeVidTitle cbHomeVidTitle_Big mouse_hover_on"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video_01']->value['title'], 30);
            ?>
</div>
								</div>
					            <div class="cbHomeVidDuration mouse_hover_on">
					            <?php 
            if ($_smarty_tpl->tpl_vars['video_01']->value['duration'] > 1) {
                echo SetTime($_smarty_tpl->tpl_vars['video_01']->value['duration']);
            } else {
                ?>
00:00ewwew<?php 
            }
            ?>
					            </div>
					            <div class="cbHomeVidDuration_left mouse_hover_on">
					            	<?php 
            echo $_smarty_tpl->tpl_vars['video_01']->value['username'];
            ?>

					            </div>
							</div>
							<div class="col-md-4 col-sm-6 hidden-xs text-center nopadding-right pull-right tumb-sm">
							<?php 
            $_smarty_tpl->tpl_vars['video_02'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['video_02']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['featured_videos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['video_02']->iteration = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars['video_02']->key => $_smarty_tpl->tpl_vars['video_02']->value) {
                $_smarty_tpl->tpl_vars['video_02']->_loop = true;
                $_smarty_tpl->tpl_vars['video_02']->iteration++;
                ?>
								<?php 
                if ($_smarty_tpl->tpl_vars['video_02']->iteration > 1 && $_smarty_tpl->tpl_vars['video_02']->iteration < 4) {
                    ?>
								<div class="col-md-12 text-center nopadding mouse_hover1 featured-video video_thumb" style="<?php 
                    if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['foo']['last']) {
                        ?>
 <?php 
                    }
                    ?>
 " >
									<a href="<?php 
                    echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
" title="<?php 
                    echo $_smarty_tpl->tpl_vars['video_02']->value['title'];
                    ?>
">
										<span class="play-icon fa fa-play"></span>
										<img class="cb_img_thum" src="<?php 
                    echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value, 'size' => '240x133'), $_smarty_tpl);
                    ?>
" width="240" height="133" <?php 
                    echo ANCHOR(array('place' => "video_thumb", 'data' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
 />
										<div class="cbHomeVidTitle mouse_hover_on1"><?php 
                    echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video_02']->value['title'], 10);
                    ?>
</div>
										<div class="cbHomeVidDuration mouse_hover_on1">
						            		<?php 
                    if ($_smarty_tpl->tpl_vars['video_02']->value['duration'] > 1) {
                        echo SetTime($_smarty_tpl->tpl_vars['video_02']->value['duration']);
                    } else {
                        ?>
00:00<?php 
                    }
                    ?>
						            	</div>
									</a>
								</div>
								<?php 
                }
                ?>

							<?php 
            }
            ?>
							</div>
							<div class="col-lg-12 col-md-12 text-center nopadding">
							<?php 
            $_smarty_tpl->tpl_vars['video_02'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['video_02']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['featured_videos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['video_02']->iteration = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars['video_02']->key => $_smarty_tpl->tpl_vars['video_02']->value) {
                $_smarty_tpl->tpl_vars['video_02']->_loop = true;
                $_smarty_tpl->tpl_vars['video_02']->iteration++;
                ?>
							<?php 
                if ($_smarty_tpl->tpl_vars['video_02']->iteration > 3) {
                    ?>
								<div class="col-lg-4 col-md-4 col-sm-6 hidden-xs video_thumb text-center nopadding-right mouse_hover featured-video <?php 
                    if ($_smarty_tpl->tpl_vars['video_02']->iteration == 4) {
                        ?>
nopadding<?php 
                    }
                    ?>
 ">
									<a href="<?php 
                    echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
" title="<?php 
                    echo $_smarty_tpl->tpl_vars['video_02']->value['title'];
                    ?>
">
										<span class="play-icon fa fa-play"></span>
										<img class="cb_img_thum" src="<?php 
                    echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value, 'size' => '240x133'), $_smarty_tpl);
                    ?>
" width="240" height="133" <?php 
                    echo ANCHOR(array('place' => "video_thumb", 'data' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
 />
									
										<div class="cbHomeVidTitle mouse_hover_on"><?php 
                    echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video_02']->value['title'], 10);
                    ?>
</div>

										<div class="cbHomeVidDuration mouse_hover_on">
							            <?php 
                    if ($_smarty_tpl->tpl_vars['video_02']->value['duration'] > 1) {
                        echo SetTime($_smarty_tpl->tpl_vars['video_02']->value['duration']);
                    } else {
                        ?>
00:00<?php 
                    }
                    ?>
							            </div>
									</a>
								</div>
							<?php 
                }
                ?>
							<?php 
            }
            ?>
							</div>
			                
			            </div>
					
		        		<div class="clearfix"></div>    
					</div>
					<?php 
        } else {
            ?>
					<div class="col-md-12 nopadding">No featured Video</div>
					<?php 
        }
        ?>
			        <div class="clearfix"></div>
			        <div class="row nopadding">
			        	<h3 class="myHeading theme_color"><?php 
        echo lang('Recent videos');
        ?>
</h3>
			        	<?php 
        if (isset($_smarty_tpl->tpl_vars['videos'])) {
            $_smarty_tpl->tpl_vars['videos'] = clone $_smarty_tpl->tpl_vars['videos'];
            $_smarty_tpl->tpl_vars['videos']->value = get_videos(array("order" => "date_added DESC", "limit" => 12));
            $_smarty_tpl->tpl_vars['videos']->nocache = null;
            $_smarty_tpl->tpl_vars['videos']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['videos'] = new Smarty_variable(get_videos(array("order" => "date_added DESC", "limit" => 12)), null, 0);
        }
        ?>
						<div class="clearfix recent-videos row">
				        	<?php 
        $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['video']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['videos']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) {
            $_smarty_tpl->tpl_vars['video']->_loop = true;
            ?>

				        	<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 mbm cb-video-fixed-block">
				        		<!-- <div class="marginBottom grid_view recent-col list_view nopadding-right"> -->
								<?php 
            echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/videos/video.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
            ?>

								<!-- </div> -->
							</div>
				        	<?php 
        }
        ?>
			        	</div>
			        </div>
					
	              	<div class="ad"><?php 
        echo getAd(array('place' => 'ad_468x60'), $_smarty_tpl);
        ?>
</div>
			    	<div class="row nopadding">
			    		<?php 
        if ($_smarty_tpl->tpl_vars['row']->value['photosSection'] == 'yes') {
            ?>
						<div class="col-md-12 clearfix nopadding ">
			        		<h2 class="myHeading theme_color"><?php 
            echo smarty_lang(array('code' => "Photos"), $_smarty_tpl);
            ?>
</h2>
							<?php 
            if (isset($_smarty_tpl->tpl_vars['result_photos1_01'])) {
                $_smarty_tpl->tpl_vars['result_photos1_01'] = clone $_smarty_tpl->tpl_vars['result_photos1_01'];
                $_smarty_tpl->tpl_vars['result_photos1_01']->value = get_photos(array('order' => ' RAND() LIMIT 15 '));
                $_smarty_tpl->tpl_vars['result_photos1_01']->nocache = null;
                $_smarty_tpl->tpl_vars['result_photos1_01']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['result_photos1_01'] = new Smarty_variable(get_photos(array('order' => ' RAND() LIMIT 15 ')), null, 0);
            }
            ?>
		
			        		<?php 
            if ($_smarty_tpl->tpl_vars['result_photos1_01']->value) {
                ?>
	        				<!-- *********** FIRST PHOTOS START ************ //-->
	        				<!-- <div class="row clearfix fill-background lg-img"> -->
							<div class="clearfix featured-images">
								<div class="clearfix">
								<?php 
                $_smarty_tpl->tpl_vars['result_photo1_01'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['result_photo1_01']->_loop = false;
                $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable();
                $_from = $_smarty_tpl->tpl_vars['result_photos1_01']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['result_photo1_01']->key => $_smarty_tpl->tpl_vars['result_photo1_01']->value) {
                    $_smarty_tpl->tpl_vars['result_photo1_01']->_loop = true;
                    $_smarty_tpl->tpl_vars['i']->value = $_smarty_tpl->tpl_vars['result_photo1_01']->key;
                    ?>
									
								<?php 
                    if ($_smarty_tpl->tpl_vars['i']->value == 0) {
                        ?>
			

									<div class="ft-img col-md-7">
									

						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => "cb_img_thum"), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						          
						            </div>
						        <?php 
                    } elseif ($_smarty_tpl->tpl_vars['i']->value < 3) {
                        ?>
    

						           
						            
									
									<div class="ft-img col-md-5">
						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_08']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						           
						       	    </div>
						           
								<?php 
                    } elseif ($_smarty_tpl->tpl_vars['i']->value < 7) {
                        ?>
						           
									<div class="ft-img col-md-6">
						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_08']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						            
						       	    </div>
						            
								<?php 
                    } else {
                        ?>
			
						           
									<div class="ft-img col-md-3" style="height:140px;">
						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_08']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						            
						       	    </div>
						         <?php 
                    }
                    ?>
   
						        
						        <?php 
                }
                ?>
						        </div>
								<!-- </div> -->
							</div>
					        <!-- *********** FIRST PHOTOS END ************ //-->
				     		<?php 
            }
            ?>

							<?php 
            if (isset($_smarty_tpl->tpl_vars['result_photos2_08'])) {
                $_smarty_tpl->tpl_vars['result_photos2_08'] = clone $_smarty_tpl->tpl_vars['result_photos2_08'];
                $_smarty_tpl->tpl_vars['result_photos2_08']->value = get_photos(array('order' => '  photo_id ASC LIMIT 4 '));
                $_smarty_tpl->tpl_vars['result_photos2_08']->nocache = null;
                $_smarty_tpl->tpl_vars['result_photos2_08']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['result_photos2_08'] = new Smarty_variable(get_photos(array('order' => '  photo_id ASC LIMIT 4 ')), null, 0);
            }
            ?>
						    
						    <?php 
            if ($_smarty_tpl->tpl_vars['result_photos2_08']->value) {
                ?>
 		
					        <!-- *********** SECOND PHOTOS START ************ //-->
							<!-- <div class="col-md-12 fill-background clearfix lg-img">
						        <div class="col-md-5 nopadding sm-imgs clearfix left-aligned">
								<?php 
                $_smarty_tpl->tpl_vars['result_photo2_08'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['result_photo2_08']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['result_photos2_08']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['result_photo2_08']->key => $_smarty_tpl->tpl_vars['result_photo2_08']->value) {
                    $_smarty_tpl->tpl_vars['result_photo2_08']->_loop = true;
                    ?>
									<div class="col-md-6 col-sm-6">
						        	<a href="<?php 
                    echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo2_08']->value, 'view_item');
                    ?>
">
						        	<?php 
                    echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo2_08']->value, 'output' => 'html', 'width' => "128", 'height' => "118", 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                    ?>

						        	</a>
						        <?php 
                    if ($_smarty_tpl->tpl_vars['photos']->iteration > 1) {
                        break 1;
                    }
                    ?>
						   	    </div>
						        <?php 
                }
                ?>
								</div>
								<?php 
                if (isset($_smarty_tpl->tpl_vars['result_photos2_01'])) {
                    $_smarty_tpl->tpl_vars['result_photos2_01'] = clone $_smarty_tpl->tpl_vars['result_photos2_01'];
                    $_smarty_tpl->tpl_vars['result_photos2_01']->value = get_photos(array('order' => '  RAND() LIMIT 1 '));
                    $_smarty_tpl->tpl_vars['result_photos2_01']->nocache = null;
                    $_smarty_tpl->tpl_vars['result_photos2_01']->scope = 0;
                } else {
                    $_smarty_tpl->tpl_vars['result_photos2_01'] = new Smarty_variable(get_photos(array('order' => '  RAND() LIMIT 1 ')), null, 0);
                }
                ?>
								<div class="col-md-7 big_img">
								<?php 
                $_smarty_tpl->tpl_vars['result_photo2_01'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['result_photo2_01']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['result_photos2_01']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['result_photo2_01']->key => $_smarty_tpl->tpl_vars['result_photo2_01']->value) {
                    $_smarty_tpl->tpl_vars['result_photo2_01']->_loop = true;
                    ?>
						        	<a href="<?php 
                    echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo2_01']->value, 'view_item');
                    ?>
">
						        	<?php 
                    echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo2_01']->value, 'output' => 'html', 'width' => "420", 'height' => "235", 'size' => "l", 'class' => "cb_img_thum"), $_smarty_tpl);
                    ?>

						        	</a>
						        <?php 
                }
                ?>
						        </div>
							</div> -->
							<!-- *********** SECOND PHOTOS END ************ //-->
							<?php 
            }
            ?>
						</div>
						<?php 
        } else {
            ?>
						<div class="col-md-12 nopadding">No featured Photo</div>
						<?php 
        }
        ?>
	
					</div>

			        <!-- ******************************************* //-->
			        <!-- *********** PHOTOS END ************ //-->
			        <!-- ******************************************* //-->

				</div>
				<!-- ******************************************* //-->
		        <!-- ******** ADVERTISEMENT BLOCK START ******** //-->
		        <!-- ******************************************* //-->
				<!--<div class="col-md-4" style="background-color:#F2F2F2; padding-top:10px; padding-bottom:10px; margin-bottom:10px;">
				<h2 class="myHeadingBLK" style="margin-top:0;">Advertisement</h2>
					<div class="col-md-12 text-center nopadding" style="font-size:18px; border:1px solid #CCC; background:#FFF; display:block; height: 250px; width: 300px; line-height: 200px; text-align:center; left:7%;">
					Ad Box 300 x 250
					</div>
				</div>-->
				<!-- ******************************************* //-->
		        <!-- ******** ADVERTISEMENT BLOCK END ******** //-->
		        <!-- ******************************************* //-->


				<!-- ******************************************* //-->
		        <!-- ************* USER BLOCK START ************ //-->
		        <!-- ******************************************* //-->
				<?php 
        if (isset($_smarty_tpl->tpl_vars['feature_users'])) {
            $_smarty_tpl->tpl_vars['feature_users'] = clone $_smarty_tpl->tpl_vars['feature_users'];
            $_smarty_tpl->tpl_vars['feature_users']->value = get_users(array('featured' => 'yes', 'limit' => 5));
            $_smarty_tpl->tpl_vars['feature_users']->nocache = null;
            $_smarty_tpl->tpl_vars['feature_users']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['feature_users'] = new Smarty_variable(get_users(array('featured' => 'yes', 'limit' => 5)), null, 0);
        }
        ?>
				<?php 
        if ($_smarty_tpl->tpl_vars['feature_users']->value) {
            ?>
	     		<div class="col-md-4 side_user_home">
					<h2 class="myHeading theme_color"><?php 
            echo smarty_lang(array('code' => "Featured Users"), $_smarty_tpl);
            ?>
</h2>
	               
	               <?php 
            $_smarty_tpl->tpl_vars['user'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['user']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['feature_users']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['user']->key => $_smarty_tpl->tpl_vars['user']->value) {
                $_smarty_tpl->tpl_vars['user']->_loop = true;
                ?>
					
	                <div class="col-md-12 nopadding clearfix user-view-home">
						<div class="col-md-3 nopadding">
							<img src="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->getuserthumb($_smarty_tpl->tpl_vars['user']->value, 'small');
                ?>
" width="56" height="56" class="img-circle" />
						</div>
						<div class="col-md-9 nopadding">
							<h4 class="nopadding "><a href="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['user']->value);
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['user']->value['username'];
                ?>
</a></h4>

							<div class=" nopadding col-md-6 min-height-20">
								<div class="pull-left small"><span class="bg-eye"></span>&nbsp;<span><?php 
                echo number_format($_smarty_tpl->tpl_vars['user']->value['profile_hits']);
                ?>
 <?php 
                echo smarty_lang(array('code' => 'views'), $_smarty_tpl);
                ?>
</span></div>
								<div class="pull-right small"><span class="bg-videocam"></span>&nbsp;<span><?php 
                echo number_format($_smarty_tpl->tpl_vars['user']->value['total_videos']);
                ?>
 <?php 
                echo smarty_lang(array('code' => 'Videos'), $_smarty_tpl);
                ?>
</span></div>
							</div>
		                    <br>
		                    <div class="row pull-left" style="margin-left: 0px; width: 99%;">
			                    <div class="progres">
			                        <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
			                            <span class="sr-only">40% Complete (success)</span>
			                        </div>
			                    </div>
		                    </div>
							<!--<div class="col-md-12 nopadding progress no-border-radius">
			      				<div style="width: 40%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="40" role="progressbar" class="progress-bar progress-bar-success">
			        			<span class="sr-only">40% Complete (success)</span>
			  					</div>
			    			</div>-->
						</div>
						<div class="user_icon">
							<a href="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['user']->value);
                ?>
">
							<img class="" src="<?php 
                echo $_smarty_tpl->tpl_vars['imageurl']->value;
                ?>
/user_next_icon.png" width="25" height="25" />
							</a>
						</div>
					</div>
					<?php 
            }
            ?>
				</div>
				<?php 
        }
        ?>
				<!-- ******************************************* //-->
		        <!-- ************* USER BLOCK END ************ //-->
		        <!-- ******************************************* //-->
		        <?php 
        if ($_smarty_tpl->tpl_vars['row']->value['collectionsSection'] == 'yes') {
            ?>
				<?php 
            if (isset($_smarty_tpl->tpl_vars['collections'])) {
                $_smarty_tpl->tpl_vars['collections'] = clone $_smarty_tpl->tpl_vars['collections'];
                $_smarty_tpl->tpl_vars['collections']->value = $_smarty_tpl->tpl_vars['cbcollection']->value->get_collections(array('limit' => 5, 'active' => 'yes'));
                $_smarty_tpl->tpl_vars['collections']->nocache = null;
                $_smarty_tpl->tpl_vars['collections']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['collections'] = new Smarty_variable($_smarty_tpl->tpl_vars['cbcollection']->value->get_collections(array('limit' => 5, 'active' => 'yes')), null, 0);
            }
            ?>
				<div class="col-md-4 comment_home side_user_home" >
					<h2 class="myHeading"><?php 
            echo smarty_lang(array('code' => "Top Collections"), $_smarty_tpl);
            ?>
</h2>
					<?php 
            if (isset($_smarty_tpl->tpl_vars['limit'])) {
                $_smarty_tpl->tpl_vars['limit'] = clone $_smarty_tpl->tpl_vars['limit'];
                $_smarty_tpl->tpl_vars['limit']->value = 10;
                $_smarty_tpl->tpl_vars['limit']->nocache = null;
                $_smarty_tpl->tpl_vars['limit']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['limit'] = new Smarty_variable(10, null, 0);
            }
            ?>
		        	<?php 
            if ($_smarty_tpl->tpl_vars['collections']->value) {
                ?>
        
					<?php 
                $_smarty_tpl->tpl_vars['collection'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['collection']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['collections']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['collection']->key => $_smarty_tpl->tpl_vars['collection']->value) {
                    $_smarty_tpl->tpl_vars['collection']->_loop = true;
                    ?>
					<div class="clearfix collection-section">
						<div class="category-header row clearfix">
							<div class="col-sm-6 clearfix"><?php 
                    echo $_smarty_tpl->tpl_vars['collection']->value['collection_name'];
                    ?>
</div>
							<div class="col-sm-6 clearfix"><span class="total-obj"><?php 
                    echo $_smarty_tpl->tpl_vars['collection']->value['total_objects'];
                    ?>
</span></div>

							<!--  -->
							<!-- <div class="col-sm-6 clearfix"><span class="total-obj"><?php 
                    echo $_smarty_tpl->tpl_vars['limit']->value;
                    ?>
</span></div> -->
						</div>
						<div class="collection-grid clearfix"> 
						<?php 
                    if ($_smarty_tpl->tpl_vars['collection']->value['type'] == 'photos') {
                        ?>
							<?php 
                        if (isset($_smarty_tpl->tpl_vars['items'])) {
                            $_smarty_tpl->tpl_vars['items'] = clone $_smarty_tpl->tpl_vars['items'];
                            $_smarty_tpl->tpl_vars['items']->value = $_smarty_tpl->tpl_vars['cbphoto']->value->collection->get_collection_items_with_details($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false);
                            $_smarty_tpl->tpl_vars['items']->nocache = null;
                            $_smarty_tpl->tpl_vars['items']->scope = 0;
                        } else {
                            $_smarty_tpl->tpl_vars['items'] = new Smarty_variable($_smarty_tpl->tpl_vars['cbphoto']->value->collection->get_collection_items_with_details($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false), null, 0);
                        }
                        ?>
						<?php 
                    } else {
                        ?>
							<?php 
                        if (isset($_smarty_tpl->tpl_vars['items'])) {
                            $_smarty_tpl->tpl_vars['items'] = clone $_smarty_tpl->tpl_vars['items'];
                            $_smarty_tpl->tpl_vars['items']->value = get_videos_of_collection($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false);
                            $_smarty_tpl->tpl_vars['items']->nocache = null;
                            $_smarty_tpl->tpl_vars['items']->scope = 0;
                        } else {
                            $_smarty_tpl->tpl_vars['items'] = new Smarty_variable(get_videos_of_collection($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false), null, 0);
                        }
                        ?>
						<?php 
                    }
                    ?>
	



						<?php 
                    if ($_smarty_tpl->tpl_vars['items']->value) {
                        ?>
							<?php 
                        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['item']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['items']->value;
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                            $_smarty_tpl->tpl_vars['item']->_loop = true;
                            ?>
								<div class="collection-item">
									<a href="<?php 
                            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['item']->value, 'view_item');
                            ?>
">
										<?php 
                            if ($_smarty_tpl->tpl_vars['collection']->value['type'] == 'photos') {
                                ?>
											<?php 
                                echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['item']->value, 'output' => 'html', 'size' => "l", 'class' => "cb_img_thum"), $_smarty_tpl);
                                ?>

										<?php 
                            } else {
                                ?>
											<img alt="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['title'];
                                ?>
" title="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['title'];
                                ?>
" class="cb_img_thum" id="photo_<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['ci_id'];
                                ?>
" src="<?php 
                                echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['item']->value), $_smarty_tpl);
                                ?>
">
										<?php 
                            }
                            ?>
									</a>
								</div>
							<?php 
                        }
                        ?>
						<?php 
                    }
                    ?>
						</div>
					</div>

					<?php 
                }
                ?>
					<?php 
            } else {
                ?>
					<div class="col-md-12 nopadding">No Collection</div>
					<?php 
            }
            ?>
		    	</div>
		    	<?php 
        }
        ?>
				
				<?php 
        if (isset($_smarty_tpl->tpl_vars['playlists'])) {
            $_smarty_tpl->tpl_vars['playlists'] = clone $_smarty_tpl->tpl_vars['playlists'];
            $_smarty_tpl->tpl_vars['playlists']->value = get_playlists(array('limit' => 5, 'order' => 'total_items DESC'));
            $_smarty_tpl->tpl_vars['playlists']->nocache = null;
            $_smarty_tpl->tpl_vars['playlists']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['playlists'] = new Smarty_variable(get_playlists(array('limit' => 5, 'order' => 'total_items DESC')), null, 0);
        }
        ?>
                <div class="col-md-4 comment_home side_user_home " >
                	<h2 class="myHeading"><?php 
        echo smarty_lang(array('code' => "Top Playlists"), $_smarty_tpl);
        ?>
</h2>
                	<?php 
        if ($_smarty_tpl->tpl_vars['playlists']->value) {
            ?>
					<?php 
            $_smarty_tpl->tpl_vars['playlist'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['playlist']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['playlists']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['playlist']->key => $_smarty_tpl->tpl_vars['playlist']->value) {
                $_smarty_tpl->tpl_vars['playlist']->_loop = true;
                ?>

						<div class="clearfix collection-section">
							<div class="category-header row clearfix">
								<div class="col-sm-6 clearfix"><span class=""><?php 
                echo $_smarty_tpl->tpl_vars['playlist']->value['playlist_name'];
                ?>
</span></div>
								<div class="col-sm-6 clearfix">
									<span class="total-obj">
										<?php 
                echo number_format($_smarty_tpl->tpl_vars['cbvid']->value->action->count_playlist_items($_smarty_tpl->tpl_vars['playlist']->value['playlist_id']));
                ?>

									</span>
								</div>
                            </div>

							<div class="collection-grid clearfix"> 
							<?php 
                if (isset($_smarty_tpl->tpl_vars['items'])) {
                    $_smarty_tpl->tpl_vars['items'] = clone $_smarty_tpl->tpl_vars['items'];
                    $_smarty_tpl->tpl_vars['items']->value = get_playlist_items($_smarty_tpl->tpl_vars['playlist']->value['playlist_id']);
                    $_smarty_tpl->tpl_vars['items']->nocache = null;
                    $_smarty_tpl->tpl_vars['items']->scope = 0;
                } else {
                    $_smarty_tpl->tpl_vars['items'] = new Smarty_variable(get_playlist_items($_smarty_tpl->tpl_vars['playlist']->value['playlist_id']), null, 0);
                }
                ?>
								<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['items']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
								    <div class="collection-item">
										    <?php 
                    if (isset($_smarty_tpl->tpl_vars['videoid'])) {
                        $_smarty_tpl->tpl_vars['videoid'] = clone $_smarty_tpl->tpl_vars['videoid'];
                        $_smarty_tpl->tpl_vars['videoid']->value = $_smarty_tpl->tpl_vars['item']->value['videoid'];
                        $_smarty_tpl->tpl_vars['videoid']->nocache = null;
                        $_smarty_tpl->tpl_vars['videoid']->scope = 0;
                    } else {
                        $_smarty_tpl->tpl_vars['videoid'] = new Smarty_variable($_smarty_tpl->tpl_vars['item']->value['videoid'], null, 0);
                    }
                    ?>
										    <?php 
                    if ($_smarty_tpl->tpl_vars['videoid']->value) {
                        ?>
		                                    <?php 
                        if (isset($_smarty_tpl->tpl_vars['videos'])) {
                            $_smarty_tpl->tpl_vars['videos'] = clone $_smarty_tpl->tpl_vars['videos'];
                            $_smarty_tpl->tpl_vars['videos']->value = get_videos(array('videoid' => $_smarty_tpl->tpl_vars['videoid']->value, 'limit' => '4'));
                            $_smarty_tpl->tpl_vars['videos']->nocache = null;
                            $_smarty_tpl->tpl_vars['videos']->scope = 0;
                        } else {
                            $_smarty_tpl->tpl_vars['videos'] = new Smarty_variable(get_videos(array('videoid' => $_smarty_tpl->tpl_vars['videoid']->value, 'limit' => '4')), null, 0);
                        }
                        ?>
											    <?php 
                        $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['video']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['videos']->value;
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) {
                            $_smarty_tpl->tpl_vars['video']->_loop = true;
                            ?>
				                                    <a href="<?php 
                            echo videoLink($_smarty_tpl->tpl_vars['video']->value);
                            ?>
">
														<?php 
                            if (isset($_smarty_tpl->tpl_vars['thumb'])) {
                                $_smarty_tpl->tpl_vars['thumb'] = clone $_smarty_tpl->tpl_vars['thumb'];
                                $_smarty_tpl->tpl_vars['thumb']->value = get_thumb($_smarty_tpl->tpl_vars['video']->value);
                                $_smarty_tpl->tpl_vars['thumb']->nocache = null;
                                $_smarty_tpl->tpl_vars['thumb']->scope = 0;
                            } else {
                                $_smarty_tpl->tpl_vars['thumb'] = new Smarty_variable(get_thumb($_smarty_tpl->tpl_vars['video']->value), null, 0);
                            }
                            ?>
				                                        <img src="<?php 
                            echo $_smarty_tpl->tpl_vars['thumb']->value;
                            ?>
" />
						                            </a>
												<?php 
                        }
                        ?>
											<?php 
                    } else {
                        ?>
											<span class="label label-default">no items</span>
											<?php 
                    }
                    ?>
                                    </div>
								<?php 
                }
                ?>
							</div>
						</div>	

                    <?php 
            }
            ?>
                    <?php 
        } else {
            ?>
						<div class="col-md-12 nopadding">No Playlists</div>
					<?php 
        }
        ?>
				</div>

			</div>
		</div>
	</div>
	
</div>

<div style="height:20px;"></div>
<script type="text/javascript">
	$(function() {
				
	    $('#slide').ulslide({
	        width: 350,
	        height: 88,
			effect: {
				type: 'carousel', // slide or fade
	            axis: 'y',        // x, y
				showCount: 5
			},
	        nextButton: '#slide_next',
	        prevButton: '#slide_prev',
	        duration: 800,
	        /*autoslide: 2000*/
			easing: 'easeOutBounce'
	    });
	    $('#slide1').ulslide({
	        width: 150,
	        height: 80,
			effect: {
				type: 'carousel', // slide or fade
	            axis: 'x',        // x, y
				showCount: 5
			},
	        nextButton: '#slide_next1',
	        prevButton: '#slide_prev1',
	        duration: 800,
	        autoslide: 2000
			/*easing: 'easeOutBounce'*/
	    });
	    $('#slide3').ulslide({
	        width: 150,
	        height: 80,
			effect: {
				type: 'carousel', // slide or fade
	            axis: 'x',        // x, y
				showCount: 5
			},
	        nextButton: '#slide_next3',
	        prevButton: '#slide_prev3',
	        duration: 800,
	        autoslide: 2000,
			easing: 'easeOutBounce'
	    });
	});
</script>

<!--<style>

.ad{
    background: none repeat scroll 0 0 #F3F3F3;
    border: 1px solid #CCCCCC;
    font-size: 15px;
    height: 90px;
    margin: 0 auto 25px;
    padding: 0;
    text-align: center;
    width: 728px;
}
</style>--><?php 
    }
Example #19
0
    case 'rating':
        $videos = get_videos(array('limit' => $limit, 'order' => 'rating DESC'));
        $title = "Top Rated Videos";
        break;
    case 'watching':
        $videos = get_videos(array('limit' => $limit, 'order' => 'last_viewed DESC'));
        $title = "Videos Being Watched";
        break;
    case 'user':
        $user = mysql_clean($_GET['username']);
        //Get userid from username
        $uid = $userquery->get_user_field_only($user, 'userid');
        $uid = $uid ? $uid : 'x';
        $videos = get_videos(array('limit' => $limit, 'user' => $uid, 'order' => 'date_added DESC'));
        //Count Total Videos of this user
        $total_vids = get_videos(array('count_only' => true, 'user' => $uid));
        $title = "Videos uploaded by " . $user;
        break;
}
subtitle($title);
?>

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title><?php 
echo cbtitle();
?>
</title>
<link><?php 
echo BASEURL;
?>
    function content_56afd77a9b3d52_38469325($_smarty_tpl)
    {
        if (!is_callable('smarty_function_math')) {
            include '/var/www/html/includes/smartyv3/plugins/function.math.php';
        }
        ?>
<div id="navbar" class="navbar navbar-default">
	<div id="navbar" class="navbar-container container">
		<div class="navbar-header pull-left">
            <div class="logoContainer clearfix">
    			<a class="navbar-brand" href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/admin_area">
                    <img class="pull-left" src="<?php 
        echo $_smarty_tpl->tpl_vars['imageurl']->value;
        ?>
/login_logo.png" height="30">                   
                </a>
            </div>
		   </div>
        <div class="navbar-header pull-right" role="navigation">
            <ul class="nav ace-nav">
                <li class="purple">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="icon-bell-alt icon-animated-bell"></i>
                                <span class="badge badge-important"><?php 
        ob_start();
        echo get_videos(array('active' => 'no', 'count_only' => true), $_smarty_tpl);
        $_tmp1 = ob_get_clean();
        ob_start();
        echo get_groups(array('active' => 'no', 'count_only' => true), $_smarty_tpl);
        $_tmp2 = ob_get_clean();
        ob_start();
        echo get_users(array('count_only' => 'yes', 'status' => 'ToActivate'), $_smarty_tpl);
        $_tmp3 = ob_get_clean();
        echo smarty_function_math(array('equation' => "x + a + b + c + d + e", 'x' => $_tmp1, 'a' => $_tmp2, 'b' => $_smarty_tpl->tpl_vars['cbgroup']->value->action->count_flagged_objects(), 'c' => $_smarty_tpl->tpl_vars['cbvid']->value->action->count_flagged_objects(), 'd' => $_smarty_tpl->tpl_vars['userquery']->value->action->count_flagged_objects(), 'e' => $_tmp3), $_smarty_tpl);
        ?>
</span>
                            </a>

                            <ul class="dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-close pull-right">
                                <li class="dropdown-header">
                                    <i class="icon-warning-sign"></i>
                                    <?php 
        ob_start();
        echo get_videos(array('active' => 'no', 'count_only' => true), $_smarty_tpl);
        $_tmp4 = ob_get_clean();
        ob_start();
        echo get_groups(array('active' => 'no', 'count_only' => true), $_smarty_tpl);
        $_tmp5 = ob_get_clean();
        ob_start();
        echo get_users(array('status' => 'ToActivate', 'count_only' => true), $_smarty_tpl);
        $_tmp6 = ob_get_clean();
        echo smarty_function_math(array('equation' => "x + a + b + c + d + e", 'x' => $_tmp4, 'a' => $_tmp5, 'b' => $_smarty_tpl->tpl_vars['cbgroup']->value->action->count_flagged_objects(), 'c' => $_smarty_tpl->tpl_vars['cbvid']->value->action->count_flagged_objects(), 'd' => $_smarty_tpl->tpl_vars['userquery']->value->action->count_flagged_objects(), 'e' => $_tmp6), $_smarty_tpl);
        ?>
 Notifications
                                </li>
                                <li>
                                    <a href="video_manager.php?search=search&active=no">
                                        <div class="clearfix">
                                            <span class="pull-left">
                                                <i class="btn btn-xs no-hover btn-pink icon-facetime-video"></i>
                                                Approve Videos
                                            </span>
                                            <span class="badge badge-info pull-right"><?php 
        echo get_videos(array('active' => 'no', 'count_only' => true), $_smarty_tpl);
        ?>
 </span>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="members.php?search=yes&amp;status=ToActivate">
                                        <div class="clearfix">
                                            <span class="pull-left">
                                                <i class="btn btn-xs no-hover btn-success icon-user"></i>
                                                Approve Members
                                            </span>
                                            <span class="badge badge-success pull-right"><?php 
        echo get_users(array('status' => 'ToActivate', 'count_only' => true), $_smarty_tpl);
        ?>
</span>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="groups_manager.php?active=no&amp;search=yes">
                                        <div class="clearfix">
                                            <span class="pull-left">
                                                <i class="btn btn-xs no-hover btn-info icon-group"></i>
                                                Approve Groups 
                                            </span>
                                            <span class="badge badge-info pull-right"><?php 
        echo get_groups(array('active' => 'no', 'count_only' => true), $_smarty_tpl);
        ?>
</span>
                                        </div>
                                    </a>
                                </li>
                                <li>
                                    <a href="flagged_videos.php">
                                        <div class="clearfix">
                                            <span class="pull-left">
                                                <i class="btn btn-xs no-hover btn-error icon-flag"></i>
                                                Flagged
                                            </span>
                                            <span class="badge badge-info pull-right"><?php 
        echo smarty_function_math(array('equation' => "x + y + z", 'x' => $_smarty_tpl->tpl_vars['cbgroup']->value->action->count_flagged_objects(), 'y' => $_smarty_tpl->tpl_vars['cbvid']->value->action->count_flagged_objects(), 'z' => $_smarty_tpl->tpl_vars['userquery']->value->action->count_flagged_objects()), $_smarty_tpl);
        ?>
 </span>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/admin_area/notification_settings.php">
                                        See all notifications
                                        <i class="icon-arrow-right"></i>
                                    </a>
                                </li>
                            </ul>
                        </li>
                        

                <li class="dropdown blue">
                    <a data-toggle="dropdown" class="dropdown-toggle clickable" href="#">
                        <i class="glyphicon glyphicon-arrow-down"></i>
                        <span class="badge badge-important">Display Option</span>
                    </a>
                    <ul class="dropdown-menu " role="menu" aria-labelledby="dropdownMenu1">
                        <li class="dropdown-header">
                            <i class="icon-info-sign"></i>
                            <form id="display_opts" name="display_opts" method="post" action="">
                                Results Per Page :
                                <input name="admin_pages" type="text" style="width:50px" value="<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['admin_pages'];
        ?>
"/>
                                <input type="submit" name="update_dp_options" id="button" value="Update"  class="btn btn-primary btn-xs"/>
                            </form>
                        </li>
                    </ul>
                </li>

                <li class="blue">
                    <a target="_blank" href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
">
                        <i class="glyphicon glyphicon-home"></i>
                        <span class="badge badge-success"></span>
                    </a>

                <li class="blue">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                        <img src="<?php 
        echo $_smarty_tpl->tpl_vars['userquery']->value->getUserThumb($_smarty_tpl->tpl_vars['u']->value);
        ?>
" class="img-circle" width="25" height="25"/>
								<span class="user-info">
									<?php 
        echo $_smarty_tpl->tpl_vars['userquery']->value->username;
        ?>
<br>
                                    <?php 
        if (isset($_smarty_tpl->tpl_vars['levels'])) {
            $_smarty_tpl->tpl_vars['levels'] = clone $_smarty_tpl->tpl_vars['levels'];
            $_smarty_tpl->tpl_vars['levels']->value = $_smarty_tpl->tpl_vars['userquery']->value->get_levels();
            $_smarty_tpl->tpl_vars['levels']->nocache = null;
            $_smarty_tpl->tpl_vars['levels']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['levels'] = new Smarty_variable($_smarty_tpl->tpl_vars['userquery']->value->get_levels(), null, 0);
        }
        ?>
                                        <?php 
        if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['l'])) {
            unset($_smarty_tpl->tpl_vars['smarty']->value['section']['l']);
        }
        $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['name'] = 'l';
        $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['levels']->value) ? count($_loop) : max(0, (int) $_loop);
        unset($_loop);
        $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['show'] = true;
        $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['loop'];
        $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['step'] = 1;
        $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['loop'] - 1;
        if ($_smarty_tpl->tpl_vars['smarty']->value['section']['l']['show']) {
            $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['loop'];
            if ($_smarty_tpl->tpl_vars['smarty']->value['section']['l']['total'] == 0) {
                $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['show'] = false;
            }
        } else {
            $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['total'] = 0;
        }
        if ($_smarty_tpl->tpl_vars['smarty']->value['section']['l']['show']) {
            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['l']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['iteration']++) {
                $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['iteration'];
                $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['step'];
                $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['step'];
                $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['iteration'] == 1;
                $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['l']['total'];
                ?>
                                    <?php 
                echo $_smarty_tpl->tpl_vars['levels']->value[$_smarty_tpl->getVariable('smarty')->value['section']['l']['index']]['user_level_name'];
                ?>

                                    <?php 
            }
        }
        ?>
								</span>
                        <i class="icon-caret-down"></i>
                    </a>
                    <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                        <li>
                            <a href="main.php">
                                <i class="icon-cog"></i>
                                Settings
                            </a>
                        </li>

                        <li>
                            <a href="index.php">
                                <i class="icon-user"></i>
                                Profile
                            </a>
                        </li>

                        <li class="divider"></li>

                        <li>
                            <a href="logout.php">
                                <i class="icon-off"></i>
                                Logout
                            </a>
                        </li>
                    </ul>
                   </li>
                </ul>
            </div>
    </div>
    </div>
                        <!-- /.navbar-header -->
<!-- /.container -->
<?php 
    }
Example #21
0
    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();
Example #22
0
function cb_get_user_uploaded_videos($content, $key)
{
    global $usercontent, $pages;
    $udetails = $usercontent->get_current_user();
    $page = mysql_clean(get('page'));
    $get_limit = create_query_limit($page, config('videos_items_uvid_page'));
    $videos = get_videos(array('user' => $udetails['userid'], 'limit' => $get_limit));
    $total_rows = get_videos(array('user' => $udetails['userid'], 'count_only' => true));
    $total_pages = count_pages($total_rows, config('videos_items_uvid_page'));
    $pages->paginate($total_pages, $page);
    $params['file'] = 'user_videos.html';
    $params['the_title'] = name($udetails) . " " . lang('videos');
    $params['videos'] = $videos;
    $params['total_videos'] = $total_rows;
    $params['mode'] = 'uploaded';
    subtitle(sprintf(lang("users_videos"), name($udetails)));
    return fetch_template_file($params);
}
function get_pagination($page_previous_class, $page_next_class)
{
    // Variable setup for pagination.
    if (isset($_GET['page'])) {
        $page_number = PAGE_NUMBER;
    } else {
        $page_number = '';
    }
    $page_increment = GALLERY_ITEMS_NUMBER;
    $item_count = get_videos('count', '');
    if ($page_number == '') {
        $previous_page = '1';
        echo '<a class="' . $page_previous_class . '" href="?page=' . $previous_page . '"></a>';
    } elseif ($page_number == '1') {
        $previous_page = $page_number + '1';
        echo '<a class="' . $page_previous_class . '" href="?page=' . $previous_page . '"></a>';
        echo '<a class="' . $page_next_class . '" href="' . SITE_URL . '"></a>';
    } else {
        $next_page = $page_number - '1';
        $previous_page = $page_number + '1';
        // Only display a previous posts link if the item count = the page increment.
        if ($item_count == $page_increment) {
            echo '<a class="' . $page_previous_class . '" href="?page=' . $previous_page . '"></a>';
        }
        echo '<a class="' . $page_next_class . '" href="?page=' . $next_page . '"></a>';
    }
}
          <br />';
        $c++;
    }
    echo "</div>";
    $gallery = ob_get_clean();
    return $gallery;
}
$request = isset($_GET['request']) ? $_GET['request'] : null;
$location = isset($_GET['location']) ? $_GET['location'] : null;
if ($request) {
    $search_path = PLATFORM_BASE_PATH;
    $clips = get_videos($search_path);
    $gallery = build_gallery($clips, $search_path);
    if (!empty($location)) {
        $search_path = $location;
        $clips = get_videos($search_path);
        $gallery .= build_gallery($clips, $search_path);
    }
    if (!empty($gallery)) {
        echo $gallery;
        die;
    } else {
        echo 'No video';
        die;
    }
}
?>
<!DOCTYPE html>
<html>
  <head>
  <title>Media Player</title>