<!--#include file="../inc/conn.asp"-->
<link href="../css/xmwuye.css" rel="stylesheet" type="text/css">
<%
function pickind(kind)
  Sql_kind="select * from config where kind="&kind&" order by id asc"
  set rskind=server.createobject("adodb.recordset")
  rskind.open Sql_kind,conn,1,1
  pickind=rskind("content")
end function 
    picYN=pickind(4)
	upfiletype=pickind(2)
	BoardID_1=request("layer_1")
	BoardID_2=request("layer_2")
	page=request("page")
	BBS_Back_Url="main.asp?Page="&page&"&BoardID_1="&BoardID_1&"&BoardID_2="&BoardID_2
if request.cookies("bbsuser")="" then
	BBS_Login_Return_Url=request.servervariables("script_name")&"?Page="&Page&"&BoardID_1="&BoardID_1&"&BoardID_2="&BoardID_2	
%>
<script language="javascript">
<!--
	function check(form)
	{
    if (form.bbsuser.value=="")
    	{
    		alert("请填写用户名！");
    		form.bbsuser.focus();
    		return false;
  	}
    if (form.password.value=="")
    	{
    		alert("请填写密码！");
    		form.password.focus();
    		return false;
  	}
    if (form.useryz.value=="")
    	{
    		alert("请输入验证码！");
    		form.useryz.focus();
    		return false;
  	}
return true;
	}
//-->
</script>
<body leftmargin="0" topmargin="2">
<FORM METHOD=POST ACTION="bbslogin.asp" onSubmit="return check(this)" style="MARGIN-BOTTOM: 0px">
  <br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <table width="35%" border="0" align="center" bgcolor="#333333" cellspacing="1" cellpadding="0">
    <tr bgcolor="#9999cc">
      <td colspan="2" height="20"><div align="center"><font color="#FFFFFF">要发布话题，请先登录</font></div></td>
    </tr>
    <tr bgcolor="#F8F8F8" height=25>
      <TD><div align="right">用户名：</div></TD>
      <TD>&nbsp;
          <INPUT TYPE="text" NAME="bbsuser" class="input" size="15">
      </TD>
    </TR>
    <tr bgcolor="#F8F8F8" height=25>
      <TD><div align="right">密　码：</div></TD>
      <TD>&nbsp;
          <INPUT TYPE="password" NAME="password" class="input" size="15">
      </TD>
    </TR>
    <tr bgcolor="#F8F8F8" height=25>
      <TD bgcolor="#F8F8F8"><div align="right">Cookies：</div></TD>
      <TD>&nbsp;
          <select name="ckies" id="ckies">
            <option value="1">保存一天时间</option>
            <option value="7">保存一周时间</option>
            <option value="30">保存一月时间</option>
            <option value="365">保存一年时间</option>
          </select>
      </TD>
    </TR>
    <!--<tr bgcolor="#F8F8F8" height=25> 
	  <TD height="22"> 
        <div align="right">验证码：</div>
      </TD>
	<TD>
	&nbsp;
        <INPUT NAME="useryz" TYPE="text" class="input" id="useryz" size="8">
		<img src=getcode.asp border=0>
      </TD>
</TR>-->
    <tr bgcolor="#F8F8F8" align=center>
      <TD colspan=2 height="30"><INPUT TYPE="submit" value="登录" name="Input" class="button">
        <A HREF="register.asp"><FONT COLOR="blue">[注册新用户]</FONT></A> </TD>
    </TR>
  </TABLE>
</FORM>
<%else%>
<script language="javascript">
<!--
	function check(form)
		{
		if (form.BoardID_1.value=="")
			{
			alert("请选择主论坛！");
			form.BoardID_1.focus();
			return false;
			}
		if (form.BoardID_2.value=="")
			{
			alert("请选择分论坛！");
			form.BoardID_2.focus();
			return false;
			}			
		if (form.title.value=="")
			{
			alert("请填写主题！");
			form.title.focus();
			return false;
			}
		if (form.daynum.value=="")
			{
			alert("有效期不能为空！");
			form.daynum.focus();
			return false;
			}
        if(isNaN(form.daynum.value))
            { alert("输入格式错误:天数只能输入数字.");
            form.daynum.focus();
	        form.daynum.select();
	        return false;
            }
			return true;
		}
