<!-- #include file="../inc/conn.asp" -->
<!--#include file="../admin/check_master.asp" -->
<%
BBS_Cate_ID=request("BBS_Cate_ID")
Layer=request("Layer")
url=request.servervariables("http_referer")

if Layer="0" then
	Layer_name="一级类别"
	BBS_Cate_PID=0'父ID
elseif Layer="1" then
	Layer_name="二级类别"
end if

sql="select * from BBS_CATE where BBS_Cate_ID='"&BBS_Cate_ID&"'"
set rsr=server.createobject("adodb.recordset")
rsr.open sql,conn,1,1

%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/xmwuye.css" rel="stylesheet" type="text/css">

<script language="javascript">
<!--
	function check(form)
		{

		if (form.BBS_Cate_Name.value=="")
			{
			alert("请输入类别名称！");
			form.BBS_Cate_Name.focus();
			return false;
			}
		if (form.BBS_Cate_Manager_Name.value=="")
			{
			alert("请输入版主姓名！");
			form.BBS_Cate_Manager_Name.focus();
			return false;
			}
			return true;
		}
//-->
</script>


</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="myform" method="post" action="Category_mod_act.asp" onSubmit="return check(this)">
  <table width="500" border="0" align="center" cellspacing="1" cellpadding="2" bgcolor="#333333">
    <tr bgcolor="#CCCCCC"> 
      <td colspan="2"> 
        <div align="center"><b><%=Layer_name%>修改</b></div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=30%><%=Layer_name%>名称：</td>
      <td> 
        <input type="text" name="BBS_Cate_Name" size="40" value="<%=rsr("BBS_Cate_Name")%>">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td><%=Layer_name%>版主：</td>
      <td> 
        <input type="text" name="BBS_Cate_Manager_Name" size="40" value="<%=rsr("BBS_Cate_Manager_Name")%>">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td><%=Layer_name%>版主Email：</td>
      <td> 
        <input type="text" name="BBS_Cate_Manager_Email" size="40" value="<%=rsr("BBS_Cate_Manager_Email")%>">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td>位置排列</td>
      <td> 
        <input name="totop" type="text" id="totop" value="<%=rsr("totop")%>" size="40">
      </td>
    </tr>
<!--<%if rsr("Loupan_ID")<>0 then%>
    <tr bgcolor="#FFFFFF"> 
      <td width=30%>楼盘区域：</td>
      <td> 
        <select name="Loupan_Area" onChange="changelocation(document.myform.Loupan_Area.options[document.myform.Loupan_Area.selectedIndex].value)">
                  <option value="<%=rsr("Loupan_Area")%>" selected><%=rsr("Loupan_Area")%></option>
                   <option value="开元区">开元区</option>
                   <option value="思明区">思明区</option>
                   <option value="湖里区">湖里区</option>
                   <option value="鼓浪屿区">鼓浪屿区</option>
                   <option value="集美区">集美区</option>
                   <option value="海沧区">海沧区</option>
                   <option value="杏林区">杏林区</option>
                   <option value="同安区">同安区</option>
		</select>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=30%>楼盘名称：</td>
      <td> 
<%
strsql="select name from loupan where id="&rsr("Loupan_ID")
set rs_loupan=server.createobject("adodb.recordset")
rs_loupan.open strsql,conn,1,1
if not rs_loupan.eof then
	loupan_name=rs_loupan("name")
else
	loupan_name="未知楼盘"
end if
rs_loupan.close
set rs_loupan=nothing
%>
          <select name="Loupan_ID" >
             <option value="<%=rsr("Loupan_ID")%>" selected><%=loupan_name%></option>
          </select>
      </td>
    </tr>
<%else%>
    <tr bgcolor="#FFFFFF"> 
      <td width=30%>&nbsp;</td>
      <td> 
	  <INPUT TYPE="hidden" name="Loupan_Area" value="">
	  <INPUT TYPE="hidden" name="Loupan_ID" value="0">
      </td>
    </tr>
<%end if%>-->

    <tr bgcolor="#FFFFFF"> 
      <td colspan="2"> 
        <div align="center"> 
          <input type="hidden" name="BBS_Cate_ID" value="<%=BBS_Cate_ID%>">
          <input type="hidden" name="url" value="<%=url%>">
          <input type="submit" name="Submit" value="修改信息">
          <input type="reset" name="Submit2" value="取消">
        </div>
      </td>
    </tr>
  </table>
</form>
</body>
</html>
