modified: plugin_manager, video_manager and added: maintenance

This commit is contained in:
sajjadcb 2014-01-27 07:35:20 +00:00
parent 34665ea70d
commit 109ef66351
3 changed files with 226 additions and 204 deletions

View file

@ -0,0 +1,74 @@
<h2>Website Maintenance</h2>
<p>Remove inactive sessions, user access logs, comments cache, more options will be available soon</p>
<div class="form-group">
<a class="btn btn-primary btn-sm" href="?mode=remove_sessions">
Remove inactive sessions
</a>
<a class="btn btn-primary btn-sm" href="javascript:void(0)" onclick="$('#access_remove_form').show()">
Remove user access log
</a>
<a class="btn btn-primary btn-sm" href="javascript:void(0)" onclick="$('#activity_remove_form').show()">
Remove user activity feed
</a>
</div>
<div class="formPlaceHolder">
<span style="display:none" id="access_remove_form">
<form method="get">
<div class="form-group">
<label for="days">Older than</label>
<input name="mode" value="remove_access_log" type="hidden" />
<input class="form-control" name="days" type="text" value="30"/>
Days
</div>
<input class="btn btn-primary" type="submit" value="remove" />
</form>
</span>
<span style="display:none" id="activity_remove_form">
<form method="get">
<div class="form-group">
<label for="days">Older than</label>
<input name="mode" value="remove_activity_feed" type="hidden" />
<input class="form-control" name="days" type="text" value="30"/>
days
</div>
<div class="form-group">
<label for="loop_size">With loop size of</label>
<input class="form-control" name="loop_size" type="text" value="100"/>
users
</div>
<div class="form-group">
<input class="btn btn-primary" type="submit" value="remove" />
</div>
</form>
</span>
</div>
{if $smarty.get.mode =='remove_activity_feed'}
{if $indexing}
<h4>{$from} - {$to} of {$total}</h4>
<ul>
{foreach from=$index_msgs item=themsg}
<li>{$themsg}</li>
{/foreach}
</ul>
{if $stop_loop!='yes'}
<script type="text/javascript">
var start_index = '{$next_index}';
var loop_size = '{$smarty.get.loop_size}';
var mode = '{$mode}';
var days = '{$smarty.get.days}';
{literal}
$(document).oneTime(2000,function(){
$(window.location).attr('href', '?loop_size='+loop_size+'&mode='+mode+'&start_index='+start_index+'&days'+days)
});
{/literal}
</script>
<h5>redirecting....do not close this window</h5>
{else}
<h5>Indexing has been completed.</h5>
{/if}
{/if}
{/if}

View file

