<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: plugins.tpl.html 2 2011-05-27 02:59:23Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<!--#if($action =='shortcut'){#-->
<div id="container">
<h1>{$L['plugin_shortcut']}<!--#sitemap_tag($L['plugin_shortcut']);#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['plugin_shortcut_tips']}</span>
</div>
<form action="{#urr("admincp","item=$item")#}" method="post">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="task" value="{$action}"/>
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="50%"><span class="bold">{$L['open_plugins_cp']}</span>: <br /><span class="txtgray">{$L['open_plugins_cp_tips']}</span></td>
	<td><input type="radio" name="setting[open_plugins_cp]" value="1" {#ifchecked(1,$setting['open_plugins_cp'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_plugins_cp]" value="0" {#ifchecked(0,$setting['open_plugins_cp'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_plugins_last']}</span>: <br /><span class="txtgray">{$L['open_plugins_last_tips']}</span></td>
	<td><input type="radio" name="setting[open_plugins_last]" value="1" {#ifchecked(1,$setting['open_plugins_last'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_plugins_last]" value="0" {#ifchecked(0,$setting['open_plugins_last'])#}/> {$L['no']}</td>
</tr>
</table>
<table align="center" width="100%" cellpadding="4" cellspacing="4" border="0" class="td_line">
<tr>
	<td colspan="5"><span class="bold">{$L['current_plugin']}</span>:<br /><span class="txtgray">{$L['current_plugin_tips']}</span></td>
</tr>
<!--#
if(count($plugins_list)){
#-->
<tr>
<!--#
	foreach($plugins_list as $k => $v){
#-->
	<td width="20%">
	<!--#if($v['installed'] && $v['actived']){#-->
	<input type="checkbox" name="plugin_ids[{$v['plugin_dir']}]" id="cp_{$v['plugin_dir']}" value="1" />{#get_name($v['plugin_name'],$v['admin_url'],$v['actived'])#}
	<!--#}else{#-->
	<input type="checkbox" disabled="disabled" />{#get_name($v['plugin_name'],$v['admin_url'],$v['actived'])#}
	<!--#}#-->
	</td>
<!--#
		if(($k+1)%5==0) echo '</tr><tr>';
	}
#-->
</tr>
<!--#	
	unset($plugins_list);
}else{
#-->
<tr>
	<td colspan="5">{$L['plugin_not_found']}</td>
</tr>	
<!--#
}
#-->
<tr>
	<td colspan="5" align="center"><input type="submit" class="btn" value="{$L['btn_submit']}"/></td>
</tr>
</table>
</form>
</div>
</div>
<script type="text/javascript">
{$shortcut_status}
</script>
<!--#}else{#-->
<script type="text/javascript">
$(document).ready(function(){
	$("#container table tbody").mouseover(function(){
		$(this).addClass("color4");
	}).mouseout(function(){
		$(this).removeClass("color4");
	});
});
</script>
<div id="container">
<h1>{$L['plugins_manage']}<!--#sitemap_tag($L['plugins_manage']);#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['plugins_manage_tips']}</span>
</div>
<div class="search_box">
<a href="{#urr("admincp","item=plugins")#}" id="n_">{$L['all_plugins']}({$all_plugins_count})</a>&nbsp;&nbsp;
<a href="{#urr("admincp","item=plugins&action=actived_plugins")#}" id="n_actived_plugins">{$L['active_plugins']}({$actived_plugins_count})</a>&nbsp;&nbsp;
<a href="{#urr("admincp","item=plugins&action=inactived_plugins")#}" id="n_inactived_plugins">{$L['inactive_plugins']}({$inactived_plugins_count})</a>&nbsp;&nbsp;
<a href="{#urr("admincp","item=plugins&action=last_plugins")#}" id="n_last_plugins">{$L['last_plugins']}({$last_plugins_count})</a>&nbsp;&nbsp;
</div>
<form name="frm" action="{#urr("admincp","item=plugins")#}" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="98%" cellpadding="4" cellspacing="0" border="0" class="td_line">
	<tr class="bold">
		<td width="25%" class="plugin_fix">{$L['plugin_name']}</td>
		<td width="15%" class="plugin_fix">{$L['plugin_dir']}</td>
		<td class="plugin_fix">{$L['plugin_desc']}</td>
	</tr>
	<!--#
	if(count($plugins_arr)){
		foreach($plugins_arr as $v){
	#-->
	<tbody>
	<tr>
		<td rowspan="2" class="plugin_fix f14">
		<!--#if($v['installed'] && $v['actived']){#-->
		<input type="checkbox" name="plugin_ids[]" id="plugin_ids" value="{$v['plugin_dir']}" />
		<!--#}else{#-->
		<input type="checkbox" disabled="disabled" />
		<!--#}#-->
		{#get_name($v['plugin_name'],$v['admin_url'],$v['actived'])#}</td>
		<td rowspan="2" class="plugin_fix">{$v['plugin_dir']}/</td>
		<td style="word-break:break-all;padding-top:8px">{$v['plugin_desc']}</td>
	</tr>
	<tr>	
		<td class="plugin_fix">
		<!--#if($v['installed']){#-->
			<!--# if($v['actived']){#-->
			<a href="{#urr("admincp","item=plugins&plugin_name=".$v['plugin_dir']."&action=inactive")#}" class="txtred">{$L['inactive']}</a>&nbsp;
			<!--# }else{#-->
			<a href="{#urr("admincp","item=plugins&plugin_name=".$v['plugin_dir']."&action=active")#}" class="txtblue">{$L['active']}</a>&nbsp;
			<!--#}#-->
			<a href="{#urr("admincp","item=plugins&plugin_name=".$v['plugin_dir']."&action=uninstall")#}" class="txtred" onclick="return confirm('{$L['confirm_uninstall_plugin']}');">{$L['uninstall']}</a>&nbsp;
		<!--#}else{#-->
		<a href="{#urr("admincp","item=plugins&plugin_name=".$v['plugin_dir']."&action=install")#}" class="txtgreen" onclick="return confirm('{$L['confirm_install_plugin']}');">{$L['install']}</a>&nbsp;
		<!--#}#-->
		<span class="txtgray">{$L['plugin_author']}:</span><a href="{$v['plugin_site']}" target="_blank">{$v['plugin_author']}</a>&nbsp;
		<span class="txtgray">{$L['plugin_version']}:{$v['plugin_version']}</span>&nbsp;
		<span class="txtgray">{$L['phpdisk_core']}:{$v['phpdisk_core']}</span>
		</td>
	</tr>	
	</tbody>
	<!--#
		}
		unset($plugins_arr);
	#-->
	<!--#if($page_nav){#-->
	<tr>
		<td colspan="6" height="40">{$page_nav}</td>
	</tr>
	<!--#}#-->
	<tr>
		<td colspan="6"><a href="javascript:void(0);" onclick="reverse_ids(document.frm.plugin_ids);">{$L['select_all']}</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="cancel_ids(document.frm.plugin_ids);">{$L['select_cancel']}</a>&nbsp;&nbsp;
		<input type="radio" name="task" id="active" value="active" /><label for="active">{$L['active']}</label>
		<input type="radio" name="task" id="inactive" value="inactive" /><label for="inactive">{$L['inactive']}</label>&nbsp;&nbsp;
		<input type="submit" class="btn" value="{$L['btn_submit']}" />
		</td>
	</tr>
	<!--#
	}else{
	#-->
	<tr>
		<td colspan="6" height="40">
		<!--#if($action =='last_plugins'){#-->
		{$L['last_not_found']}
		<!--#}else{#-->
		{$L['plugin_not_found']}
		<!--#}#-->
		</td>
	</tr>
	<!--#
	}
	#-->
</table>
</form>
{#reload_leftframe('admincp','plugin')#}
<script type="text/javascript">
function dosubmit(o){
	if(checkbox_ids("plugin_ids[]") != true){
		alert("{$L['please_select_plugins']}");
		return false;
	}
}
getId('n_{$action}').className = 'sel_a';
<!--#
if(count($plugins_arr)){
	if($action=='inactived_plugins'){
#-->
getId('active').checked =true;
	<!--#}else{#-->
getId('inactive').checked =true;
<!--#
	}
}#-->
</script>
</div>
</div>
<!--#}#-->
