<!--#include file=conn.asp-->
<!--#include file=../config.asp-->
<!--#include file=cookies.asp-->
<%
dim flag
flag=request.cookies("foxwww")("fox")
if flag=10 then
response.Write "<script LANGUAGE='javascript'>alert('您只是后台测试员，请注意身份！');window.location='right.asp';</script>"
response.end
end if%>
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="images/fox.css">
<style type=text/css>
BODY{
	margin:0px;
	FONT-SIZE: 12px;
	FONT-FAMILY: "宋体", "Verdana", "Arial", "Helvetica", "sans-serif";
	background-color: #CCCC99; 
	scrollbar-highlight-color: #CC9933; 
	scrollbar-arrow-color: #FFFFFF; 
	scrollbar-base-color: #CC9933
}
table { border:0px; }
td { font:normal 12px 宋体; }
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 宋体; color:#111111; text-decoration:none; }
a:hover { color:#384780;text-decoration:underline; }
.sec_menu { border-left:2px solid #CC3300; border-right:2px solid #CC3300; border-bottom:2px solid #CC3300; overflow:hidden; background:#ffffff; }
.menu_title {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title span { position:relative; top:2px; left:8px; color:#FFFF00; font-weight:bold; }
.menu_title2 {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title2 span { position:relative; top:2px; left:8px; color:#FEFEFE; font-weight:bold; }
input,select,Textarea{
font-family:宋体,Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
</style>
<title>编辑</title>
<body topmargin="0" leftmargin="0">
<div align="center">
  <center>
  <table width="100%" border="0" cellpadding="0" style="border-width:0; border-collapse: collapse" bordercolor="#111111">
                <form action="ad_editchk.asp" name="myform" method="POST">
                  <tr> 
                  <td width="100%">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-width: 0">
                      
                    <tr> 
                        <td height="34" bgcolor="#CC3300" colspan="2">
                        <p align="center"><font color="#FFFFFF"><b>修改信息</b></font></td>
                      </tr>
                      <tr> 
                        <td height="12" bgcolor="#EEEEEE">
                        <p>　</td>
                        <td height="12" bgcolor="#EEEEEE">
                        　</td>
                      </tr>
                      <tr> 
                        <td height="25" bgcolor="#EEEEEE">
                        信息类别</td>
                        <td height="25" bgcolor="#EEEEEE">
  <%
dim rs
dim sql,i
dim count,username
dim id,class1,class2,company,leixing,jiage,sheng,shi,xiang,memo,name,email,usertel,tj,ad,adpic,youx
id=trim(request("id"))
set rs=server.createobject("adodb.recordset")
sql = "select * from [FOX_xinxi] where id="&cstr(id)
rs.open sql,conn,1,1
if rs.eof then
response.Write "<script LANGUAGE='javascript'>alert('此信息有问题！');history.go(-1);</script>"
response.end
end if
id=rs("id")
class1=rs("class1")
class2=rs("class2")
company=rs("company")
leixing=rs("leixing")
jiage=rs("jiage")
sheng=rs("sheng")
shi=rs("shi")
xiang=rs("xiang")
ad=rs("ad")
adpic=rs("adpic")
youx=rs("youxiao")
memo=rs("memo")
name=rs("name")
email=rs("email")
usertel=rs("usertel")
tj=rs("tj")
rs.close
sql = "select * from FOX_class2 order by paixu desc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
        subcat[<%=count%>] = new Array("<%= trim(rs("class2"))%>","<%= trim(rs("class1"))%>","<%= trim(rs("id"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.class2.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.class2.options[document.myform.class2.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</SCRIPT>
  <%
sql = "select * from FOX_class1 order by paixu desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加分类。"
response.end
else
%>
  <SELECT name="class1" onChange="changelocation(document.myform.class1.options[document.myform.class1.selectedIndex].value)" size="1">
	  <OPTION value="0">==分类==</OPTION>
	  <%do while not rs.eof%>
	  <OPTION  <%if trim(class1)=cstr(rs("id")) then%>selected<%end if%>  value="<%=trim(rs("id"))%>"><%=trim(rs("class1"))%></OPTION>
          <%
        rs.movenext
        loop
	    end if
        rs.close
        %>
  </SELECT>
  <SELECT name="class2">
  <%
sql = "select id,class2 from FOX_class2 where id="&cstr(class2)
rs.open sql,conn,1,1
%>
  <OPTION  <%if trim(class2)=cstr(rs("id")) then%>selected<%end if%>  value="<%=trim(rs("id"))%>"><%=trim(rs("class2"))%></OPTION>
  <%rs.close%>
  </SELECT><input type="hidden" name="id" size="7" maxlength="6" value="<%=id%>"></td>
                      </tr>
                      <tr> 
                        <td height="25" bgcolor="#EEEEEE">
                        信息标题：</td>
                        <td height="25" bgcolor="#EEEEEE">
                        <input type="text" maxlength="40" name="company" size="47" value="<%=company%>">（<font color="#CC5200">40字以内</font>）</td>
                      </tr>
                      
                                      <tr> 
                        <td height="25" bgcolor="#EEEEEE">
                        所属地区：</td>
                        <td height="25" bgcolor="#EEEEEE">
<%dim rsq,sqlq,xiangc,shengc,shic

set rsq=server.createobject("adodb.recordset") 
sqlq = "select sheng from [FOX_sheng] where id="&sheng&""
rsq.open sqlq,conn,1,1
shengc=rsq("sheng")
rsq.close
set rsq=nothing
set rsq=server.createobject("adodb.recordset") 
sqlq = "select shi from [FOX_shi] where id="&shi&""
rsq.open sqlq,conn,1,1
shic=rsq("shi")
rsq.close
set rsq=nothing
set rsq=server.createobject("adodb.recordset") 
sqlq = "select xiang from [FOX_xiang] where id="&xiang&""
rsq.open sqlq,conn,1,1
xiangc=rsq("xiang")
rsq.close
set rsq=nothing
%>	<%=shengc%> => <%=shic%> => <%=xiangc%>
</td>
                      </tr>

                                      <tr> 
                        <td height="25" bgcolor="#EEEEEE">
                        是否图片：</td>
                        <td height="25" bgcolor="#EEEEEE">
                        　<%if adpic="0" then%>否<iframe name="I1" src="cardup.asp?id=<%=id%>" marginwidth="1" marginheight="1" height="26" width="47%" scrolling="no" border="0" frameborder="0"></iframe><%else%>是<img border="0" src="../adupfiles/<%=adpic%>" width="186" height="36">  
						<a href="adt_del.asp?id=<%=id%>">删图</a><%end if%></td>
                      </tr>

                                      <tr> 
                        <td height="25" bgcolor="#EEEEEE">
                        张贴内容：</td>
                        <td height="25" bgcolor="#EEEEEE">
                        <textarea rows="3" name="ad" cols="61"><%=ad%></textarea></td>
                      </tr>

                                      <tr> 
                        <td height="25" bgcolor="#EEEEEE">
                        <p>信息说明：</td>
                        <td height="25" bgcolor="#EEEEEE">
                        <textarea rows="13" name="memo" cols="72"><%=memo%></textarea></td>
                      </tr>

                      <tr> 
                        <td height="25" bgcolor="#EEEEEE" colspan="2">
                        &nbsp;&nbsp;&nbsp; 有效期：<%=youx%>天(不准)
						　　　<input type="radio" name="yo" checked value="0">不增加时间&nbsp; 
						<input type="radio" name="yo" value="1"><b>增加时间</b><select size="1" name="ttt">
						<option selected value="7">一周</option>
						<option value="30">一月</option>
						<option value="90">三月</option>
						<option value="365">一年</option>
						</select></td>
                      </tr>

                      <tr> 
                        <td height="25" bgcolor="#EEEEEE" colspan="2">
                        　&nbsp;<input type="radio" value="1" <%if tj=1 then%>checked<%end if%> name="tj">通过验证并推荐<input type="radio" <%if tj=0 then%>checked<%end if%> name="tj" value="0">通过验证但不推荐&nbsp; <a href="xinxi_del.asp?selectedid=<%=id%>">
					<font color="#FF0000">删除该信息</font></a></td>
                      </tr>

                      <tr> 
                        <td height="25" bgcolor="#EEEEEE" colspan="2">
                        <p align="center">
                        <input name="I2" type="image" onclick="javascript:return CheckForm();" src="images/Login_but.gif" width="62" height="22" border="0"></td>
                      </tr>
                      <tr> 
                        <td height="20" bgcolor="#EEEEEE" colspan="2">
                        <p align="left">　</td>
                      </tr>
                      
                  </table>
                  </td>
                </tr>
                </form>
              </table>
  </center>
</div></body></html>