<!--#include file="../../here99login/0.asp"--><!--#include file="../../conn/zkconn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<form action="?x=b" method="post" name="myform" id="form">
  <table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
    <tr valign="middle" bgcolor="#CCCCCC"> 
      <td height="25" colspan="2">&nbsp; <font color="#FF3333"><strong>&gt;&gt;添加新图片</strong></font></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="100" height="25" align="center">图片地址</td>
      <td width="304" height="25"> <input name="tp" type="text" class="wenbenkuang" id="tp" size="25"></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="100" height="25" align="center">上传图片</td>
      <td height="25"> <iframe name="ad" frameborder=0 width=100% height=20 scrolling=no src=shangchuan.asp></iframe></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="100" height="25" align="center">图片连接</td>
      <td height="25"> <input name="url" type="text" class="wenbenkuang" id="url" size="25"></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1">
      <td height="25" align="center">显示页面</td>
      <td height="25"><select name="lbid" class="wenbenkuang" id="lbid">
          <option value="0" selected>首页</option>
          <% set rs2 = conn.execute("select * from lb order by lbid")
		  do while not rs2.eof%>
          <option value="<%=rs2("lbid")%>"><%=rs2("lbname")%></option>
          <%rs2.movenext
loop
%>
        </select></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="100" height="25" align="center">&nbsp;</td>
      <td height="25"> <input name="Submit3" type="submit" class="go-wenbenkuang" value="OK,提交"></td>
    </tr>
  </table>
</form>
<% 
function judge(a,b)
  dim res 
  if instr(a,b)>0 then
   res ="checked"
  end if
  judge = res
end function
%>
<% 
function judges(a,b)
  dim ress 
  if (a=b) then
   ress ="selected"
  end if
  judges = ress
end function
%>
  <table width="650" align="center">
  <tr align="center"> 
    <td colspan="6"><p align="center"><font color="#FF3333"><strong>首页精品专题图片（请注意图片顺序位置）</strong></font></p>
  
</td>
  </tr>
  <tr align="center"> 
    <td width="50" bgcolor="#CCCCCC">编号</td>
    <td width="200" bgcolor="#CCCCCC">图片地址</td>
    <td width="200" bgcolor="#CCCCCC">图片连接</td>
    <td width="100" bgcolor="#CCCCCC">显示页面</td>
    <td width="50" bgcolor="#CCCCCC">修改</td>
    <td width="50" bgcolor="#CCCCCC">删除</td>
  </tr>
  <% set rs = conn.execute("select * from zhuanti order by id desc")
   do while not rs.eof%>
  <form name="form1" method="post" action="?x=a">
    <tr> 
      <td width="50" align="center" bgcolor="#f1f1f1"><%=rs("id")%> <input name="id" type="hidden" id="id" value="<%=rs("id")%>"></td>
      <td width="200" bgcolor="#f1f1f1"> 
        <input name="tp" type="text" class="wenbenkuang" id="tp" value="<%=rs("tp")%>" size="25"></td>
      <td width="200" bgcolor="#f1f1f1"> <strong> 
        <input name="url" type="text" class="wenbenkuang" id="url" value="<%=rs("url")%>" size="25">
        </strong></td>
      <td width="100" align="center" bgcolor="#f1f1f1"> 
        <%places=rs("lbid")%> 
        <select name="lbid" class="wenbenkuang" id="lbid">
          <option value="0" <%=judges(places,"0")%>>首页</option>
          <% set rs2 = conn.execute("select * from lb order by lbid")
		  do while not rs2.eof%>
          <option value="<%=rs2("lbid")%>"  <%=judges(places,rs2("lbid"))%>><%=rs2("lbname")%></option>
          <%rs2.movenext
loop
%>
        </select> </td>
      <td width="50" align="center" bgcolor="#f1f1f1">
<input name="Submit" type="submit" class="go-wenbenkuang" value="修改"></td>
      <td width="50" align="center" bgcolor="#f1f1f1">
<input name="Submit2" type="button" class="go-wenbenkuang" value="删除" onclick="window.location='index.asp?x=c&id=<%=rs("id")%>'"></td>
    </tr>
  </form>
  <%rs.movenext
loop
%>
</table>
<% Select case request("x")
   case "a"
        conn.execute("Update zhuanti set tp = '"&request("tp")&"',url = '"&request("url")&"',lbid = "&request("lbid")&" where id="&request("id")&"")
	    Response.redirect "index.asp"
   case "b"
	    conn.execute("Insert into zhuanti(tp,url,lbid)values('"&request("tp")&"','"&request("url")&"',"&request("lbid")&")")
	    Response.redirect "index.asp"
   case "c"
   conn.execute("Delete zhuanti where id="&request("id")&"")
	    Response.redirect "index.asp"
End Select
 %></body>
</html>
<% rs.close
set rs=nothing
rs2.close
set rs2=nothing%>
