<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>左导航栏列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	background-color: #CCCCCC;
	margin-top: 0px;
}
-->
</style></head>

<body>
<table height="238" align="center" cellpadding="5" bgcolor="#FFFFFF">
  <tr><td valign="top">
<table width="444" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
          <td height="18">
<div align="center"></div></td>
  </tr>
</table>
<table width="550" height="23" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr> 
    <td width="103" height="17">网站名称</td>
    <td width="196">导航栏</td>
    <td width="86">顺序</td>
    <td width="150">动作　　 <a href="leftadd.asp">增加左栏目</a></td>
  </tr>
</table>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from e_left order by l_parent,l_num"
rs.open sql,conn,1,1
if rs.bof or rs.eof then
	response.write "<div align=center><br>没有记录!</div>"
else
	do while not rs.eof
	l_id=rs("l_id")
	l_parent=rs("l_parent")
	l_title=rs("l_title")
	l_num=rs("l_num")

%>

<table width="550" height="35" border="0" align="center" cellpadding="0" cellspacing="3">
  <form name="form<%=id%>" method="post" action="leftmodify.asp">
    <tr> 
      <td width="107">

<%
		set rs2=server.CreateObject("adodb.recordset")
		sql2="select * from e_board order by num"
		rs2.open sql2,conn,1,1
		if rs2.bof or rs2.eof then
			title="null"
		else
			do while not rs2.eof
			id=rs2("id")
			title=rs2("title")
			
			if id=l_parent then
				response.write title &"<input type=hidden name='l_parent' value='"&id&"'>"
				'response.write "<option value='"&id&"' selected>"&title&"</option>"
			else
				'response.write "<option value='"&id&"'>"&title&"</option>"
			end if
			rs2.movenext
			loop
		end if
		rs2.close
		set rs2=nothing

%>

	</td>
      <td width="194">
        <input type="text" name="l_title" value='<%=l_title%>'></td>
      <td width="87"> 
        <input name="l_num" type="text" size="5" maxlength="5"  value=<%=l_num%>> 
        <input name="l_id" type="hidden" size="5" value=<%=l_id%>> </td>
      <td width="147"> 
        <input type="submit" name="Submit" value="修改">
        　 <a href="leftdel.asp?l_id=<%=l_id%>" onclick="return confirm('是否删除 <%=l_title%>?')">DEL</a></td>
    </tr>
  </form>
</table>
<%
	rs.movenext
	loop
end if
%>
<p>&nbsp; </p>
</td></tr></table>
</body>
</html>

