diff --git a/upload/admin_area/manage_playlist.php b/upload/admin_area/manage_playlist.php new file mode 100644 index 00000000..881575af --- /dev/null +++ b/upload/admin_area/manage_playlist.php @@ -0,0 +1,202 @@ +admin_login_check(); + + $pages->page_redir(); + + /* Assigning page and subpage */ + if(!defined('MAIN_PAGE')){ + define('MAIN_PAGE', 'Videos'); + } + if(!defined('SUB_PAGE')){ + define('SUB_PAGE', 'Manage Playlist'); + } + + + $mode = $_GET['mode']; + + $page = mysql_clean($_GET['page']); + $get_limit = create_query_limit($page,VLISTPP); + + + switch($mode) + { + case 'manage_playlist': + case 'manage_video_playlist': + default: + { + + //Deleting Playlist + + if(!empty($_GET['delete_pl'])) + { + $plid = mysql_clean($_GET['delete_pl']); + $cbvid->action->delete_playlist($plid); + } + + if(isset($_POST['delete_playlists'])) + { + $playlists = post('check_playlist'); + + if(count($playlists)>0) + { + foreach($playlists as $playlist) + { + $playlist = mysql_clean($playlist); + $cbvid->action->delete_playlist($playlist); + } + + if(!error()) + { + $eh->flush(); + e(lang("playlists_have_been_removed"),"m"); + }else + { + $eh->flush(); + e(lang("playlist_not_exist")); + } + }else + e(lang("no_playlist_was_selected_to_delete")); + + } + + + + //if search is activated + if(isset($_GET['search'])) + { + + if (!empty($_GET['playlist_name']) && isset($_GET['playlist_name'])){ + $array['playlist_name'] = $_GET['playlist_name']; + } + if (!empty($_GET['tags']) && isset($_GET['tags'])){ + $array['tags'] = $_GET['tags']; + } + if (!empty($_GET['userid']) && isset($_GET['userid'])){ + $array['user'] = $_GET['userid']; + } + } + + + + + assign('mode','manage_playlist'); + + //getting limit for pagination + $page = mysql_clean($_GET['page']); + $get_limit = create_query_limit($page,RESULTS); + + //Getting List of available playlists with pagination + $result_array=$array; + $result_array['limit'] = $get_limit; + if(!$array['order']) + $result_array['order'] = " playlists.date_added DESC "; + $playlists = $cbvid->action->get_playlists($result_array); + + //Collecting Data for Pagination + $pcount = $array; + $pcount['count_only'] = true; + $total_rows = get_playlists($pcount); + $total_pages = count_pages($total_rows,RESULTS); + $pages->paginate($total_pages,$page); + + + assign('playlists',$playlists); + + + + } + + break; + + case 'edit_playlist': + { + + if(isset($_POST['delete_playlist_item'])) + { + $items = post('check_playlist_items'); + + if(count($items)>0) + { + foreach($items as $item) + { + $item = mysql_clean($item); + $cbvid->action->delete_playlist_item($item); + } + + if(!error()) + { + $eh->flush(); + e(lang("playlist_items_have_been_removed"),"m"); + }else + { + $eh->flush(); + e(lang("playlist_item_doesnt_exist")); + } + + }else + e(lang("no_item_was_selected_to_delete")); + } + + assign('mode','edit_playlist'); + $pid = $_GET['pid']; + + if(isset($_POST['edit_playlist'])) + { + #$params = array('name'=>mysql_clean($_POST['name']),'pid'=>mysql_clean($pid)); + $_POST[ 'list_id' ] = $pid; + $cbvid->action->edit_playlist(); + } + + if ( isset( $_POST[ 'upload_playlist_cover' ] ) ) { + $cover = $_FILES[ 'playlist_cover' ]; + $cover[ 'playlist_id' ] = $pid; + + if ( playlist_upload_cover( $cover ) ) { + e( lang( 'Playlist cover has been uploaded' ), 'm' ); + } + + if ( file_exists( $cover[ 'tmp_name' ] ) ) { + unlink( $cover[ 'tmp_name' ] ); + } + } + + $playlist = $cbvid->action->get_playlist($pid); + + //Deleting Item + if(!empty($_GET['delete_item'])) + { + $delid = mysql_clean($_GET['delete_item']); + $cbvid->action->delete_playlist_item($delid); + } + + if($playlist) + { + assign('playlist',$playlist); + //Getting Playlist Item + $items = $cbvid->get_playlist_items( $pid, 'playlist_items.date_added DESC' ); + assign('items',$items); + + }else + e(lang('playlist_not_exist')); + + } + + + break; + } + +//- manageplay front end + + + + template_files('manage_playlist.html'); + display_it(); + ?> \ No newline at end of file diff --git a/upload/admin_area/styles/cb_2014/layout/blocks/advanced_playlist_search.html b/upload/admin_area/styles/cb_2014/layout/blocks/advanced_playlist_search.html new file mode 100644 index 00000000..0a3a7928 --- /dev/null +++ b/upload/admin_area/styles/cb_2014/layout/blocks/advanced_playlist_search.html @@ -0,0 +1,65 @@ +
+ + Advanced Search + + + + +
+ + + + \ No newline at end of file diff --git a/upload/admin_area/styles/cb_2014/layout/blocks/manage/account_video.html b/upload/admin_area/styles/cb_2014/layout/blocks/manage/account_video.html new file mode 100755 index 00000000..ce7b50da --- /dev/null +++ b/upload/admin_area/styles/cb_2014/layout/blocks/manage/account_video.html @@ -0,0 +1,138 @@ +{if $control=='' || $control =='view'} +{if $mode ==''}{assign var='mode' value='favorites'}{/if} + +{/if} + + +{if $control =='full'} + + +
+ + + ({if + $video.duration>1}{$video.duration|SetTime}{else}00:00{/if}) + +
+
+ {$video.title|truncate:80} +
+ + {$video.date_added|niceTime} + {lang code='views'} : {$video.views|number_format} + +
+ {if $video.featured=='yes'} + Featured{else}{/if} + {if $video.active=='yes'}Active{else}InActive{/if} + {if $video.status=='Successful'}Successful{else}Processing{/if} + Viewed {$video.last_viewed|niceTime} +
+
+ + + {* +
+ {if $video.broadcast=='public'} +
+ {elseif $video.broadcast!='public'} +
+ {/if} +
+ {$video.username} + *} + + + + + +{/if} + +{if $control=='playlist'} + + + + + +
+ +

{$video.title|truncate:100}

+
+ view + + delete + +
+
+ + + + {$video.date_added|date_format} + + + {$video.views|number_format} + + + {$video.comments_count|number_format} + + +{/if} + + +{if $control=='basic'} + +
+ +
+ +
+ + +

{$video.title|truncate:100}

+
+
+ +
{$video.date_added|date_format}
+
{$video.views|number_format}
+
{$video.comments_count|number_format}
+ +{/if} + +{if $control=='onWatch'} + +{/if} \ No newline at end of file diff --git a/upload/admin_area/styles/cb_2014/layout/manage_playlist.html b/upload/admin_area/styles/cb_2014/layout/manage_playlist.html new file mode 100644 index 00000000..f8c760f4 --- /dev/null +++ b/upload/admin_area/styles/cb_2014/layout/manage_playlist.html @@ -0,0 +1,119 @@ + + +{$myAccountLinks = $userquery->my_account_links()} +
+
+
+ +
+
+
+ + + {include file="$style_dir/blocks/pagination.html" } +
\ No newline at end of file diff --git a/upload/admin_area/styles/cb_2014/layout/members.html b/upload/admin_area/styles/cb_2014/layout/members.html index 48e1be47..a4767602 100644 --- a/upload/admin_area/styles/cb_2014/layout/members.html +++ b/upload/admin_area/styles/cb_2014/layout/members.html @@ -88,7 +88,8 @@