<!--#include file="conn.asp"-->
<%	
	'检查用户访问的权限
	call checkuser(5)
	
	'删除栏目
	if request.QueryString("action")="dele" then
		strIDs="(0" & request.Form("chkDele") & ")"
		strSQL="Delete From templet_menu Where id in " & strIDs
		conn.execute strSQL,0,1
		
	end if
	strQueryString="&t=" & request.QueryString("t") & "&name=" & request.QueryString("name")
	strQuery=strQuery & " Where t_code='" & request.QueryString("t") & "'"

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>电子商务自助建站--您理想的助手</title>
<link href="common/styleMain.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function checkform(){
	if(!confirm('确定要删除选择的模板栏目吗？　')){
		return false;
	}
}

</script>
</head>
<body leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="0" align="center">
		  <!--#include file="common/top.asp"-->
          </td>
        </tr>
        <tr> 
          <td height="100%" align="center" valign="top">
<TABLE class=table002 cellSpacing=0 cellPadding=0 border=0>
              <TBODY>
                <TR> 
                  <!--左边开始-->
                  <TD width="20%" align=right vAlign=top> <!--#include file="common/adminleft.asp"--> </TD>
                  <!--左边结束-->
                  <TD width="2%" background="images/rowline.gif">&nbsp;</TD>
                  <!--右边开始-->
                  <TD vAlign=top align=center width="78%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td> <form name="form1" method="post" action="?action=dele<%=strQueryString%>" onSubmit="return checkform()">
                            <TABLE width="100%" height="100%" border=0 cellPadding=6 cellSpacing=0>
                              <TBODY>
                                <TR> 
                                  <TD height="320" vAlign=top bgColor=#ffffff><strong><font color="#FF0000">模板栏目设置：<%=request.QueryString("name")%></font></strong><BR> 
                                    <HR SIZE=1> 
                                    <table width="567" height="85" border="0" cellpadding="2" cellspacing="1" bgcolor="#5F8AC5">
                                      <tr bgcolor="#FFFFFF"> 
                                        <td height="31" colspan="8"><strong>模板栏目 
                                          <input type="button" name="Submit" value="添加栏目" onClick="location='Admin_TempMenuAdd.asp?t=<%=request.QueryString("t")%>&name=<%=request.QueryString("name")%>'">
                                          </strong></td>
                                      </tr>
                                      <tr> 
                                        <td width="40" height="24" align="center" bgcolor="#5F8AC5"><strong><font color="#FFFFFF">序号</font></strong></td>
                                        <td width="97" align="center" bgcolor="#5F8AC5"><strong><font color="#FFFFFF">栏目名称</font></strong></td>
                                        <td width="73" align="center" bgcolor="#5F8AC5"><strong><font color="#FFFFFF">类型</font></strong></td>
                                        <td width="104" align="center" bgcolor="#5F8AC5"><strong><font color="#FFFFFF">链接</font></strong></td>
                                        <td width="58" align="center" bgcolor="#5F8AC5"><strong><font color="#FFFFFF">目标</font></strong></td>
                                        <td width="61" align="center" bgcolor="#5F8AC5"><strong><font color="#FFFFFF">CSS样式</font></strong></td>
                                        <td width="38" align="center" bgcolor="#5F8AC5"><font color="#FFFFFF"><strong>启用</strong></font></td>
                                        <td width="55" align="center" bgcolor="#5F8AC5"> 
                                          <input type="submit" name="Submit2" value="删除"></td>
                                      </tr>
                                      <tr> 
                                        <td height="2" colspan="8" bgcolor="#5F8AC5"></td>
                                      </tr>
                                      <%
									strSQL="Select * from v_lamu " & strQuery & " Order by tm_index"
									rs.open strSQL,conn,1,1
									%>
                                      <%
									 '循环输出
									 for i=1 to rs.recordcount
										if rs.eof then exit for
										if i mod 2=0 then
											strColor="#F8F8F8"
										else
											strColor="#fFfFfF"
										end if
									 %>
                                      <tr bgcolor="<%=strColor%>"> 
                                        <td height="23" align="center"><%=rs("tm_index")%></td>
                                        <td><a href="Admin_TempMenuAdd.asp?id=<%=rs("id")%>&name=<%=request.QueryString("name")%>&t=<%=request.QueryString("t")%>"><%=rs("tm_text")%></a></td>
                                        <td align="center"><%=rs("l_name")%></td>
                                        <td align="center"><%=rs("tm_href")%> 
                                        </td>
                                        <td align="center"><%=rs("tm_target")%> 
                                        </td>
                                        <td align="center"><%=rs("tm_class")%> 
                                        </td>
                                        <td align="center"><%=rs("tm_enable")%></td>
                                        <td align="center"><input name="chkDele" type="checkbox" id="chkDele" value="<%=rs("id")%>"></td>
                                      </tr>
                                      <%
										 rs.movenext
									  next
									%>
                                    </table>
                                    
                                  </TD>
                                </TR>
                              </TBODY>
                            </TABLE>
                          </form></td>
                      </tr>
                    </table> 
                  </TD>
                </TR>
              </TBODY>
            </TABLE></td>
        </tr>
        <tr> 
          <td height="0" align="center">
		  <!--#include file="common/bottom.asp"-->
		  </td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
