<!--#Include file="Conn.asp"-->
<!--#include file=cookies.asp-->
<%
dim action,id,dname
id=request.QueryString("id")
action=request.querystring("action")
dbmname=trim(request("bmname"))
select case action
case "add" 
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from jle_dh",conn,1,3
rs.AddNew
rs("bmname")=dbmname
rs("link")=trim(request("link"))
rs("dhcolor")=trim(request("dhcolor"))
rs.Update
rs.Close
set rs=nothing

case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from jle_dh where id="&id,conn,1,3
rs("bmname")=dbmname
rs("link")=trim(request("link"))
rs("dhcolor")=trim(request("dhcolor"))
rs.Update
rs.Close
set rs=nothing

case "del"
conn.execute ("delete from jle_dh where id="&id)
conn.close   
set conn=nothing 
response.Redirect "textlinkdh.asp"
end select
%>
<html>
<head>
<title>菜单管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
<link href="inc_style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #E7EEF5;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="96%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
  <tr> 
    <td height="20"  class="tdbar" align="center"><strong><span style="color: #FF0000">自定义导航底部链接管理</span></strong></td>
  </tr>
  <tr> 
    <td  class="tdbar1"> <br>
	<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
          <td width="49" height="21"  class="tdbar">编号</td>
          <td width="236"  class="tdbar">链接名称</td>
          <td width="277"  class="tdbar">链接地址</td>
          <td width="278"  class="tdbar">菜单颜色</td>
          <td width="410"  class="tdbar">管理操作</td>
        </tr>
        <%set rs=server.CreateObject("adodb.recordset")
		  rs.Open "select * from jle_dh order by id",conn,1,1
		  dim follows
		  if rs.EOF and rs.BOF then
          response.write"<tr bgcolor=#FFFFFF><td colspan='4'><p align='center'><font color='red'>暂无！</font></td></tr></table><br>"
		  follows=0
		  else
		  do while not rs.EOF
		  i=i+1
		  %>
        <form name="form1" method="post" action="?action=edit&id=<%=int(rs("id"))%>">
          <tr bgcolor="#FFFFFF" align="center">
		  <td bgcolor="#F4F7F9"><%=i%></td>
		  
            <td bgcolor="#F4F7F9"><input name="bmname" type="text" id="bmname" value="<%=trim(rs("bmname"))%>" size="12"></td>
            <td bgcolor="#F4F7F9"><input name="link" type="text" id="link" value="<%=trim(rs("link"))%>" size="20"></td>
            <td bgcolor="#F4F7F9"><select name="dhcolor" id="dhcolor" >
                                  <option style="background: #<%=trim(rs("dhcolor"))%>" value="<%=trim(rs("dhcolor"))%>" selected>标题颜色</option>
                                  <option style="background: #000088" value="000088"> </option>
                                  <option style="background: #0000ff" value="0000ff"> </option>
                                  <option style="background: #008800" value="008800"> </option>
                                  <option style="background: #008888" value="008888"> </option>
                                  <option style="background: #0088ff" value="0088ff"> </option>
                                  <option style="background: #00a010" value="00a010"> </option>
                                  <option style="background: #1100ff" value="1100ff"> </option>
                                  <option style="background: #111111" value="111111"> </option>
                                  <option style="background: #333333" value="333333"> </option>
                                  <option style="background: #50b000" value="50b000"> </option>
                                  <option style="background: #880000" value="880000"> </option>
                                  <option style="background: #8800ff" value="8800ff"> </option>
                                  <option style="background: #888800" value="888800"> </option>
                                  <option style="background: #888888" value="888888"> </option>
                                  <option style="background: #8888ff" value="8888ff"> </option>
                                  <option style="background: #aa00cc" value="aa00cc"> </option>
                                  <option style="background: #aaaa00" value="aaaa00"> </option>
                                  <option style="background: #ccaa00" value="ccaa00"> </option>
                                  <option style="background: #ff0000" value="ff0000"> </option>
                                  <option style="background: #ff0088" value="ff0088"> </option>
                                  <option style="background: #ff00ff" value="ff00ff"> </option>
                                  <option style="background: #ff8800" value="ff8800"> </option>
                                  <option style="background: #ff0005" value="ff0005"> </option>
                                  <option style="background: #ff88ff" value="ff88ff"> </option>
                                  <option style="background: #ee0005" value="ee0005"> </option>
                                  <option style="background: #ee01ff" value="ee01ff"> </option>
                                  <option style="background: #3388aa" value="3388aa"> </option>
                                  <option style="background: #000000" value="000000"> </option>
                                </select></td>
            <td bgcolor="#F4F7F9"><input type="submit" name="Submit" value="修 改">
            &nbsp; <input type="button" name="DEL" onClick="{if(confirm('确定要删除这个链接吗？\n此操作不可以恢复！')){location.href='?id=<%=rs("id")%>&action=del';}return false;}" value="删除" >            </td>
          </tr>
        </form>
        <%
		rs.MoveNext
          loop
          follows=rs.RecordCount
          end if%>
      </table>
	<br></td>
  </tr>
