<!--#include file="../conn2.asp"-->
<!--#include file="set.asp"-->
<%
act=request("act")
id=request("id")
bid=request("bid")
if act="save" then
set rs=server.createobject("adodb.recordset")
sql="select * from bbs_class2 where class2_class1_id="&id&" and class2_class2_name='"&request.form("bidname")&"' and class2_id<>"&bid
rs.open sql,conn,1,3
if not rs.eof then
response.write"<script language='javascript'>alert('论坛名称重复！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from bbs_class2 where class2_id="&bid
rs.open sql,conn,1,3
rs("class2_class2_name")=request.form("bidname")
rs("class2_class2_logo")=request.form("logo")
rs("class2_class2_px")=request.form("px")
rs("class2_class2_info")=request.form("bidinfo")
rs.update
set rs=nothing
set conn=nothing
response.redirect "boardman2.asp?id="&id
end if%><head>
<LINK href="css.css" type=text/css rel=stylesheet>
<%bid=int(request.querystring("bid"))
	set bidreco=server.createobject("adodb.recordset")
	    sqlstr="select * from bbs_class2 where class2_id=" &bid
	    bidreco.open sqlstr,conn,1,1	   
%>
<style type="text/css">
<!--
.STYLE1 {
	color: #000000;
	font-weight: bold;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>

<div align="center">
 
    <br>
    <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolordark="#FFFFFF" bgcolor="#CCCCCC">
<form method="post" name="form" action="edit_board2.asp?act=save&bid=<%=bidreco("class2_id")%>&id=<%=bidreco("class2_class1_id")%>" onsubmit="return ck1()">
        <tr bgcolor="f1f1f1"> 
          <td height="23" colspan="2" align="center" class="norightbuttonborder2"><span class="style1 STYLE1">二级栏目修改</span></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="30%" height="23" align="center"><div align="right">论坛名称：</div></td>
          <td width="70%" height="23"> <input type="text" name="bidname" size="49" maxlength="60" class=wenbenkuang  value="<%=bidreco("class2_class2_name")%>"> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="30%" height="23" align="center"><div align="right">论坛logo：</div></td>
          <td width="70%"> <input type="text" name="logo" size="49" maxlength="60" class=wenbenkuang  value="<%=bidreco("class2_class2_logo")%>"> 
          <a href=# onclick="window.open('/upload.asp?formname=form&editname=logo&infoname=bbs&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=25')">上传图片</a> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="30%" height="11" align="center"><div align="right">论坛排序：</div></td>
          <td width="70%" height="11"> <input type="text" name="px" size="17" maxlength="60" class=wenbenkuang  value="<%=bidreco("class2_class2_px")%>" onkeypress="return event.keyCode>=48&&event.keyCode<=57">
            请填写数字 </td>
        </tr>   
        <tr bgcolor="#FFFFFF"> 
          <td width="30%" height="79" align="center"><div align="right">论坛介绍：</div></td>
          <td width="70%" height="79"> <textarea name="bidinfo" cols="48" rows="5" class="wenbenkuang" ><%=bidreco("class2_class2_info")%></textarea> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="29" colspan="2" align="center"> <p align="center"> 
              <input name="B1" type="submit" class="go-wenbenkuang" value=" 修 改">　
              <input name="Submit" type="reset" class="go-wenbenkuang" value=" 重 置" />　
              <input name="Submit2" type="button" class="go-wenbenkuang" value=" 返 回"  onclick="javascript:location.href='boardman2.asp?id=<%=bidreco("class2_class1_id")%>'"/>
            
          </p></td>
        </tr>
      </form>
    </table>

</div>
<script>
function showadv(){
if (document.form.advshow.checked == true) {
adv.style.display = "";
}else{
adv.style.display = "none";
}
}
function ck1()
{

if(form.bidname.value=="")
{
alert("请输入名称")
form.bidname.focus()
return false
}
if(form.logo.value=="")
{
alert("请输入logo")
form.logo.focus()
return false
}
if(form.px.value=="")
{
alert("请输入排序")
form.px.focus()
return false
}
if(form.bidinfo.value=="")
{
alert("请输入介绍")
form.bidinfo.focus()
return false
}

}


</script>
