<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>刀客建站系统   管理中心  - 添加区块</title>
<%{include file="header.html"}%>
</head>
<body>
<h1>

<span class="action-span1"><a href="index.php?act=main">刀客建站系统   管理中心 </a>  - 添加区块 &nbsp;&nbsp;<a href="index.php?act=help.get&h=template_addblock&width=450"  class="jTip"  name="我希望获得更多帮助"><img src='images/help.png'></a></span>
<span class="action-span"><a href="index.php?act=template_set.blockdlist">区块列表</a></span>
<span class="action-span"><a href="index.php?act=template_set.settemplate">设置当前模板</a></span>
<span style='float:right;margin-right:10px;'><img src='images/top_help.gif'><a href="http://sitepub.cn/help"> 帮助 </a></span>
<span style='float:right;margin-right:10px;'><img src='images/top_forum.gif'><a href="http://bbs.sitepub.cn"> 论坛 </a></span>
<div style="clear:both"></div>
</h1>
<form method="post" action='index.php?act=template_set.save_addblock' id='block_form_id'>
<div class="main-div">
区块类型 &nbsp;&nbsp; <select id='block_type_id'>
<%{foreach from=$out.block_type_arr item=v key=k}%>
<option value='<%{$k}%>' <%{if $out.block_type==$k }%> selected=true<%{/if}%>> <%{$v.name|escape:html}%></option>
<%{/foreach}%>
</select>&nbsp;  <input type="button" value=" 选择 " class="button"  onclick='window.location.href="index.php?act=template_set.addblock&block_type="+$("#block_type_id").val()'/> 
</div>
<div class="main-div">
	<%{if $out.block_type=='soft_box'}%>

		<%{include file="block_set/block_soft_box.html"}%>
	
	<%{elseif $out.block_type=='art_box'}%>
		
		<%{include file="block_set/block_art_box.html"}%>

	<%{elseif $out.block_type=='art_cat_box'}%>
		
		<%{include file="block_set/block_art_cat_box.html"}%>

	<%{elseif $out.block_type=='soft_cat_box'}%>

		<%{include file="block_set/block_soft_cat_box.html"}%>

	<%{elseif $out.block_type=='soft_faq'}%>
		
		<%{include file="block_set/block_soft_faq.html"}%>

	<%{elseif $out.block_type=='soft_img_play'}%>
		
		<%{include file="block_set/block_soft_img_play.html"}%>
	
	<%{elseif $out.block_type=='soft_desc'}%>
		
		<%{include file="block_set/block_soft_desc.html"}%>
	
	<%{elseif $out.block_type=='soft_attr_info'}%>
		
		<%{include file="block_set/block_soft_attr_info.html"}%>
	
	<%{elseif $out.block_type=='related_soft'}%>
		
		<%{include file="block_set/block_related_soft.html"}%>
	
	<%{elseif $out.block_type=='released_history'}%>

		<%{include file="block_set/block_released_history.html"}%>

	<%{elseif $out.block_type=='soft_features'}%>

		<%{include file="block_set/block_soft_features.html"}%>

	<%{elseif $out.block_type=='custom'}%>

		<%{include file="block_set/block_custom.html"}%>
	
	<%{/if}%>

<tr>
	<td class="label" > 前台显示名称</td>
	<td> <input name='display_name' > </td>
</tr>
<tr>
	<td class="label"> 区块ICON标识 </td>
	<td> <input name='block_icon' type='file'></td>
</tr>
<tr>
	<td class="label">库文件</td>
	<td><select name='lib_file' id='lib_file_id' onchange='if($("#lib_file_content_id")[0].style.display=="block"){edit_lib_file_content();}'>
	<%{if $out.block_type=='custom'}%>
			<option value='' selected=true >无</option>
	<%{/if}%>
	<%{foreach from=$out.lib_arr item=v key=k}%>
		<option value='<%{$v.file}%>' <%{if $v.file==$out.lib_file}%>selected=true<%{/if}%> ><%{$v.name|escape:html}%></option>
	<%{/foreach}%>
	</select> &nbsp;&nbsp;<a href="javascript:void(0)" onclick='$("#add_lib_file_content_id").hide();edit_lib_file_content()' >修改库文件</a>&nbsp;&nbsp;<a href="javascript:void(0)" onclick='$("#lib_file_content_id").hide();$("#add_lib_file_content_id").slideDown();' >添加库文件</a>
	</td>
</tr>

<tr><td></td><td>
<div id='lib_file_content_id' style='display:none;'  ><textarea style='width:100%;height:150px;'></textarea>
<p><a id='save_id' href="javascript:void(0);" onclick='save_edit_lib_file()'>保存</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick='$("#lib_file_content_id").slideUp("fast")'>关闭</a></p>

</div>
</td></tr>
<tr><td></td><td>
<div id='add_lib_file_content_id' style='display:none;'  >
库文件名称 <input><br>
库文件内容 <textarea style='width:100%;height:150px;'></textarea>
<p><a id='save_id' href="javascript:void(0);" onclick='save_add_lib_file("<%{$out.block_type}%>")'>保存</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick='$("#add_lib_file_content_id").slideUp("fast")'>关闭</a></p>
</div>

</td>
</tr>
	
</table>
</div>
</div>

<div class="button-div ">
<input type="submit" value=" 提交 " class="button"  />
</div>
</form>
</body>
</html>

