<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={sys_charset}">
<title>template layout</title>
<link href="{adminStylePath}style/common.css" rel="stylesheet" type="text/css">
<script language="javascript" src="{adminStylePath}js/validate.js"></script>
<script language="javascript" src="{adminStylePath}js/common.js"></script>
<script>
function setShowType()
{
	var tagO = document.getElementsByTagName('input');

    for (var i=0;i<tagO.length;i++)
    {    
        if(tagO[i].name.toLowerCase()=="type")
        {	
            if(tagO[i].checked && (tagO[i].value== 0 || tagO[i].value== 3))
            {
                document.getElementById('sql_select_tr').style.display='';
                break;
            }
            else
            {
                document.getElementById('sql_select_tr').style.display='none';
            }
        } 
    }
}
function init()
{
	setShowType();
}
</script>
</head>

<body onload="init()">
<table class="nav_table" cellpadding="0" cellspacing="0">	
	<tr>
		<td class="nav_td">{menu_nav}</td>
	</tr>	
</table>
<table class="page_control" cellpadding="0" cellspacing="0">
	<tr>
		<td width="200" valign="bottom">
			<table class="page_menu" cellpadding="0" cellspacing="0">
				<tr>
					<td width="50" class="page_menu_hidden" onMouseOver="this.className='page_menu_over'" onMouseOut="this.className='page_menu_hidden'" onclick="window.location.href='template_edit.php?act=edit&selectid={selectid}'">常 规</td>
					<td width="60" class="page_menu_display" onMouseOver="this.className='page_menu_over'" onMouseOut="this.className='page_menu_display'" >页面板块</td>
				</tr>
			</table>
		</td>
		<td valign="top">
			<table class="toolbar_table" cellpadding="0" cellspacing="0">
				<tr>
					<td class="toolbar_td">{toolbar}</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table cellpadding="0" cellspacing="0" class="edit_tb">
  
  <form name="editForm" method="post" action="" onSubmit="return Validator.Validate(this,3)">
  	<input type="hidden" name="selectid" id="selectValue" value="{selectid}">
    <input type="hidden" name="selectValue" id="selectValue" value="{selectid}">
    <input type="hidden" name="template_id" value="{template_id}">
	<input type="hidden" name="template_layout_id" value="{template_layout_id}">
    <tr> 
      <td>
      	<img src="{adminStylePath}images/list.gif" align="absmiddle">&nbsp;<span class="edit_subtitle_txt">板块列表</span>
      	<input type="checkbox" id="chk_list" value="1" checked onclick="showDisplayHidden('chk_list','list_layout')">
      </td>
    </tr>
    <tr id="list_layout"> 
      <td>
      	<table class="list_tb" cellpadding="0" cellspacing="0">
				<tr class="list_title_tr_bg">
				<td width="5%" class="list_title_td">编号</td>
				<td width="5%" class="list_title_td">ID</td>
				<td width="20%" class="list_title_td">标题</td>
				<td width="20%" class="list_title_td">板块位置标记</td>
				<td width="10%" class="list_title_td">状态</td>
				<td width="6%" class="list_title_td">类型</td>
				<td width="8%" class="list_title_td">排序</td>
                <td width="6%" class="list_title_td">文章</td>
				<td width="20%" class="list_title_td">操作</td>
				</tr>
				<!-- BEGIN ListLayout -->
				<tr class="list_sub_tr_bg" onMouseOver="this.className='list_mouseover_tr_bg'" onMouseOut="this.className='list_sub_tr_bg'" >
				<td width="5%">{ListLayout.num}</td>
				<td width="5%">{ListLayout.id}</td>
				<td width="20%" title="{ListLayout.intro}"><span class="{ListLayout.title_style}">{ListLayout.title}</span></td>
				<td width="20%">{ListLayout.layout_code}</td>
				<td width="10%">{ListLayout.status}</td>
				<td width="6%">{ListLayout.type}</td>
				<td width="8%">{ListLayout.orderby}</td>
                <td width="6%"><a href="../mod_article/article.php?layout_id={ListLayout.id}"><img src="{adminStylePath}images/go-doc-manage.gif" width="16" height="16"></a></td>
				<td width="20%">{ListLayout.operate_btn}</td>
				</tr>
				<!-- END ListLayout -->
				</table> 	
      </td>
    </tr>
    <tr> 
      <td>
      	<img src="{adminStylePath}images/edit.gif" align="absmiddle">&nbsp;<span class="edit_subtitle_txt">编辑板块</span>
      	<input type="checkbox" id="chk_edit" value="1" checked onclick="showDisplayHidden('chk_edit','edit_layout')">
      </td>
    </tr>
    <tr id="edit_layout"> 
      <td>
      	<table width="100%" cellpadding="0" cellspacing="0" >
      		<tr> 
			      <td width="30%"  class="edit_td_txt">类型:</td>
			      <td width="70%"  class="edit_td_input">
			      	{layout_type}
			      </td>
			    </tr>
      		<tr> 
			      <td width="30%"  class="edit_td_txt">标题:</td>
			      <td width="70%"  class="edit_td_input">
			      	<input type="text" name="title" class="input_text" value="{title}" dataType="LimitB" min="1" max="50"  msg="[1,50]个字符之内">
			      </td>
			    </tr>
			    <tr> 
			      <td width="30%"  class="edit_td_txt">
			      	板块位置标记:<br/>
			      	<span class="input_intro">板块位置标记必须和前台模板页一一对应</span>
			      </td>
			      <td width="70%"  class="edit_td_input">
			      	<input type="text" name="layout_code" class="input_text" value="{layout_code}" dataType="LimitB" min="1" max="50"  msg="[1,50]个字符之内"> &nbsp;&nbsp; ID:{template_layout_id}
			      	<input type="hidden" name="layout_code_old" value="{layout_code_old}">
			      </td>
			    </tr>  
			    <tr id="sql_select_tr"> 
			      <td width="30%"  class="edit_td_txt">SQL语句:</td>
			      <td width="70%"  class="edit_td_input">
					<textarea name="sql_select" class="input_textarea" cols="58" rows="3" style="width:500px">{sql_select}</textarea> 
			      </td>
			    </tr>  
			    <tr> 
			      <td width="30%" class="edit_td_txt">描叙:</td>
			      <td width="70%" class="edit_td_input">
			      	<textarea name="intro" class="input_textarea" cols="58" rows="3" require="false" dataType="LimitB" min="0" max="255"  msg="[0,255]个字符之内" style="width:500px">{intro}</textarea> 
			      </td>
			    </tr>
			    <tr> 
			      <td width="20%" class="edit_td_txt">
			      	状 态:<br/>
			      	<span class="input_intro">
			      		<li>文章是否可以选择板块位置<br/>(显示:可以，隐藏:不能)</li>
			      		<li>模板自动显示板块位置<br/>(显示:可以，隐藏:不能)</li>
			      	</span>
			      </td>
			      <td width="80%"  class="edit_td_input">{status}</td>
			    </tr>
			  </table>
      </td>
    </tr>  
  </form>
</table>

</body>
</html>

