<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<script language="c#" runat="server">
protected bool CanDelete(DataRow record)
{
	DataRow[] rows = Manager.Channels.Select(Alias.Channel.ID + " IS NOT NULL AND " + Alias.Instance.InnerID + "=" + record[Alias.Instance.InnerID]);
	if (rows.Length == 0)
		return true;
	else
		return false;
}
</script>
<table border="0" cellpadding="4" cellspacing="1" class="ListTable">
	<thead>
		<tr>
			<th width="40">移动</th>
			<th>名称</th>
			<th width="40">多用户</th>
			<th width="40">修改</th>
			<th width="40">编辑</th>
			<th width="40">管理</th>
			<th width="40">删除</th>
		</tr>
	</thead>
	<tbody>
		<ali:List Object="Instance" Validate="True">
			<ali:Record>
				<tr id="Row<%=InnerID%>" ItemID="<%=InnerID%>" ParentID="">
					<form>
						<td><img name="<%=Name%>" sort="<%=InnerID%>" class="Move" src="<%=ImagePath%>move.gif" ></td>
						<td><input type="text" name="Name" value="<%=Name%>" style="width:200px" class="Text <%=ContentLang%>Font" ></td>
						<td>
							<%If Convert.ToBoolean(IsMultiUser)%>
								是
							<%Else%>
								否
							<%EndIf%>
						</td>
						<td><input type="image" src="<%=ImagePath%>modify.gif" ></td>
						<td><a href="../instance/edit.aspx?Lang=<%=ContentLang%>&amp;ID=<%=InnerID%>">编辑</a></td>
						<td><a href="../../left.aspx?InstanceID=<%=InnerID%>" target="Left">管理</a></td>
						<td>
							<%If CanDelete(Record)%>
								<a href="">删除</a>
							<%EndIf%>
						</td>
					</form>
				</tr>
			</ali:Record>
		</ali:List>
	</tbody>
</table>