//-->
</script>
<form name="myform" method="POST" ENCTYPE="multipart/form-data" action="bbspollact.asp" onSubmit="return check(this)" style="MARGIN-BOTTOM: 0px">
  <table border="0" width="99%" align="center" cellpadding="2" cellspacing="1" bgcolor="#A4B6D7">
    <tr> 
      <td width="100%" height="25" class="font10_5" background="../images/bbs_bg1.gif"> 
        <div align="center"><b>论 坛 话 题 发 布 </b></div>
      </td>
  </tr>
</table>
  <table width="99%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#A4B6D7">
    <%IF BoardID_1="" or BoardID_2="" then%>
    <script LANGUAGE="javascript">
<!--

//选择楼盘地区分类
var onecount;
onecount=0;
var j;
  
subcat = new Array();
<%
strsql="select BBS_Cate_ID,BBS_Cate_PID,BBS_Cate_Name,Initial from BBS_Cate where BBS_Cate_PID<>'0' and deleted=0  order by Initial asc"
set rsr_BBS_Cate=server.createobject("adodb.recordset")
rsr_BBS_Cate.open strsql,conn,3,1
j=0
do while not rsr_BBS_Cate.eof
%>
subcat[<%=j%>] = new Array("<%=rsr_BBS_Cate("Initial") & " " & rsr_BBS_Cate("BBS_Cate_Name")%>","<%=rsr_BBS_Cate("BBS_Cate_PID")%>","<%=rsr_BBS_Cate("BBS_Cate_ID")%>");
<%
j=j+1
rsr_BBS_Cate.movenext
loop
rsr_BBS_Cate.close
set rsr_BBS_Cate=nothing
%>

