<!--<?php
require($this->getSegmentFile('config.nav'));
print <<<EOT
-->
<div class="admin_info mb10" style="display: block;">
<h3 class="h1">功能提示</h3>
<div class="legend">
	添加自定义风格：将自定义风格目录拷贝到 <b>mode/dianpu/themes/</b>下并在店铺<b>核心设置</b>-><b>风格管理</b>中启用，为了使风格可以正常使用，请确保<b>目录状态</b>为<b>正常</b>.default和vip是系统自带的默认风格，请勿删除.<br></br>
	风格目录位置：  <b>mode/dianpu/themes/</b><br></br>
	风格目录结构： <b>mode/dianpu/themes/风格目录名/images/</b>目录下包含preview.jpg,S_gb.png,S_ico.png,style.css四个文件，其中preview.jpg
	为预览效果图，style.css为风格样式文件.<br></br>
</div>
</div>
<!--核心管理-风格管理-->
<h2 class="h1">风格列表</h2>
<script type="text/javascript">
var styles = {
	remove : function(url,message,filename){
		if(confirm('你确定要'+message+'吗?')){
			var title = getObj('filename');
			if(title != null) url = url + '&title=' + title.value;
			setTimeout(function(){
				window.location.href = url;
			},100);
		}
		return false;
	}
};

</script>
<!--
EOT;
if($_viewer->styles){
print <<<EOT
-->
<form action="{$_viewer->baseUrl}&action=addstyle" method="post" name="FORM">
<input type="hidden" name="step" value="2" />
<div class="admin_table">
	<table width="100%">
		<tr class="tr2">
			<td width="100">风格文件名</td>
			<td width="180">自定义风格名</td>
			<td>目录状态</td>
			<td>风格状态</td>
			<td>操作</td>
		</tr>
<!--
EOT;
foreach($_viewer->styles as $style){
if($style[styleid] == 0){
print <<<EOT
-->		
		<tr class="tr1">
			<td class="td2"><input name="newstyles[filename][]" type="hidden" class="input input_wa" value="{$style[filename]}" />{$style[filename]}</td>
			<td class="td2"><input disabled="disabled" name="newstyles[title][]" type="text" class="input input_wa" value="{$style[title]}" id="{$style[filename]}"/></td>
			<td class="td2">{$style[state]}</td>
			<td class="td2"><span class="gray">不可用</span></td>
			<td class="td2"><a href="javascript:;" onclick="styles.remove('{$_viewer->baseUrl}&action=startstyle&filename={$style[filename]}',this.title,'{$style[filename]}');" title='启用'>[启用]</a></td>
		</tr>
<!--
EOT;
}else{
print <<<EOT
-->
		<tr class="tr1">
			<td class="td2"><input name="styles[$style[styleid]][filename]" type="hidden" class="input input_wa" value="{$style[filename]}" />$style[filename]</td>
			<td class="td2"><input name="styles[$style[styleid]][title]" type="text" class="input input_wa" value="{$style[title]}" /></td>
			<td class="td2">{$style[state]}</td>
			<td class="td2"><span class="s3">可用</span></td>
			<td class="td2"><a href="javascript:;" onclick="styles.remove('{$_viewer->baseUrl}&action=stopstyle&filename={$style[filename]}',this.title,'');" title='停用'>[停用]</a></td>
		</tr>		
<!--
EOT;
}}
print <<<EOT
-->	
	</table>
</div>
<div class="p10 tac"><span class="btn"><span><button type="submit">提 交</button></span></span></div>
</form>
<!--
EOT;
}else{
print <<<EOT
-->
	<div class="admin_tips">啊哦，请上传风格到根目录下mode/dianpu/themes目录</div>
<!--
EOT;
}
print <<<EOT
-->
<!--
EOT;
?>