@ -4,104 +4,120 @@
<form name="installed_plugins" id="installed_plugins" method="post" action="plugin_manager.php">
<div class="btn-group">
<input class="btn btn-primary btn-xs" type="submit" name="activate_selected" value="Activate" class="button"/>
<input class="btn btn-primary btn-xs" type="submit" name="deactivate_selected" value="Deactivate" class="button" />
<input class="btn btn-primary btn-xs" type="submit" name="uninstall_selected" value="Uninstall" class="button" onclick="return confirm_it('Are you sure you want to uninstall selected plugin(s)')" id="uninstall_selected"/>
<input class="btn btn-primary btn-sm" type="submit" name="activate_selected" value="Activate" />
<input class="btn btn-primary btn-sm" type="submit" name="deactivate_selected" value="Deactivate" />
<input class="btn btn-primary btn-sm" type="submit" name="uninstall_selected" value="Uninstall" onclick="return confirm_it('Are you sure you want to uninstall selected plugin(s)')" id="uninstall_selected"/>
</div>
<table class="table table-bordered">
<div class="form-group">
<table class="table table-bordered table-striped">
<tr>
<td width="30" align="center" valign="middle" class="left_head">
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td class="head">Plugin Details</td>
<td width="30">
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
</td>
<td>Plugin Details</td>
<td>&nbsp;</td>
</tr>
</div>
{assign var = bgcolor value = ""}
{foreach from=$installed_plugin_list item=plug name=item}
<table class="table table-bordered">
<tr class="video_opt_td" bgcolor="{$bgcolor}">
<td width="30" align="center" valign="top" class="video_opt_td"><input name="check_plugin[]" type="checkbox" value="{$smarty.foreach.item.iteration}" />
<tr>
<td width="30">
<input name="check_plugin[]" type="checkbox" value="{$smarty.foreach.item.iteration}" />
<input type="hidden" name="plugin_file_{$smarty.foreach.item.iteration}" value="{$plug.plugin_file}" />
<input type="hidden" name="plugin_folder_{$smarty.foreach.item.iteration}" value="{$plug.folder}" />
</td>
<td valign="top" class="video_opt_td">
<div style="position:relative; min-height: 30px">
<div class="videoTitle row">
<div class="col-md-10">
<label>{$plug.description}</label>
<span class="label {if $plugin.plugin_active == Ok}label- {else}label-success{/if}"><span></span><strong>{if $plug[plugin_active].Active=='Yes'}Active{else}Active{/if}</strong></span>
<td>
<strong>{$plug.name}</strong>
<p>{$plug.description}</p>
<div class="pluginStatus">
<span class="label {if $plugin.plugin_active == Ok}label- {else}label-success{/if}">
<strong>{if $plug[plugin_active].Active=='Yes'}Active{else}Active{/if}</strong>
</span>
<span class="label label-danger"><span>Author:</span><strong>{$plug.author}</strong></span>
<span class="label label-info"><span>Ver.</span><strong>{$plug.version}</strong></span>
</span>
<strong>{$plug.name}</strong> &#8212;
</div>
</td>
<td>
<div class="dropdown">
<button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown">Actions <i class="caret"></i></button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1" role="menu">
{if $plug.plugin_active == 'yes'} <li role="presentation"><a role="menuitem" tabindex="-1" href="?deactivate={$plug.plugin_file}{if $plug.folder!=''}&f={$plug.folder}{/if}">Deactivate</a>{else}<li role="presentation"><a role="menuitem" tabindex="-1" href="?activate={$plug.plugin_file}{if $plug.folder!=''}&f={$plug.folder}{/if}">Activate</a></li>{/if}
{if $plug.plugin_active == 'yes'}
<li role="presentation">
<a role="menuitem" tabindex="-1" href="?deactivate={$plug.plugin_file}{if $plug.folder!=''}&f={$plug.folder}{/if}">
Deactivate
</a>
{else}
<li role="presentation">
<a role="menuitem" tabindex="-1" href="?activate={$plug.plugin_file}{if $plug.folder!=''}&f={$plug.folder}{/if}">
Activate
</a>
</li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:Confirm_Uninstall('?uninstall={$plug.plugin_file}{if $plug.folder!=''}&f={$plug.folder}{/if}')">Uninstall</a></span>
{/if}
<li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:Confirm_Uninstall('?uninstall={$plug.plugin_file}{if $plug.folder!=''}&f={$plug.folder}{/if}')">
Uninstall
</a>
</li>
</ul>
</div>
</td>
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{/foreach}
</tr>
</table>
<div class="btn-group">
<input class="btn btn-primary btn-xs" type="submit" name="activate_selected" value="Activate" class="button"/>
<input class="btn btn-primary btn-xs" type="submit" name="deactivate_selected" value="Deactivate" class="button" />
<input class="btn btn-primary btn-xs" type="submit" name="uninstall_selected" value="Uninstall" class="button" onclick="return confirm_it('Are you sure you want to delete selected video(s)')" id="uninstall_selected"/>
<input class="btn btn-primary btn-sm" type="submit" name="activate_selected" value="Activate" />
<input class="btn btn-primary btn-sm" type="submit" name="deactivate_selected" value="Deactivate" />
<input class="btn btn-primary btn-sm" type="submit" name="uninstall_selected" value="Uninstall" onclick="return confirm_it('Are you sure you want to uninstall selected plugin(s)')" id="uninstall_selected"/>
</div>
</form>
{else}
<div align="center"><strong><em>No Installed Plugin Found</em></strong></div>
<div>
<strong><em>No Installed Plugin Found</em></strong>
</div>
{/if}
{* Listing New Plugins *}
<h2>Available Plugins </h2>
{if $new_plugin_list}<form name="available_plugins" id="available_plugins" action="plugin_manager.php" method="post">
<div class="form-group">
<input class="btn btn-primary btn-xs pull-right" type="submit" name="install_selected" value="Install" onclick="return confirm_it('Are you sure you want to install selected plugin(s)')" id="install_selected"/>
</div>
<table class="table table-bordered">
{if $new_plugin_list}
<form name="available_plugins" id="available_plugins" action="plugin_manager.php" method="post">
<table class="table table-bordered table-striped">
<tr>
<td width="30" align="center" valign="middle" class="left_head">
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td class="head">Plugin Details</td>
</tr>
</table>
<table class="table table-bordered">
{assign var = bgcolor value = ""}
{foreach from=$new_plugin_list item=plug name=item}
<tr class="video_opt_td" bgcolor="{$bgcolor}">
<td width="30" align="center" valign="top" class="video_opt_td">
<input name="check_plugin[]" type="checkbox" value="{$smarty.foreach.item.iteration}" />
<input type="hidden" name="plugin_file_{$smarty.foreach.item.iteration}" value="{$plug.file}" />
<input type="hidden" name="plugin_folder_{$smarty.foreach.item.iteration}" value="{$plug.folder}" /></td>
<td valign="top" class="video_opt_td" >
<strong>{$plug.name}</strong> &#8212;
<span class="vdo_sets">
<strong>{$plug.plugin_active}</strong><br> &#8226;
Author:<strong><a href="{$plug.website}">{$plug.author}</a></strong> <br>&#8226;
Version:<strong>{$plug.version}</strong></span>
<div style="margin-bottom:10px"> {$plug.description}</div>
<span class="vdo_sets"><a class="btn btn-default btn-xs" href="?install_plugin={$plug.file}{if $plug.folder!=''}&f={$plug.folder}{/if}">Install Plugin</a></span>
<div style="height:5px"></div>
</td>
</tr>
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{/foreach}
</table>
<!-- <td>
<div class="form-group">
<input class="btn btn-primary btn-xs pull-right" type="submit" name="install_selected" value="Install" onclick="return confirm_it('Are you sure you want to install selected plugin(s)')" id="install_selected"/>
</div>
</td> -->
</tr>
{assign var = bgcolor value = ""}
{foreach from=$new_plugin_list item=plug name=item}
<tr>
<td width="30">
<input name="check_plugin[]" type="checkbox" value="{$smarty.foreach.item.iteration}" />
<input type="hidden" name="plugin_file_{$smarty.foreach.item.iteration}" value="{$plug.file}" />
<input type="hidden" name="plugin_folder_{$smarty.foreach.item.iteration}" value="{$plug.folder}" />
</td>
<td>
<strong>{$plug.name}</strong>
<span class="vdo_sets">
<strong>{$plug.plugin_active}</strong><br>
Author :
<strong>
<a href="{$plug.website}">{$plug.author}</a>
</strong><br>
Version : <strong>{$plug.version}</strong>
</span>
<p>{$plug.description}</p>
<span>
<a class="btn btn-info btn-xs" href="?install_plugin={$plug.file}{if $plug.folder!=''}&f={$plug.folder}{/if}">
Install Plugin
</a>
</span>
</td>
</tr>
{/foreach}
</table>
<div class="form-group clearfix">
<input class="btn btn-primary btn-sm pull-right" type="submit" name="install_selected" value="Install" onclick="return confirm_it('Are you sure you want to install selected plugin(s)')" id="install_selected"/>
</div>
</form>
{else}
<div align="center"><strong><em>No Plugin is available</em></strong></div>