</table>
<br>
<table width="96%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
  <tr> 
    <td height="20"  class="tdbar" align="center"><span style="color: #FF0000"><strong><font style="font-size:14px">添加自定义导航底部链接管理</font></strong></span></td>
  </tr>
  <tr> 
    <td  class="tdbar1">
	<br>
	<table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
          <td width="47"  class="tdbar">编号 </td>
          <td width="230"  class="tdbar">链接名称</td>
          <td width="262"  class="tdbar">链接地址</td>
          <td width="313"  class="tdbar">菜单颜色</td>
          <td width="372"  class="tdbar">确定操作</td>
        </tr>
        <form name="form1" method="post" action="?action=add">
          <tr align="center" bgcolor="#FFFFFF"> 
            <td bgcolor="#F4F7F9"><%=rs.RecordCount+1%></td>
	        <td bgcolor="#F4F7F9"><input name="bmname" type="text" id="bmname" size="12"></td>
	        <td bgcolor="#F4F7F9"><input name="link" type="text" id="link" size="20"></td>
	        <td bgcolor="#F4F7F9"><select name="dhcolor" id="dhcolor">
                                  <option style="COLOR: black" value="" selected>标题颜色</option>
                                  <option style="background: #000088" value="000088"> </option>
                                  <option style="background: #0000ff" value="0000ff"> </option>
                                  <option style="background: #008800" value="008800"> </option>
                                  <option style="background: #008888" value="008888"> </option>
                                  <option style="background: #0088ff" value="0088ff"> </option>
                                  <option style="background: #00a010" value="00a010"> </option>
                                  <option style="background: #1100ff" value="1100ff"> </option>
                                  <option style="background: #111111" value="111111"> </option>
                                  <option style="background: #333333" value="333333"> </option>
                                  <option style="background: #50b000" value="50b000"> </option>
                                  <option style="background: #880000" value="880000"> </option>
                                  <option style="background: #8800ff" value="8800ff"> </option>
                                  <option style="background: #888800" value="888800"> </option>
                                  <option style="background: #888888" value="888888"> </option>
                                  <option style="background: #8888ff" value="8888ff"> </option>
                                  <option style="background: #aa00cc" value="aa00cc"> </option>
                                  <option style="background: #aaaa00" value="aaaa00"> </option>
                                  <option style="background: #ccaa00" value="ccaa00"> </option>
                                  <option style="background: #ff0000" value="ff0000"> </option>
                                  <option style="background: #ff0088" value="ff0088"> </option>
                                  <option style="background: #ff00ff" value="ff00ff"> </option>
                                  <option style="background: #ff8800" value="ff8800"> </option>
                                  <option style="background: #ff0005" value="ff0005"> </option>
                                  <option style="background: #ff88ff" value="ff88ff"> </option>
                                  <option style="background: #ee0005" value="ee0005"> </option>
                                  <option style="background: #ee01ff" value="ee01ff"> </option>
                                  <option style="background: #3388aa" value="3388aa"> </option>
                                  <option style="background: #000000" value="000000"> </option>
                                </select></td>
	        <td bgcolor="#F4F7F9"><input type="submit" name="Submit3" value="添 加"></td>
          </tr>
        </form>
      </table>
	<br></td>
  </tr>
</table>
</body> 
</html> 