<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: templates.tpl.html 2 2011-05-27 02:59:23Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<div id="container">
<!--#if($action =='tpl_detail'){#-->
<h1>{$L['tpl_title']}</h1>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle"> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['template_tips']}</span>
</div>
<!--#
if(count($tpl_arr)){
	for($i=0;$i<count($tpl_arr['size']);$i++){
		$tpl_name = $tpl_arr['name'][$i];
		$tpl_s_name = $tpl_arr['name'][$i].".tpl.html";
		$tpl_size = $tpl_arr['size'][$i];
#-->
<div style="border-bottom:1px #CCCCCC dotted; padding:5px;" onmouseover="this.className='color4 bold'" onmouseout="this.className=''">
<div style="float:left; width:400px">
	<!--#if($actived){#-->
	<a href="{#urr("admincp","item=templates&action={{$action}}&task=make_one&tpl_id=$tpl_id&tpl_name={{$tpl_name}}")#}">{$tpl_s_name} </a> ({$tpl_size})
	<!--#}else{#-->
	{$tpl_s_name} ({$tpl_size})
	<!--#}#-->
</div>
<!--#if($can_modify){#-->
<div style="float:left; width:100px;">
	<!--#if($actived){#-->
	<a href="{#urr("admincp","item=templates&action=edit&tpl_id={{$tpl_id}}&tpl_name={{$tpl_name}}")#}">{$L['modify']}</a>
	<!--#}#-->
</div>
<!--#}#-->
<div style="float:left; width:100px;">
<!--#if($actived){#-->
<a href="{#urr("admincp","item=templates&action={{$action}}&tpl_id={{$tpl_id}}&task=make_one&tpl_name={{$tpl_name}}")#}">{$L['tpl_update']}</a>
<!--#}#-->
</div>
<div class="clear"></div>	
</div>
<!--#
	}
}
unset($tpl_arr);
#-->
<br /><br />
<div>
<!--#if($actived){#-->
<input type="button" class="btn" value="{$L['tpl_make_all']}" onclick="go('{#urr("admincp","item=templates&action={{$action}}&tpl_id={{$tpl_id}}&task=make_all")#}')" />
<!--#}#-->
</div>
</div>
<!--#}elseif($action =='edit'){#-->
<h1>{$L['tpl_edit_title']}</h1>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle"> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['tpl_edit_tips']}</span>
</div>
<div style="padding:10px">
<div>{$L['current_tpl']}: {$tpl_name_current}</div>
<form action="{#urr("admincp","item=templates")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="tpl_name" value="{$tpl_name}" />
<input type="hidden" name="tpl_id" value="{$tpl_id}" />
<textarea name="content" id="content" style="height:320px; width:700px">{$content}</textarea>
	<a href="javascript:void(0);" onclick="resize_textarea('content','plus');">[+]</a> <a href="javascript:void(0);" onclick="resize_textarea('content','sub');">[-]</a><br /><br />
<input type="submit" class="btn" value="{$L['btn_submit']}" onclick="return confirm('{$L['tpl_confirm']}');" {$disabled} />
<input type="button" class="btn" value="{$L['btn_back']}" onclick="javascript:history.back();" />
</form>
</div>
</div>
</div>
<!--#}else{#-->
<h1>{$L['tpl_title']}<!--#sitemap_tag($L['tpl_title']);#--></h1>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle"> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['template_tips']}</span>
</div>
<table align="center" width="98%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td class="bold" width="180">{$L['tpl_snapshot']}</td>
	<td class="bold" width="120">{$L['style_dir']}</td>
	<td class="bold" width="50%">{$L['tpl_des']}</td>
	<td class="bold" align="right" width="60">{$L['operation']}</td>
</tr>
<!--#
if(count($templates_arr)){
	foreach($templates_arr as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
		$tpl_type = (trim($v['tpl_type']) =='admin') ? "<span class='txtgreen'>(".$L['admin_tpl'].")</span>" : "<span class='txtblue'>(".$L['user_tpl'].")</span>";
#-->
<tr class="{$color}">
	<td><a href="{#urr("admincp","item=templates&action=tpl_detail&tpl_id=".$v['tpl_dir'])#}"><img src="templates/{$v['tpl_dir']}/images/snapshot.gif" align="absmiddle" border="0" style="margin-bottom:8px"  /><br />{$v['tpl_title']}</a></td>
	<td>{$v['tpl_dir']}{$tpl_type}</td>
	<td>
	<table>
		<tr>
			<td>{$v['tpl_desc']}</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>	
				<span class="txtgray">{$L['tpl_author']}:</span><a href="{$v['tpl_site']}" target="_blank">{$v['tpl_author']}</a>&nbsp;
				<span class="txtgray">{$L['tpl_version']}:{$v['tpl_version']}</span>&nbsp;
				<span class="txtgray">{$L['phpdisk_core']}:{$v['phpdisk_core']}</span>
			</td>
		</tr>
	</table>
	</td>
	<td align="right">
	<!--# if($v['actived']){#-->
	<span class="txtgray">{$L['is_using']}</span>
	<!--# }else{#-->
	<a href="{#urr("admincp","item=templates&tpl_id=".$v['tpl_dir']."&action=active")#}" class="txtblue">{$L['active']}</a>
	<!--#}#-->
	</td>
</tr>
<!--#
	}
	unset($templates_arr);
}
#-->
</table>
<!--#}#-->
</div>