View file

@ -1,94 +1,28 @@
<h2>Video Manager</h2>
{include file="$layout_dir/blocks/advanced_search.html" }
<div class="search_box" id="searchdiv" {if $smarty.cookies.show_searchdiv_search!='show'} style="display:none"{/if}>
<form id="video_search" name="video_search" method="get" action="video_manager.php" class="video_search">
<table width="400" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="106" align="right"><label for="title">Video title</label></td>
<td width="280"><input name="title" type="text" class="label label-primary" id="title" value="{'title'|get_form_val:true}" //></td>
</tr>
<tr>
<td align="right"><label for="videokey">Video key</label></td>
<td><input name="videokey" type="text" class="input" id="videokey" value="{'videokey'|get_form_val:true}" //></td>
</tr>
<tr>
<td align="right"><label for="videoid">Video id</label></td>
<td><input name="videoid" type="text" class="input" id="videoid" value="{'videoid'|get_form_val:true}" //></td>
</tr>
<tr>
<td align="right"><label for="tags">Video tags</label></td>
<td><input name="tags" type="text" class="input" id="tags" value="{'tags'|get_form_val:true}" /></td>
</tr>
<tr>
<td align="right">Featured</td>
<td><label for="featured"></label>
<select name="featured" id="featured" class="input">
<option value="" ></option>
<option value="yes" {if $smarty.get.featured=='yes'} selected="selected"{/if}>Yes</option>
<option value="no" {if $smarty.get.featured=='no'} selected="selected"{/if}>No</option>
</select>
</td>
</tr>
<tr>
<td align="right">Active</td>
<td><select name="active" id="active" class="input">
<option value="" ></option>
<option value="yes" {if $smarty.get.active=='yes'} selected="selected"{/if}>Yes</option>
<option value="no" {if $smarty.get.active=='no'} selected="selected"{/if}>No</option>
</select>
</td>
</tr>
<tr>
<td align="right">Conversion Status</td>
<td><select name="status" id="status" class="input">
<option value="" ></option>
<option value="Successful" {if $smarty.get.status=='Successful'} selected="selected"{/if}>Successful</option>
<option value="Processing" {if $smarty.get.status=='Processing'} selected="selected"{/if}>Processing</option>
<option value="Failed" {if $smarty.get.status=='Failed'} selected="selected"{/if}>Failed</option>
</select>
</td>
</tr>
<tr>
<td align="right">Userid</td>
<td><input name="userid" type="text" class="input" id="userid" value="{'userid'|get_form_val:true}" /></td>
</tr>
<tr>
<td align="right" valign="top">Category</td>
<td>
{$formObj->createField($cat_array)}
</td>
</tr>
</table>
<br />
<input type="submit" name="search" id="search" value="Search Form" class="button"/>
</form>
</div>
<!-- DIsplaying Videos -->
<form name="video_manage" method="post">
<table class="">
<tr>
<td>
<div class= "btn-group">
<input class="btn btn-primary btn-xs" type="submit" name="activate_selected" value="Activate" class="button"/>
<input class="btn btn-primary btn-xs" type="submit" name="deactivate_selected" value="Deactivate" class="button" />
<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" class="button"/>
<input class="btn btn-primary btn-xs" type="submit" name="delete_selected" value="Delete" class="button" onclick="return confirm_it('Are you sure you want to delete selected video(s)')"/>
<div>
</td>
</tr>
</table>
<table class="table table-bordered">
<input class="btn btn-primary btn-sm" type="submit" name="activate_selected" value="Activate" class="button"/>
<input class="btn btn-primary btn-sm" type="submit" name="deactivate_selected" value="Deactivate" class="button" />
<input class="btn btn-primary btn-sm" type="submit" name="make_featured_selected" value="Make Featured" class="button"/>
<input class="btn btn-primary btn-sm" type="submit" name="make_unfeatured_selected" value="Make Unfeatured" class="button"/>
<input class="btn btn-primary btn-sm" type="submit" name="delete_selected" value="Delete" class="button" onclick="return confirm_it('Are you sure you want to delete selected video(s)')"/>
</div>
<table class="table table-bordered table-striped manageUsersTable">
<tr>
<td width="30" align="center" valign="middle" class="left_head">
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
<td width="50" class="head">VID</td>
<td class="head">Videos Details</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
{if $videos}
<table class="table table-bordered table-striped manageUsersTable">
{assign var = bgcolor value = ""}
{section name=list loop=$videos}
<script type="text/javascript">
@ -100,13 +34,15 @@
</script>
<tr class="video_opt_td">
<td width="30" align="center" valign="top" class="video_opt_td"> <input name="check_video[]" type="checkbox" id="check_video" value="{$videos[list].videoid}" /></td>
<td width="50" align="left" valign="top" class="video_opt_td">{$videos[list].videoid}</td>
<td width="50" valign="top" class="video_opt_td">
<img src="{getThumb vdetails=$videos[list]}" width="130" height="80" id="thumbs_{$videos[list].videoid}"title="<img src='{getThumb vdetails=$videos[list] num=1}' /> <img src='{getThumb vdetails=$videos[list] num=2}' /> <img src='{getThumb vdetails=$videos[list] num=3}' />" /></td>
<td valign="top" class="video_opt_td">
<td width="30">
<input name="check_video[]" type="checkbox" id="check_video" value="{$videos[list].videoid}" />
</td>
<td width="50">{$videos[list].videoid}</td>
<td width="50">
<img src="{getThumb vdetails=$videos[list]}" width="130" height="80" id="thumbs_{$videos[list].videoid}"title="<img src='{getThumb vdetails=$videos[list] num=1}' /> <img src='{getThumb vdetails=$videos[list] num=2}' /> <img src='{getThumb vdetails=$videos[list] num=3}' />" />
</td>
<td>
<div style="position:relative; min-height: 80px">
<div class="videoTitle row">
<div class="col-md-10">
<a href="edit_video.php?video={$videos[list].videoid}" target="_blank" style="text-indent:10px">
@ -117,10 +53,12 @@
<a href="view_user.php?uid={$videos[list].userid}">{$videos[list].username}</a>
</div>
</div>
<span class=""><span></span>{$videos[list].date_added|niceTime} </span>
<span class="">{lang code='views'} : {$vdo.views|number_format}</span>
<span class="">
<strong>{$videos[list].date_added|niceTime}</strong>
</span>
<span class="">
{lang code='views'} : <strong>{$vdo.views|number_format}</strong>
</span>
<div class="labels">
<span class="label label-primary">{if $videos[list].featured=='yes'}Featured{else}UnFeatured{/if}</span>
<span class="label {if $u.usr_status == Ok}label-success{else}label-success{/if}">{if $videos[list].Active=='Yes'}NotActive{else}Active{/if} </span>
@ -128,6 +66,7 @@
</div>
</div>
</td>
<td>
<div id="vid_opt-{$videos[list].videoid}" class="dropdown">
<button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown">Actions <i class="caret"></i></button>
@ -151,12 +90,6 @@
</div>
</td>
</tr>
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{/section}
</table>
{else}
@ -164,12 +97,11 @@
{/if}
<div class= "btn-group">
<input class="btn btn-primary btn-xs" type="submit" name="activate_selected" value="Activate" class="button"/>
<input class="btn btn-primary btn-xs" type="submit" name="deactivate_selected" value="Deactivate" class="button" />
<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" class="button"/>
<input class="btn btn-primary btn-xs" type="submit" name="delete_selected" value="Delete" class="button" onclick="return confirm_it('Are you sure you want to delete selected video(s)')"/>
<input class="btn btn-primary btn-sm" type="submit" name="activate_selected" value="Activate" class="button"/>
<input class="btn btn-primary btn-sm" type="submit" name="deactivate_selected" value="Deactivate" class="button" />
<input class="btn btn-primary btn-sm" type="submit" name="make_featured_selected" value="Make Featured" class="button"/>
<input class="btn btn-primary btn-sm" type="submit" name="make_unfeatured_selected" value="Make Unfeatured" class="button"/>
<input class="btn btn-primary btn-sm" type="submit" name="delete_selected" value="Delete" class="button" onclick="return confirm_it('Are you sure you want to delete selected video(s)')"/>
</div>
</form>