<!--#include file="conn.asp"-->
<!--#include file="check2.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>
<!--
td{font-size:9pt}
body {
	margin-top: 5px;margin-left: 2px;
}
.style3 {color: #A84E22; font-weight: bold; }
#tabcss{
	BORDER-COLLAPSE: collapse;
	border-top-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-left-style: solid;
	border-top-color: #dddddd;
	border-left-color: #dddddd;
}#tabcss td {
	line-height: 24px;
	padding-left: 10px;
	padding-top: 2px;
	padding-bottom: 2px;
	color: #333333;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-right-style: solid;
	border-bottom-style: solid;
	border-right-color: #dddddd;
	border-bottom-color: #dddddd;
}
.STYLE4 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
<%
dim sql4,rs4,id,num,pkid
dim biaoflag,lefturl,righturl,bannarflag,bannarurl,changeflag,curl1,curl2,curl3,curl4,curl5


Submit2 = trim(request.form("Submit2"))
if Submit2="保存" then
	
		id = trim(request.form("id"))
		
		kindleftpic = trim(request.form("kindleftpic"))
		kindlefturl = trim(request.form("kindlefturl"))
		
		rightpic1 = trim(request.form("rightpic1"))
		righturl1 = trim(request.form("righturl1"))
		rightpic2 = trim(request.form("rightpic2"))
		righturl2 = trim(request.form("righturl2"))
		rightpic3 = trim(request.form("rightpic3"))
		righturl3 = trim(request.form("righturl3"))


		kindbottompic = trim(request.form("kindbottompic"))
		kindbottomurl = trim(request.form("kindbottomurl"))

		sql4="select * from sh_kind where id="&id
		set rs4=server.createobject("adodb.recordset")
		rs4.open sql4,conn,1,3
		if rs4.bof or rs4.eof then
				rs4.addnew
				
				rs4("kindleftpic") = kindleftpic
				rs4("kindlefturl") = kindlefturl
				rs4("rightpic1") = rightpic1
				rs4("righturl1") = righturl1
				rs4("rightpic2") = rightpic2
				rs4("righturl2") = righturl2
				rs4("rightpic3") = rightpic3
				rs4("righturl3") = righturl3
				rs4("kindbottompic") = kindbottompic
				rs4("kindbottomurl") = kindbottomurl
				rs4.update
		else
				rs4("kindleftpic") = kindleftpic
				rs4("kindlefturl") = kindlefturl
				rs4("rightpic1") = rightpic1
				rs4("righturl1") = righturl1
				rs4("rightpic2") = rightpic2
				rs4("righturl2") = righturl2
				rs4("rightpic3") = rightpic3
				rs4("righturl3") = righturl3
				rs4("kindbottompic") = kindbottompic
				rs4("kindbottomurl") = kindbottomurl
				rs4.update
		end if
		rs4.close
		set rs4=nothing
		'response.end
		response.write "<script language=JavaScript>" & "alert('保存成功!');"& "window.location.href='kindad.asp?id="&id&"';" & "</script>"
		response.end
end if

%>
<script language=javascript src=../images/mouse.js></script>
</head>

<body bgcolor="#fcfcfc">       
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="tabcss">
  <form name="form1" method="post" action="kindad.asp">
    <%
		id = request.querystring("id")
		sql4="select * from sh_kind where id="&id
		set rs4=server.createobject("adodb.recordset")
		rs4.open sql4,conn,1,1
		if rs4.bof or rs4.eof then
			response.write "没有符合条件记录！"
		else
			kindname = rs4("kindname") 
				kindleftpic=rs4("kindleftpic") 
				kindlefturl=rs4("kindlefturl") 
				rightpic1=rs4("rightpic1") 
				righturl1=rs4("righturl1") 
				rightpic2=rs4("rightpic2") 
				righturl2=rs4("righturl2") 
				rightpic3=rs4("rightpic3") 
				righturl3=rs4("righturl3") 

				kindbottompic = rs4("kindbottompic")
				kindbottomurl = rs4("kindbottomurl")

	%>
  <tr bgcolor="#E1EFFF"> 
    <td height=30 colspan=2>&nbsp;<b>设置首页商品分类广告：</b> <%=kindname%></td>
  </tr>
    <tr bgcolor='#Ffffff' onMouseOver="this.style.background='#FFE4CA';" onMouseOut="this.style.background='#ffffff';"> 
      <td height='23' align='right'><b>首页分类左边大图</b></td>
      <td>上传图片 
        <input name='kindleftpic' type=text id="kindleftpic" value="<%=kindleftpic%>" size="40"> 
        <input type="button" name="Button2" value="选图片" onClick="window.open('../imp/uploadpic.asp?size=kindleftpic','','width=380,height=400,top=130,left=250')">
        (200 X 约265) <img src='../images/helpmemo.gif' alt="图片预览：<br><img src='../<%=kindleftpic%>'>"></td>
    </tr>
    <tr bgcolor='#Ffffff' onMouseOver="this.style.background='#FFE4CA';" onMouseOut="this.style.background='#ffffff';"> 
      <td height='23' align='right'>&nbsp;</td>
      <td>链接地址 
        <input name='kindlefturl' type=text id="kindlefturl" value="<%=kindlefturl%>" size="40">
       (必填)       </td>
    </tr>

    <tr bgcolor='#Ffffff' onMouseOver="this.style.background='#FFE4CA';" onMouseOut="this.style.background='#ffffff';"> 
      <td height='23' align='right'>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>

    <tr bgcolor='#Ffffff' onMouseOver="this.style.background='#FFE4CA';" onMouseOut="this.style.background='#ffffff';"> 
      <td height='23' align='right'><b>首页每分类下横幅广告</b></td>
      <td>上传图片 
        <input name='kindbottompic' type=text id="kindbottompic" value="<%=kindbottompic%>" size="40"> 
        <input type="button" name="Button2" value="选图片" onClick="window.open('../imp/uploadpic.asp?size=kindbottompic','','width=380,height=400,top=130,left=250')">
        (996 X 约62) <img src='../images/helpmemo.gif' alt="图片预览：<br><img src='../<%=kindbottompic%>'>"></td>
    </tr>
    <tr bgcolor='#Ffffff' onMouseOver="this.style.background='#FFE4CA';" onMouseOut="this.style.background='#ffffff';"> 
      <td height='23' align='right'>&nbsp;</td>
      <td>链接地址 
        <input name='kindbottomurl' type=text id="kindbottomurl" value="<%=kindbottomurl%>" size="40">
       (可选，如果留空，则此分类下面不显示广告图)       </td>
    </tr>

    <tr bgcolor='#Ffffff' onMouseOver="this.style.background='#FFE4CA';" onMouseOut="this.style.background='#ffffff';"> 
      <td height='23' align='right'>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>

	 <input name='id' type=hidden value="<%=id%>" size="40">

    <tr bgcolor='#Ffffff' onMouseOver="this.style.background='#FFE4CA';" onMouseOut="this.style.background='#ffffff';"> 
      <td height='35' align='right'>&nbsp;</td>
      <td><input type="submit" name="Submit2" value=" 保存 " onClick="return confirm('确认要保存“广告图片设置”吗？')"> &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="reset" name="Submit3" value=" 重置 "> </td>
    </tr>
    <%				
		end if
rs4.close
set rs4=nothing		
%>
  </form>
</table>
<br><br><br>

</body>
</html>
<%
call connclose
%>

