www.gusucode.com > 爱美尔女性商城源码 1.0源码程序 > admintouch/editgongqiu.asp

    <!--#include file="conn.asp"-->
<%
if session("bjxadmin")="" then
response.Write "<script LANGUAGE='javascript'>alert('网络超时或者您还没有登录请登录');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>2 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from bjx_class2 order by Nclassidorder ",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("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.fabuform.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { //这句不是很理解
             document.fabuform.Nclassid.options[document.fabuform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<%
dim gq_id
gq_id=request("id")
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from bjx_gongqiu where gq_id="&gq_id&" ",conn,1,1
if rs1.eof And rs1.bof then
Response.Write "<p align='center' class='contents'> 没有此信息!</p>"
else
%>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr align=center>
    <td background="images/admin_bg_1.gif"><span class="style1">供求信息修改</span></td>
  </tr>
  <tr>
    <td>
      <table width="95%" border="0" cellspacing="3" cellpadding="3" align="center">
        <form name="fabuform" method="post" action="savegongqiu.asp?action=edit&gq_id=<%=gq_id%>">
		<tr>
          <td width="25%"><div align="right">信息主题: </div></td>
          <td width="75%">
            <input name="gq_title" type="text" class="wenbenkuang" value="<%=rs1("gq_title")%>" size="30">          </td>
        </tr>
        <tr>
          <td><div align="right">发 表 人:</div></td>
          <td><input name="gq_ren" type="text" class="wenbenkuang" value="<%=rs1("gq_ren")%>" ></td>
        </tr>
        <tr>
          <td><div align="right">类&nbsp;&nbsp;&nbsp;&nbsp;型:</div></td>
          <td><select name="gq_class" size="1" class="wenbenkuang">
            <option>请选择</option>
            <option value="1" <%if rs1("gq_class")=1 then%>selected<%end if%>>供应信息</option>
            <option value="2" <%if rs1("gq_class")=2 then%>selected<%end if%>>求购信息</option>
            <option value="3" <%if rs1("gq_class")=3 then%>selected<%end if%>>合作信息</option>
          </select></td>
        </tr>
        <tr>
          <td valign="top"><div align="right">选择分类:</div></td>
          <td>大类:
									<%

    rs.open "select * from bjx_class1 order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
                                      <select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.fabuform.anclassid.options[document.fabuform.anclassid.selectedIndex].value)">
<% 
        do while not rs.eof
%>
                                        <option value="<%=rs("anclassid")%>" <%if rs1("anclassid")=rs("anclassid") then%>selected<%end if%>><%=trim(rs("anclass"))%></option>
                                        <%
        rs.movenext
        loop
		end if
        rs.close
%>
                                      </select>
                                      <br>小类: 
                                      <select name="Nclassid">
                                        <%rs.open "select * from bjx_class2 where anclassid="&rs1("anclassid") ,conn,1,1
do while not rs.eof%>
                                        <option value="<%=rs("NclassID")%>" <%if rs1("nclassid")=rs("nclassid") then%>selected<%end if%>><%=rs("Nclass")%></option>
                                        <% rs.movenext
loop
        rs.close
        set rs = nothing
        
%>
                                      </select>
		  </td>
        </tr>
        <tr>
          <td valign="top"><div align="right">信息内容:</div></td>
          <td><textarea name="gq_conment" cols="40" rows="6" class="wenbenkuang"><%=rs1("gq_conment")%></textarea></td>
        </tr>
		<tr>
          <td valign="top"><div align="right">联系信息:</div></td>
          <td><textarea name="gq_lianxi" cols="40" rows="4" id="gq_lianxi" class="wenbenkuang"><%=rs1("gq_lianxi")%></textarea></td>
        </tr>
		<tr>
          <td valign="top">&nbsp;</td>
          <td>
		  <input class="go-wenbenkuang"  type="submit" name="submit" value=" 提交保存 ">
		  </td>
        </tr>
		</form>
    </table></td>
  </tr>
</table>
<%
end if
rs1.close
set rs1=nothing%>
</body>
</html>