Admin Area
Fixed and Update: Video manager page,Manage categoy page Videos,List Flagged Videos, Mass Upload,List Inactive Videos
This commit is contained in:
parent
259127204a
commit
44be1a65a4
11 changed files with 90 additions and 32 deletions
|
@ -12,6 +12,17 @@ $userquery->admin_login_check();
|
|||
$userquery->login_check('video_moderation');
|
||||
$pages->page_redir();
|
||||
|
||||
|
||||
if(!defined('MAIN_PAGE')){
|
||||
define('MAIN_PAGE', 'Videos');
|
||||
}
|
||||
if(!defined('SUB_PAGE')){
|
||||
if($_GET['active'] == 'no')
|
||||
define('SUB_PAGE', 'List Inactive Videos');
|
||||
else
|
||||
define('SUB_PAGE', 'Videos Manager');
|
||||
}
|
||||
|
||||
if(@$_GET['msg']){
|
||||
$msg[] = clean($_GET['msg']);
|
||||
}
|
||||
|
@ -21,6 +32,7 @@ $msg[] = clean($_GET['msg']);
|
|||
|
||||
//Updating Video Details
|
||||
if(isset($_POST['update'])){
|
||||
|
||||
$Upload->validate_video_upload_form();
|
||||
if(empty($eh->error_list))
|
||||
{
|
||||
|
|
|
@ -11,6 +11,15 @@ require_once '../includes/admin_config.php';
|
|||
$userquery->admin_login_check();
|
||||
$pages->page_redir();
|
||||
|
||||
|
||||
|
||||
if(!defined('MAIN_PAGE')){
|
||||
define('MAIN_PAGE', 'Videos');
|
||||
}
|
||||
if(!defined('SUB_PAGE')){
|
||||
define('SUB_PAGE', "Editor's Pick");
|
||||
}
|
||||
|
||||
//Removing
|
||||
if(isset($_GET['remove'])){
|
||||
$id = mysql_clean($_GET['remove']);
|
||||
|
|
|
@ -16,7 +16,7 @@ if(!defined('MAIN_PAGE')){
|
|||
define('MAIN_PAGE', 'Videos');
|
||||
}
|
||||
if(!defined('SUB_PAGE')){
|
||||
define('SUB_PAGE', 'Upload Videos');
|
||||
define('SUB_PAGE', 'Mass Upload Videos');
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,7 +74,14 @@ if(count($error_lists)>0)
|
|||
e($e);
|
||||
}
|
||||
|
||||
//Collecting Data for Pagination
|
||||
$total_rows=count($cbmass->get_video_files());
|
||||
$total_pages = $total_rows/$limit;
|
||||
$total_pages = round($total_pages+0.49,0);
|
||||
$pages->paginate($total_pages,$page);
|
||||
|
||||
subtitle("Mass Uploader");
|
||||
|
||||
template_files("mass_uploader.html");
|
||||
display_it();
|
||||
?>
|
|
@ -4,7 +4,7 @@
|
|||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="form-control"></th>
|
||||
<th><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></th>
|
||||
<th>CID</th>
|
||||
<th>UID</th>
|
||||
<th>Email</th>
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
<form name="category" action="?update_order" method="post">
|
||||
<table class="table table-bordered" width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
|
||||
<td width="225" class="left_head" style="text-indent:10px">Category Name</td>
|
||||
<td width="75" align="left" class="head">Order</td>
|
||||
<td width="225" align="left" class="head">Parent Category</td>
|
||||
|
@ -100,6 +101,9 @@
|
|||
</script>
|
||||
|
||||
<tr bgcolor="{$bgcolor}" class="item_listing">
|
||||
<td>
|
||||
<input name="check_user[]" type="checkbox" id="check_user" value="{$u.userid}" />
|
||||
</td>
|
||||
<td style="text-indent:10px">{$category[list].category_name} - <a id="thumbs_{$category[list].category_id}" title="<img src='{$cbvid->get_category_thumb($category[list])}' />" href="javascript:void(0)">View Thumb</a></td>
|
||||
<td >
|
||||
<input name="category_order_{$category[list].category_id}" type="text" id="order" style="border:1px solid #999; padding:2px; width:30px" value="{$category[list].category_order}" size="5" maxlength="5" /></td>
|
||||
|
@ -116,10 +120,11 @@
|
|||
<button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown">Options <i class="caret"></i></button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1" role="menu">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="?category={$category[list].category_id}">Edit</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:_cb.Confirm_Delete('?delete_category={$category[list].category_id}')">Delete</a>
|
||||
{if $category[list].isdefault!="yes"}</li>
|
||||
<li><a href="?make_default={$category[list].category_id}">Make Default</a></li>{/if}
|
||||
</ul>
|
||||
{if $category[list].isdefault!="yes"}
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:_cb.Confirm_Delete('?delete_category={$category[list].category_id}')">Delete</a>
|
||||
</li>
|
||||
<li><a href="?make_default={$category[list].category_id}">Make Default</a></li>{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
<legend>Important Details</legend>
|
||||
<div class="form-group">
|
||||
<label for="videoid">Video Id</label>
|
||||
<input class="form-control" disabled="disabled" name="videoid" type="text" id="videoid" value="{$data.videoid}" size="45"/>
|
||||
<input class="form-control" disabled="disabled" name="videoid1" type="text" id="videoid" value="{$data.videoid}" size="45"/>
|
||||
<input class="form-control" name="videoid" type="hidden" id="videoid" value="{$data.videoid}"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="videokey">Video Key</label>
|
||||
|
@ -58,7 +59,7 @@
|
|||
<a class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown" href="">Thumbs <i class="caret"></i></a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
|
||||
{if $data.embeded !=yes}
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="upload_thumbs.php?video={$data.videoid};gen_more=true">Regenerate</a>{/if}
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="upload_thumbs.php?video={$data.videoid}&gen_more=true">Regenerate</a>{/if}
|
||||
</li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="upload_thumbs.php?video={$data.videoid}">Manage</a></li>
|
||||
</ul>
|
||||
|
@ -127,21 +128,26 @@
|
|||
<div class="head">Viewing {$data.title}
|
||||
{FlashPlayer vdetails = $data width='100%' autoplay='false'}
|
||||
{foreach from=$video_fields item=field_group}
|
||||
<legend>{$field_group.group_name}</legend>
|
||||
{foreach from=$field_group.fields item=field}
|
||||
<div class="form-group">
|
||||
{$field.class='form-control'}
|
||||
<label><strong>{$field.title}</strong></label> <br>
|
||||
{if $field.type=='radio'}
|
||||
{$field.class='form-control'}
|
||||
{else}{$field.class='form-control'}
|
||||
{/if}
|
||||
{if $field.hint_1}{$field.hint_1}<br/>{/if}
|
||||
{$formObj->createField($field)}
|
||||
{if $field.hint_2}<br/>{$field.hint_2}{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
<legend>{$field_group.group_name}</legend>
|
||||
{foreach from=$field_group.fields item=field}
|
||||
<div class="form-group">
|
||||
{$field.class='form-control'}
|
||||
<label><strong>{$field.title}</strong></label> <br>
|
||||
{if $field.type=='radio'}
|
||||
{$field.class='form-control'}
|
||||
{else}
|
||||
{$field.class='form-control'}
|
||||
{/if}
|
||||
{if $field.hint_1}
|
||||
{$field.hint_1}<br/>
|
||||
{/if}
|
||||
{$formObj->createField($field)}
|
||||
{if $field.hint_2}<br/>
|
||||
{$field.hint_2}
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<table class="table table-bordered table-striped manageUsersTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="checkall" onclick="_cb.checkUncheckAll(this);"/></td>
|
||||
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
|
||||
<td>VID</td>
|
||||
<td>Details</td>
|
||||
<td> </td>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<span class="labels1">{$videos[list].date_added|niceTime}
|
||||
{lang code='views'} : {$videos.views|number_format}</span>
|
||||
<div class="labels">
|
||||
<span class="label {if $video.status == Ok}label-success{else}label-warning{/if}">{if $video.active=='yes'}Active{else}InActive{/if}</span>
|
||||
<span class="label {if $videos[list].active=='yes'}label-success{else}label-warning{/if}">{if $videos[list].active=='yes'}Active{else}InActive{/if}</span>
|
||||
<span class="label {if $video_status == Ok}label-success{else}label-success{/if}">{$videos[list].status}</span>
|
||||
<span class="label label-info"><span>Flags:{$videos[list].total_flags}</span>
|
||||
</span>
|
||||
|
@ -61,8 +61,18 @@
|
|||
<li role="presentation"><a role="menuitem" tabindex="-1" href="edit_video.php?video={$videos[list].videoid}">Edit</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="?mode=view_flags&vid={$videos[list].videoid}">View Flags</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="?delete_video={$videos[list].videoid}">Delete Video</a></li>
|
||||
{if $videos[list].active == yes}
|
||||
<li><a role="menuitem" tabindex="-1" href="?deactivate={$videos[list].videoid}">Deactivate</a>
|
||||
</li>
|
||||
{else}
|
||||
<li><a role="menuitem" tabindex="-1" href="?activate={$videos[list].videoid}">Activate</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li class="divider"></li>
|
||||
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="?delete_flags={$videos[list].videoid}">Delete Flags</a></li>
|
||||
|
||||
|
||||
</div>
|
||||
</tr>
|
||||
{if $bgcolor == ""}
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
{assign var='locationFields' value=$Upload->loadLocationFields($file)}
|
||||
{assign var='cust_fields' value=$Upload->custom_form_fields}
|
||||
<input class="lead" type="hidden" name="mass_up[]" value="{$file.title}" />
|
||||
<div class="well">
|
||||
<h5><b>{$file.title}</b></h5>
|
||||
<p class="well" onclick="$(this).next().toggle();return false;"><button class="btn btn-primary btn-xs" value="Enter Details">Enter Details {$smarty.foreach.mass_files.iteration}</button></p>
|
||||
<div class="well clearfix">
|
||||
<div class="well" >
|
||||
<h5 class="pull-left" style="padding-right:10px;">{$smarty.foreach.mass_files.iteration} - <b>{$file.title}</b></h5>
|
||||
<spam class="label label-primary" style="cursor: pointer;" onclick="$(this).next().toggle();return false;">Enter Details {$smarty.foreach.mass_files.iteration}</spam>
|
||||
<div class="well clearfix" style="display:none">
|
||||
{foreach from=$requiredFields item=field}
|
||||
<div class="form-group">
|
||||
<label for="{$field.id}">{$field.name}</label>
|
||||
|
@ -32,3 +32,5 @@
|
|||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
{include file="$style_dir/blocks/pagination.html" }
|
|
@ -4,8 +4,10 @@
|
|||
<form name="video_manage" method="post">
|
||||
<div class="btn-group">
|
||||
<input class="btn btn-primary btn-xs" type="submit" name="activate_selected" value="Activate" class="button"/>
|
||||
{if $smarty.get.active!='no'}
|
||||
<input class="btn btn-primary btn-xs" type="submit" name="deactivate_selected" value="Deactivate"
|
||||
class="button"/>
|
||||
{/if}
|
||||
<input class="btn btn-primary btn-xs" type="submit" name="make_featured_selected" value="Make Featured"
|
||||
class="button"/>
|
||||
<input class="btn btn-primary btn-xs" type="submit" name="make_unfeatured_selected" value="Make Unfeatured"
|
||||
|
@ -16,13 +18,18 @@
|
|||
<table class="table table-bordered table-striped manageUsersTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="checkall" onclick="_cb.checkUncheckAll(this);"/></td>
|
||||
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
|
||||
<td>VID</td>
|
||||
<td>Videos Details</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
{if $videos}
|
||||
{*$smarty.post|print_r*}
|
||||
{foreach from=$videos item=video}
|
||||
<!--<pre>
|
||||
{$video|print_r}
|
||||
</pre>
|
||||
<hr/>-->
|
||||
<tr>
|
||||
<td>
|
||||
<input name="check_video[]" type="checkbox" id="check_video" value="{$video.videoid}"/>
|
||||
|
|
|
@ -158,7 +158,7 @@ if(isset($_POST['delete_selected']))
|
|||
'hint_1'=> lang('vdo_cat_msg'),
|
||||
'display_function' => 'convert_to_categories');
|
||||
assign('cat_array',$cat_array);
|
||||
|
||||
//echo $db->db_query;
|
||||
subtitle("Video Manager");
|
||||
template_files('video_manager.html');
|
||||
display_it();
|
||||
|
|
Loading…
Add table
Reference in a new issue