<script type="text/javascript">
//删除
function act_delete(url){
	var o = getTarget();
	var param = {
		method: 'POST', 
		onComplete: function(){
			$_(o.parentNode.parentNode).remove();
		}
	}
	if(confirm('确实要删除该区块么？')) Ajax.Request(url, param);
	return false;
}
</script>
<br />
<table class="grid" width="100%" align="center">
  <caption>区块管理：
    <select class="select" name="modname" id="modname" onchange="document.location='blocks.php?modname='+this.options[this.selectedIndex].value;">
      <option value="0">全部区块</option>
      <option value="1"{?if $modname == 1?} selected="selected"{?/if?}>自定义区块</option>
      {?section name=i loop=$jieqi_modules?}
      <option value="{?$i['key']?}"{?if $modname == $i['key']?} selected="selected"{?/if?}>{?$jieqi_modules[i].caption?}</option>
      {?/section?}
    </select> | <a href="#addblock">增加自定义区块</a></caption>
  <tr align="center">
    <th width="5%">序号</th>
    <th width="14%">区块名</th>
    <th width="10%">模块名</th>
    <th width="7%">位置</th>
    <th width="7%">排序</th>
    <th width="9%">显示类型</th>
    <th width="17%">配置文件写法</th>
    <th width="17%">远程调用js</th>
    <th width="14%">操作</th>
  </tr>
  {?section name=i loop=$blocks?}
  <tr>
    <td align="center">{?$blocks[i].bid?}</td>
    <td align="center">{?$blocks[i].blockname?}</td>
    <td align="center">{?$blocks[i].modname?}</td>
    <td align="center">{?$blocks[i].side?}</td>
    <td align="center">{?$blocks[i].weight?}</td>
    <td align="center">{?$blocks[i].publish?}</td>
    <td align="center"><input name="txtconfig{?$blocks[i].bid?}" type="text" size="20" value="{?$blocks[i].configtext?}" onFocus="this.select()"></td>
    <td align="center"><input name="txtjs{?$blocks[i].bid?}" type="text" size="20" value="{?$blocks[i].jstext?}" onFocus="this.select()"></td>
    <td align="center">{?$blocks[i].action?}</td>
  </tr>
  {?/section?}
  <tr>
    <td colspan="9" class="foot">&nbsp;</td>
  </tr>
</table>
<br /><a name="addblock"></a>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">{?$form_addblock?}</td>
  </tr>
</table>