onecount=<%=j%>;

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

    var locationid=locationid;
    var i;
    document.myform.BoardID_2.options[0] = new Option('==请选择==','');
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
            document.myform.BoardID_2.options[document.myform.BoardID_2.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    

//-->
</script>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right">主论坛：</div></TD>
      <TD width="78%"> <SELECT NAME="BoardID_1" onChange="changelocation(document.myform.BoardID_1.options[document.myform.BoardID_1.selectedIndex].value)">
          <option value="">==请选择==</option>
          <%
str="select BBS_Cate_ID,BBS_Cate_Name from BBS_CATE Where BBS_Cate_PID='0' and deleted=0 order by BBS_ID asc"
set rs_BBS_Cate=server.createobject("adodb.recordset")
rs_BBS_Cate.open str,conn,1,1
do while not rs_BBS_Cate.eof
%>
          <option value="<%=rs_BBS_Cate("BBS_Cate_ID")%>"><%=rs_BBS_Cate("BBS_Cate_Name")%></option>
          <%
rs_BBS_Cate.movenext
loop
rs_BBS_Cate.close
set rs_BBS_Cate=nothing

%>
        </SELECT> </TD>
    </TR>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right">分论坛：</div></TD>
      <TD width="78%"><SELECT NAME="BoardID_2">
          <option value="">==请选择==</option>
        </SELECT> </TD>
    </TR>
    <%else%>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right"></div></TD>
      <TD width="78%"> <INPUT TYPE="hidden" name="BoardID_1" value="<%=BoardID_1%>"> 
        <INPUT TYPE="hidden" name="BoardID_2" value="<%=BoardID_2%>"> </TD>
    </TR>
    <%end if%>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right">主　题：</div></TD>
      <TD width="78%"> <input type="text" name="title" size="60" > </TD>
    </TR>
    <TR bgcolor="#F2F8FF">
      <TD width="22%"><div align="right">投　票：</div></TD>
      <TD> <input name=tptype type=radio value=1 checked>
        单选&nbsp;&nbsp;
        <input name=tptype type=radio value=2>
        多选<br> &nbsp;选项1&nbsp;
        <INPUT class=fminpt name=tpnl1 type=text size=50>
        <br> &nbsp;选项2&nbsp;
        <INPUT class=fminpt name=tpnl2 type=text size=50>
        <br> &nbsp;选项3&nbsp;
        <INPUT class=fminpt name=tpnl3 type=text size=50>
        <br> &nbsp;选项4&nbsp;
        <INPUT class=fminpt name=tpnl4 type=text size=50>
        <br> &nbsp;选项5&nbsp;
        <INPUT class=fminpt name=tpnl5 type=text size=50>
        <br> &nbsp;选项6&nbsp;
        <INPUT class=fminpt name=tpnl6 type=text size=50>
        <br> &nbsp;选项7&nbsp;
        <INPUT class=fminpt name=tpnl7 type=text size=50>
        <br> &nbsp;选项8&nbsp;
        <INPUT class=fminpt name=tpnl8 type=text size=50>
        <br> &nbsp;选项9&nbsp;
        <INPUT class=fminpt name=tpnl9 type=text size=50>
        <br> &nbsp;选项10
        <INPUT class=fminpt name=tpnl10 type=text size=50>
		<br>
        &nbsp;<font color="#FF0000">有效期</font> 
        <input name="daynum" type="text" id="daynum" size="8">
        天(注:从发布之日起过了输入的天数后就失效)
		</TD>
    </TR>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right">内　容：</div></TD>
      <TD width="78%">
	  <!--<textarea rows="12" name="menu" cols="60" ></textarea>-->
        <input type="hidden" name="menu" id="body">
        <!--#include file="../htmledit/bbseditor.asp"--> 
      </TD>
    </TR>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right">发布状态：</div></TD>
      <TD width="78%"> <input type=radio name=ticon value=0.gif checked> <img src=../images/0.gif width=19 height=19 > 
        <input type=radio name=ticon value=1.gif> <img src=../images/1.gif width=19 height=19 > 
        <input type=radio name=ticon value=2.gif> <img src=../images/2.gif width=19 height=19> 
        <input type=radio name=ticon value=3.gif> <img src=../images/3.gif width=19 height=19> 
        <input type=radio name=ticon value=4.gif> <img src=../images/4.gif width=19 height=19> 
        <input type=radio name=ticon value=5.gif> <img src=../images/5.gif width=19 height=19> 
        <input type=radio name=ticon value=6.gif> <img src=../images/6.gif width=19 height=19> 
        <input type=radio name=ticon value=7.gif> <img src=../images/7.gif width=19 height=19><br> 
        <input type=radio name=ticon value=8.gif> <img src=../images/8.gif width=19 height=19> 
        <input type=radio name=ticon value=9.gif> <img src=../images/9.gif width=19 height=19> 
        <input type=radio name=ticon value=10.gif> <img src=../images/10.gif width=19 height=19> 
        <input type=radio name=ticon value=11.gif> <img src=../images/11.gif width=19 height=19> 
        <input type=radio name=ticon value=12.gif> <img src=../images/12.gif width=19 height=19> 
        <input type=radio name=ticon value=13.gif> <img src=../images/13.gif width=19 height=19> 
        <input type=radio name=ticon value=14.gif> <img src=../images/14.gif width=19 height=19> 
        <input type=radio name=ticon value=15.gif> <img src=../images/15.gif width=19 height=19> 
        <br> <input type=radio name=ticon value=16.gif> <img src=../images/16.gif width=19 height=19> 
        <input type=radio name=ticon value=17.gif> <img src=../images/17.gif width=19 height=19> 
        <input type=radio name=ticon value=18.gif> <img src=../images/18.gif width=19 height=19> 
        <input type=radio name=ticon value=19.gif> <img src=../images/19.gif width=19 height=19> 
        <input type=radio name=ticon value=20.gif> <img src=../images/20.gif width=19 height=19> 
        <input type=radio name=ticon value=21.gif> <img src=../images/21.gif width=19 height=19> 
        <input type=radio name=ticon value=22.gif> <img src=../images/22.gif width=19 height=19> 
        <input type=radio name=ticon value=23.gif> <img src=../images/23.gif width=19 height=19> 
        <br> <input type=radio name=ticon value=24.gif> <img src=../images/24.gif width=19 height=19> 
        <input type=radio name=ticon value=25.gif> <img src=../images/25.gif width=19 height=19> 
        <input type=radio name=ticon value=26.gif> <img src=../images/26.gif width=19 height=19> 
        <input type=radio name=ticon value=27.gif> <img src=../images/27.gif width=19 height=19> 
        <input type=radio name=ticon value=28.gif> <img src=../images/28.gif width=19 height=19> 
        <input type=radio name=ticon value=29.gif> <img src=../images/29.gif width=19 height=19> 
        <input type=radio name=ticon value=30.gif> <img src=../images/30.gif width=19 height=19> 
        <input type=radio name=ticon value=31.gif> <img src=../images/31.gif width=19 height=19> 
        <br> <input type=radio name=ticon value=32.gif> <img src=../images/32.gif width=19 height=19> 
        <input type=radio name=ticon value=33.gif> <img src=../images/33.gif width=19 height=19> 
        <input type=radio name=ticon value=34.gif> <img src=../images/34.gif width=19 height=19> 
        <input type=radio name=ticon value=35.gif> <img src=../images/35.gif width=19 height=19> 
        <input type=radio name=ticon value=36.gif> <img src=../images/36.gif width=19 height=19> 
        <input type=radio name=ticon value=37.gif> <img src=../images/37.gif width=19 height=19> 
        <input type=radio name=ticon value=38.gif> <img src=../images/38.gif width=19 height=19> 
        <input type=radio name=ticon value=39.gif> <img src=../images/39.gif width=19 height=19 onClick="inputs('39')"> 
        <br> <input type=radio name=ticon value=40.gif> <img src=../images/40.gif width=19 height=19> 
        <input type=radio name=ticon value=41.gif> <img src=../images/41.gif width=19 height=19> 
        <input type=radio name=ticon value=42.gif> <img src=../images/42.gif width=19 height=19> 
        <input type=radio name=ticon value=43.gif> <img src=../images/43.gif width=19 height=19> 
        <font color="#FF0000"> 
        <input type=radio name=ticon value=44.gif>
        <img src="../images/44.gif" width="17" height="16"> 点击图标，加入表情符号</font> 
        <!--<input type="text" name="tel" size="20" maxlength="20">-->
      </TD>
    </TR>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right">图　片：</div></TD>
      <TD width="78%"><input TYPE="file" NAME="bbs_img" <%if request.cookies("payuser")=2 then%> disabled <%end if%>>
        <FONT  COLOR="#990000">(允许上传<%=upfiletype%>类型的图片)</FONT></TD>
    </TR>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"> <div align="right">图片文字说明：</div></TD>
      <TD width="78%"> <input TYPE="text" NAME="bbs_img_text" size="60" maxlength="100" <%if request.cookies("payuser")=2 then%> disabled <%end if%>> 
      </TD>
    </TR>
	<%if picYN="Y" then%>
    <TR bgcolor="#F2F8FF"> 
      <TD width="22%"></TD>
      <TD width="78%" height="25">&nbsp;<FONT  COLOR="#990000">说明：您上传的图片需经过网站的审核通过后，才能在论坛显示。</FONT></TD>
    </TR>
	<%end if%>
    <TR bgcolor="#F2F8FF"> 
      <TD height="35" colspan=2 align=center> <INPUT TYPE="hidden" name="BBS_Return_Url" value="<%=BBS_Return_Url%>"> 
        <input type="submit" value="发布话题" name="B1"> &nbsp; <input type="reset" value="全部重写" name="B2"> 
        &nbsp; <input type="button" value="返回前页" name="B3" onClick="javascript:window.location.href='<%=BBS_Back_Url%>'"> 
      </TD>
    </TR>
  </TABLE>
</form>
<%
end if
conn.close
%>
<br>