<!-- #include file="include/config_forum.asp" -->
<!-- #include file="include/config_poll.asp" -->
<% if not(isnumeric(forumid)) then call cookies_type("forum_id") %>
<!-- #include file="include/config_frm.asp" -->
<!-- #include file="include/config_upload.asp" -->
<!-- #include file="include/conn.asp" -->
<%
call forum_first()
call forum_word()
tit=forumname&"（发表新贴）"
call web_head(2,0,2,0,0)

if int(popedom_format(login_popedom,41)) then call close_conn():call cookies_type("locked")
if forumreadonly<>0 then
if format_power(login_mode,0)<>"admin" then
call cookies_type("post_readonly")
end if
end if
'-----------------------------------center---------------------------------
response.write forum_top("发表新贴") & kong

'论坛主题加色和加粗开始
dim pintegral,btkf:btkf=int(web_var(web_num,43))
sql="select integral from user_data where username='"&login_username&"'"
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
 pintegral=rs("integral")
end if
'论坛主题加色和加粗结束

dim fssb:fssb=int(web_var(web_num,27))
if trim(request.form("write"))="ok" then
  response.write "<table border=0><tr><td align=center height=200>"
  if post_chk()="no" then
    response.write post_error
  else
dim rs9,sql9,tim9
sql9="select top 1 username,tim from bbs_data where username='"&login_username&"' order by id desc"
  set rs9=server.createobject("adodb.recordset")
  rs9.open sql9,conn,1,1
  if rs9.eof then
  rs9.close:set rs9=nothing
    response.write write_chk()
  else
  tim9=now()-rs9("tim")
  rs9.close:set rs9=nothing
  if tim9<fssb*0.000011574 then        '大约 0.000011574 为 1 秒
  response.write VbCrLf & "<table border=0 width=300>" & _
            VbCrLf & "<tr><td align=center height=30><font class=red_3><b>对不起，两次发贴之间必须间隔 <font class=blue>"&fssb&"</font> 秒！</b></font></td></tr>" & _
            VbCrLf & "<tr><td height=30>您现在可以选择以下操作：</td></tr>" & _
            VbCrLf & "<tr><td>　　●  <a href='javascript:history.back(1)'>返回上一页</a>" & _
            VbCrLf & "<tr><td>　　●  <a href='forum_list.asp?forum_id=" & forumid & "'>返回 <b>" & forumname & "</b></a></td></tr>" & _
            VbCrLf & "<tr><td>　　●  返回 <a href='forum.asp'>论坛首页</a></td></tr>" & _
            VbCrLf & "</table>"
  else
    response.write write_chk()
  end if 
  end if
  end if
  response.write "</td></tr></table>"
else
  response.write write_type()
end if


'---------------------------------center end-------------------------------
call web_end(0)

function write_type()
%>
<script language=javascript><!--
function check(write_frm)
{
  if(write_frm.topic.value=="" || write_frm.topic.value.length>50)
  {
   alert("你还没完全留下所需信息！\r\n\n贴子的 主题 是必须要的；\n且长度不能超过50个字符。");
   return false;
  }
  if(write_frm.jk_word.value=="" || write_frm.jk_word.value.length><%response.write word_size*1024%>)
  {
   alert("你还没完全留下所需信息！\r\n\n贴子的 内容 是必须要的；\n且大小不能超过<%response.write word_size%>KB。");
   return false;
  }
}
--></script>
<script language=javascript src='style/em_type.js'></script>
<script language=javascript src='style/form_ok.js'></script>
<%response.write forum_table1%>
<form name=write_frm action='forum_write.asp?forum_id=<%response.write forumid%>' method=post onsubmit="frm_submitonce(this);">
<input name="Poll" type="hidden" value="<% =LCase(strPollPost) %>">
<input type=hidden name=write value='ok'>
<input type=hidden name=upid value=''>
<tr height=30<%response.write forum_table3%>>
<td width='20%' align=center>用户信息：</td>
<td width='80%'>&nbsp;&nbsp;用户名：<input type=username name=username value='<%response.write login_username%>' size=18 maxlength=20>&nbsp;&nbsp;
密码：<input type=password name=password value='<%response.write login_password%>' size=18 maxlength=20>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font class=gray>[ <a href='user_main.asp?username=<%response.write server.htmlencode(login_username)%>'>用户中心</a> ]</font>&nbsp;&nbsp;&nbsp;&nbsp;
<font class=gray>[ <a href='login.asp?action=logout'>退出登陆</a> ]</font></td>
</tr>
<tr height=30<%response.write format_table(3,1)%>>
<td align=center>贴子主题：</td>
<td>
  <table border=0 cellspacing=0 cellpadding=0><tr>
  <td>&nbsp;&nbsp;<%call frm_topic("write_frm","topic")%></td>
  <td>&nbsp;<input type=text name=topic size=60 maxlength=50><%response.write redx%>长度不能超过50</td>
  </tr></table>
</td>
</tr>

<!--论坛主题加色和加粗开始 -->
<tr height=30<%response.write format_table(3,1)%>>
<td align=center>主题加色：</td>
<td>&nbsp;&nbsp;<input type=checkbox name=tc value='yes'>&nbsp;选择加色功能后将扣取你 <font class=red><%response.write btkf%></font> 积分
&nbsp;&nbsp;&nbsp;&nbsp;颜色：#&nbsp;<input type=text name=tcolor value='' size=10 maxlength=6>&nbsp;&nbsp;<%call frm_tcolor("write_frm","tcolor")%>&nbsp;请正确填写 <font class=red_3>6</font> 位颜色代码</td>
</tr>
<tr height=30<%response.write format_table(3,1)%>>
<td align=center>主题加粗：</td>
<td>&nbsp;&nbsp;<input type=checkbox name=tbb value='yes'>&nbsp;选择加粗功能后将扣取你 <font class=red><%response.write btkf%></font> 积分
&nbsp;&nbsp;&nbsp;&nbsp;您的现有积分为：<font class=red><%response.write pintegral%></font> 分</td>
</tr>
<!--论坛主题加色和加粗结束 -->

<tr height=30<%response.write forum_table3%>>
<td align=center>当前心情：</td>
<td>&nbsp;&nbsp;<% response.write icon_type(9,3) %>
</td>
</tr>
<tr height=35<%response.write format_table(3,1)%>>
<td align=center><%call frm_ubb_type()%></td>
<td><%call frm_ubb("write_frm","jk_word","&nbsp;&nbsp;")%></td>
</tr>
<%	If strPollPost = "yes" Then %>
 <Tr align=center<%response.write forum_table3%>>
   <td><table border=0><tr><td class=htd>投票项目：<br><li>每行一个投票项目，最多<FONT color=red><B><% =strPollTotals %></B></FONT> 项<BR><li>超过自动作废，空行自动过滤<BR><li>如果投票需要多选，请在选择中打钩</tr></table></td>
   <td><table border=0><tr><td>
     <%if strPollTotals=0 then%>
       <script language=javascript>
        history.back()
        alert("论坛投票已暂时被管理员关闭！")
        </script>
     <%else%>
<TEXTAREA cols=93 name=liangu_poll rows=8></TEXTAREA><BR><select name=votetimeout size=1>
<option value=0>过期时间</option>
<option value=0>永不过期</option>
<option value=1>一天</option>
<option value=3>三天</option>
<option value=7>一周</option>
<option value=15>半月</option>
<option value=30>一月</option>
<option value=90>三月</option>
<option value=180>半年</option>
</select>&nbsp;&nbsp;<input type=checkbox name="MoreItem" id="MoreItem" value="yes" ><LABEL for=MoreItem style="CURSOR: HAND;">此投票是否允许多选？</LABEL>&nbsp;<input type=checkbox id=HidePoll name=HidePoll value="yes"><LABEL for=HidePoll style="CURSOR: HAND;">是否必须投票后才可查看结果？</LABEL>
     <%end If%>
</td></tr></table></td>
 </tr>
<%	End If %>
<tr align=center<%response.write forum_table3%>>
<td><table border=0><tr><td class=htd><b>贴子内容：</b><br><%call frm_word_size("write_frm","jk_word",word_size,"贴子内容")%><br><%response.write word_remark%><br>
</td></tr></table></td>
<td><table border=0><tr><td><textarea name=jk_word rows=17 cols=93 title='按 Ctrl+Enter 可直接发送' onkeydown="javascript:frm_quicksubmit();"></textarea></td></tr></table></td>
</tr>
<tr<%response.write format_table(3,1)%>><td align=center><b>上传文件 </b><select name="upload_type" size=1>
<option value="">允许类型</option><%
dim iupload
iupload=split(web_var(web_upload,2),",")
for i=0 to ubound(iupload)
response.write "<option value="&iupload(i)&">"&iupload(i)&"</option>"
next
%>
</select></td><td> <iframe frameborder=0 name=upload_frame width='99%' height=30 scrolling=no src='upload.asp?uppath=forum&upname=&uptext=jk_word'></iframe></td></tr>

<tr height=30>
            <td  valign=top colspan=2 bgcolor=#ffffff>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="22" colspan="20"> <script>function New(para_URL){var URL=new String(para_URL);window.open(URL,'','resizable,scrollbars')}</script> 
                    <b>点击动作即可在帖子中加入（<a href=JavaScript:New('images/dongz/index.htm') title=查看所有动作明细>相应的动作</a>）</B><br></td>
                </tr>
                <tr> 
                  <td width="5%" height="20"><div align="center"><a onClick="jk_insert_em('/招呼')" style="CURSOR: hand">招呼</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/欢迎')" style="CURSOR: hand">欢迎</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/灌水')" style="CURSOR: hand">灌水</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/无聊')" style="CURSOR: hand">无聊</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/负责')" style="CURSOR: hand">负责</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/生气')" style="CURSOR: hand">生气</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/高兴')" style="CURSOR: hand">高兴</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/鼓掌')" style="CURSOR: hand">鼓掌</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/等待')" style="CURSOR: hand">等待</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/反对')" style="CURSOR: hand">反对</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/浪漫')" style="CURSOR: hand">浪漫</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/不要')" style="CURSOR: hand">不要</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/找死')" style="CURSOR: hand">找死</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/去死')" style="CURSOR: hand">去死</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/狂笑')" style="CURSOR: hand">狂笑</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/傻笑')" style="CURSOR: hand">傻笑</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/痛哭')" style="CURSOR: hand">痛哭</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/道别')" style="CURSOR: hand">道别</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/跳舞')" style="CURSOR: hand">跳舞</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/失望')" style="CURSOR: hand">失望</a></div></td>
                </tr>
                <tr> 
                  <td width="5%" height="20"><div align="center"><a onClick="jk_insert_em('/害羞')" style="CURSOR: hand">害羞</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/比酷')" style="CURSOR: hand">比酷</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/救命')" style="CURSOR: hand">救命</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/狂妄')" style="CURSOR: hand">狂妄</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/拳击')" style="CURSOR: hand">拳击</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/我踢')" style="CURSOR: hand">我踢</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/我踩')" style="CURSOR: hand">我踩</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/饶命')" style="CURSOR: hand">饶命</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/眨眼')" style="CURSOR: hand">眨眼</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/臭美')" style="CURSOR: hand">臭美</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/变态')" style="CURSOR: hand">变态</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/拼酒')" style="CURSOR: hand">拼酒</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/深情')" style="CURSOR: hand">深情</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/恶心')" style="CURSOR: hand">恶心</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/惊讶')" style="CURSOR: hand">惊讶</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/抽烟')" style="CURSOR: hand">抽烟</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/怀疑')" style="CURSOR: hand">怀疑</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/拉勾')" style="CURSOR: hand">拉勾</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/经典')" style="CURSOR: hand">经典</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/唱歌')" style="CURSOR: hand">唱歌</a></div></td>
                </tr>
                <tr> 
                  <td width="5%" height="20"><div align="center"><a onClick="jk_insert_em('/ＯＫ')" style="CURSOR: hand">ＯＫ</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/同意')" style="CURSOR: hand">同意</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/生日')" style="CURSOR: hand">生日</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/kiss')" style="CURSOR: hand">kiss</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/晕倒')" style="CURSOR: hand">晕倒</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/气你')" style="CURSOR: hand">气你</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/错啦')" style="CURSOR: hand">错啦</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/加油')" style="CURSOR: hand">加油</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/恭喜')" style="CURSOR: hand">恭喜</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/简单')" style="CURSOR: hand">简单</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/鼓励')" style="CURSOR: hand">鼓励</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/过奖')" style="CURSOR: hand">过奖</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/原谅')" style="CURSOR: hand">原谅</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/大笑')" style="CURSOR: hand">大笑</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/感动')" style="CURSOR: hand">感动</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/叹气')" style="CURSOR: hand">叹气</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/道谢')" style="CURSOR: hand">道谢</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/摇头')" style="CURSOR: hand">摇头</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/点头')" style="CURSOR: hand">点头</a></div></td>
                  <td width="5%"><div align="center"><a onClick="jk_insert_em('/拥抱')" style="CURSOR: hand">拥抱</a></div></td>
                </tr>
              </table> 
</td>
</tr>

<tr height=30<%response.write forum_table3%>><td align=center>E M 贴图：</td><td>&nbsp;&nbsp;<script language=javascript>jk_em_type('s');</script></td></tr>
<tr<%response.write format_table(3,1)%>><td colspan=2 align=center width=777 height=60>&nbsp;&nbsp;<script language=javascript>jk_em_type('b');</script></td></tr>
<tr align=center height=30<%response.write forum_table3%>>
<td>发表新贴：</td>
<td><input type=submit name=wsubmit value='可以发表啦' onclick="return check(write_frm)">&nbsp;<%response.write preview_b("write_frm","jk_word","预览内容")%>  &nbsp;<input type=reset value='清除重写'>　&nbsp;（按 Ctrl + Enter 可快速发表）</td></tr>
</form></table><br>
<%
call preview_form("write_frm","jk_word")
end function

function write_chk()
  dim topic,word,founderr,rs,sql,now_tim,new_id,tc,tcolor,tbb,t_int:t_int=0  '后台论坛主题加色和加粗的变量定义(tc,tcolor,tbb,t_int:t_int=0)

  topic=code_form(trim(request.form("topic")))
  word=code_word(request.form("jk_word"))

'论坛主题加色和加粗开始
  tc=trim(request.form("tc"))
  tbb=trim(request.form("tbb"))
  if tc="yes" then
    t_int=t_int+btkf
    tcolor=trim(request.form("tcolor"))
  else
    tcolor=""
  end if
  if tbb="yes" then
    t_int=t_int+btkf
	tbb=true
  else
    tbb=false
  end if
'论坛主题加色和加粗结束

  founderr=""
  if login_username="" or isnull(login_username) then
    founderr=founderr & "<br><li><font class=red_2>您还没有登陆本站！因此不能发表留言。</font>"
  end if

'论坛主题加色和加粗开始
  if pintegral<t_int then
    founderr=founderr & "<br><li>您没有足够的 <font class=red_3>积分</font> 选择“主题加色”或“主题加粗”！"
  else
    if tc="yes" and len(tcolor)<>6 then
      founderr=founderr & "<br><li>主题的 <font class=red_3>颜色</font> 是必须要的；请正确填写6位颜色代码！"
    end if
    if tcolor="ffffff" or tcolor="FFFFFF" then
      founderr=founderr & "<br><li>主题的 <font class=red_3>颜色</font> 不能选择白色；请正确填写6位颜色代码！"
    end if
  end if
'论坛主题加色和加粗结束

  if topic="" or len(topic)>50 then
    founderr=founderr & "<br><li>贴子的 <font class=founderr>主题</font> 是必须要的；且长度不能超过50个字符！"
  end if
  if word="" or isnull(word) or len(word)>word_size*1024 then
    founderr=founderr & "<br><li>贴子的 <font class=founderr>内容</font> 是必须要的；且大小不能超过"&word_size&"KB！"
  end if
  
  '投票检查
  isvote=0
  if ispollpost ="yes"then
	strMessage = split(Request.Form("liangu_poll"),chr(13)&chr(10))
	'strMessage = Split(txtPollMessage, "<BR>")
	If UBound(strMessage) < 1 then
	   founderr=founderr & "<LI>投票项目太少，至少需要 <B>2</B> 项！（投票项后记得换行）<br>"
	End If
	txtPollMessage = ""
    j = 0
	For i = 0 To UBound(strMessage)
	   strMessage(i) = Trim(strMessage(i))
	   if not (strMessage(i)="" or strMessage(i)=" ") then
	      txtPollMessage = "" & txtPollMessage & "" & Trim(strMessage(i)) & "|"
		  j = j + 1
	   end if
	'### 超过自动作废 ###
       If i > strPollTotals-2 Then Exit For
	Next
	if j=0 then
	 	   founderr=founderr & "<LI>投票项目不能全为空"
	End If
	isvote=1
  end if
  
  if not isnumeric(request("votetimeout")) then
	founderr=founderr & "<Br>"+"<li>错误的时间参数。"
  else
	if request("votetimeout")="0" then
		votetimeout=dateadd("d",9999,Now())
	else
		votetimeout=dateadd("d",request("votetimeout"),Now())
	end if
	votetimeout=replace(replace(CSTR(votetimeout+0/24),"上午",""),"下午","")
  end if
      
  if founderr="" then
    sql="insert into bbs_topic (forum_id,username,topic,icon,counter,tim,re_username,re_counter,re_tim,istop,islock,isgood,isvote,color,bb) " & _
	"values ("&forumid&",'"&login_username&"','"&topic&"','"&trim(request.form("icon"))&"',0,'"&now_time&"','"&login_username&"',0,'"&now_time&"',0,0,0,"&isvote&",'"&tcolor&"',"&tbb&")"
    conn.execute(sql)
'论坛主题加色和加粗写入数据库(color,bb和'"&tcolor&"',"&tbb&")

    new_id=first_id("bbs_topic")
    
    sql="insert into bbs_data (forum_id,reply_id,username,topic,icon,word,tim,ip,sys) " & _
	"values ("&forumid&","&new_id&",'"&login_username&"','"&topic&"','"&trim(request.form("icon"))&"','"&word&"','"&now_time&"','"&ip_sys(1,1)&"','"&ip_sys(3,0)&"')"
    set rs=conn.execute(sql)
    
    sql="update user_data set bbs_counter=bbs_counter+1,integral=integral+"&web_var(web_num,16)&"-"&t_int&",usercp=usercp+"&web_var(web_num,29)&" where username='"&login_username&"'"
    conn.execute(sql)
'论坛主题加色和加粗扣取积分(integral=integral+"&web_var(web_num,16)&"-"&t_int&")。

    sql="update configs set num_topic=num_topic+1,num_data=num_data+1 where id=1"
    conn.execute(sql)
    sql="update bbs_forum set forum_topic_num=forum_topic_num+1,forum_data_num=forum_data_num+1,forum_new_info='"&login_username&"|"&now_time&"|"&new_id&"|"&topic&"' where forum_id="&forumid
    conn.execute(sql)
    
    '###### 投票贴子的处理 ######
	if isPollPost = "yes"  then
        For k = 1 To j
			strPollNum = "" & strPollNum & "0,"
		Next
		strPollNumlen = Len(strPollNum)
		strPollNum = Left(strPollNum, strPollNumlen-1)

		For k = 1 To j
			strPollDetail = "" & strPollDetail & "{},"
		Next
		strPollDetailLen = Len(strPollDetail)
		strPollDetail = Left(strPollDetail, strPollDetailLen-1)

        strPollLen = Len(txtPollMessage)
		txtPollMessage = Left(txtPollMessage, strPollLen-1)

		' ###### Forum_SQL - 增加一个新投票到 VOTE 表 ######
		strSql = "INSERT INTO bbs_vote (topic_id"
		strSql = strSql & ", v_message"
		strSql = strSql & ", v_num"
		strSql = strSql & ", v_detail"
		strSql = strSql & ", v_timeout"
		strSql = strSql & ", v_type"
		strSql = strSql & ", v_hide"
		strSql = strSql & ") VALUES ("
		strSql = strSql & new_id
		strSql = strSql & ", '" & txtPollMessage & "'"
		strSql = strSql & ", '" & strPollNum & "'"
		strSql = strSql & ", '" & strPollDetail & "'"
		strSql = strSql & ",'" & votetimeout & "'"
		if Request.Form("MoreItem") = "yes" then
			strSql = strSql & ", 1"
		else
		    strSql = strSql & ", 0"
		end if
		if Request.Form("HidePoll") = "yes" then
			strSql = strSql & ", 1"
		else
			strSql = strSql & ", 0"
		end if
		strSql = strSql & ")"
        Conn.Execute (strSql)
      end if
	'------------------------处理完毕--------------------------------
    
    call upload_note(index_url,new_id)
    
    response.write VbCrLf & "<table border=0 width=300>" & _
        	   VbCrLf & "<tr><td align=center height=30><font class=red>贴子发表成功！谢谢您的发贴。</font></td></tr>" & _
        	   VbCrLf & "<tr><td height=30>您现在可以选择以下操作：</td></tr>" & _
        	   VbCrLf & "<tr><td>　　1、<a href='forum_view.asp?forum_id=" & forumid & "&view_id=" & new_id & "'>您所发表的帖子</a>" & _
        	   VbCrLf & "<tr><td>　　2、<a href='forum_list.asp?forum_id=" & forumid & "'>返回 <b>" & forumname & "</b></a></td></tr>" & _
        	   VbCrLf & "<tr><td>　　3、<a href='forum.asp'>返回论坛首页</a></td></tr>" & _
        	   VbCrLf & "<tr><td height=30>系统将在 " & web_var(web_num,5) & " 秒钟后自动返回 <b>" & forumname & "</b> 。</td></tr>" & _
		   VbCrLf & "</table><meta http-equiv='refresh' content='" & web_var(web_num,5) & "; url=forum_view.asp?forum_id=" & forumid & "&view_id=" & new_id & "'>"
  else
    response.write found_error(founderr,"350")
  end if
end function

'论坛主题加色和加粗开始
sub frm_tcolor(fn,tn)
%><select onchange="document.<%response.write fn&"."&tn%>.focus(); document.<%response.write fn&"."&tn%>.value = this.options[this.selectedIndex].value + document.<%response.write fn&"."&tn%>.value;">
<option style="background-color:#F0F8FF;color: #F0F8FF" value="F0F8FF">#F0F8FF</option>
<option style="background-color:#FAEBD7;color: #FAEBD7" value="FAEBD7">#FAEBD7</option>
<option style="background-color:#00FFFF;color: #00FFFF" value="00FFFF">#00FFFF</option>
<option style="background-color:#7FFFD4;color: #7FFFD4" value="7FFFD4">#7FFFD4</option>
<option style="background-color:#F0FFFF;color: #F0FFFF" value="F0FFFF">#F0FFFF</option>
<option style="background-color:#F5F5DC;color: #F5F5DC" value="F5F5DC">#F5F5DC</option>
<option style="background-color:#FFE4C4;color: #FFE4C4" value="FFE4C4">#FFE4C4</option>
<option style="background-color:#000000;color: #000000" value="000000">#000000</option>
<option style="background-color:#FFEBCD;color: #FFEBCD" value="FFEBCD">#FFEBCD</option>
<option style="background-color:#0000FF;color: #0000FF" value="0000FF">#0000FF</option>
<option style="background-color:#8A2BE2;color: #8A2BE2" value="8A2BE2">#8A2BE2</option>
<option style="background-color:#A52A2A;color: #A52A2A" value="A52A2A">#A52A2A</option>
<option style="background-color:#DEB887;color: #DEB887" value="DEB887">#DEB887</option>
<option style="background-color:#5F9EA0;color: #5F9EA0" value="5F9EA0">#5F9EA0</option>
<option style="background-color:#7FFF00;color: #7FFF00" value="7FFF00">#7FFF00</option>
<option style="background-color:#D2691E;color: #D2691E" value="D2691E">#D2691E</option>
<option style="background-color:#FF7F50;color: #FF7F50" value="FF7F50">#FF7F50</option>
<option style="background-color:#6495ED;color: #6495ED" value="6495ED">#6495ED</option>
<option style="background-color:#FFF8DC;color: #FFF8DC" value="FFF8DC">#FFF8DC</option>
<option style="background-color:#DC143C;color: #DC143C" value="DC143C">#DC143C</option>
<option style="background-color:#00FFFF;color: #00FFFF" value="00FFFF">#00FFFF</option>
<option style="background-color:#00008B;color: #00008B" value="00008B">#00008B</option>
<option style="background-color:#008B8B;color: #008B8B" value="008B8B">#008B8B</option>
<option style="background-color:#B8860B;color: #B8860B" value="B8860B">#B8860B</option>
<option style="background-color:#A9A9A9;color: #A9A9A9" value="A9A9A9">#A9A9A9</option>
<option style="background-color:#006400;color: #006400" value="006400">#006400</option>
<option style="background-color:#BDB76B;color: #BDB76B" value="BDB76B">#BDB76B</option>
<option style="background-color:#8B008B;color: #8B008B" value="8B008B">#8B008B</option>
<option style="background-color:#556B2F;color: #556B2F" value="556B2F">#556B2F</option>
<option style="background-color:#FF8C00;color: #FF8C00" value="FF8C00">#FF8C00</option>
<option style="background-color:#9932CC;color: #9932CC" value="9932CC">#9932CC</option>
<option style="background-color:#8B0000;color: #8B0000" value="8B0000">#8B0000</option>
<option style="background-color:#E9967A;color: #E9967A" value="E9967A">#E9967A</option>
<option style="background-color:#8FBC8F;color: #8FBC8F" value="8FBC8F">#8FBC8F</option>
<option style="background-color:#483D8B;color: #483D8B" value="483D8B">#483D8B</option>
<option style="background-color:#2F4F4F;color: #2F4F4F" value="2F4F4F">#2F4F4F</option>
<option style="background-color:#00CED1;color: #00CED1" value="00CED1">#00CED1</option>
<option style="background-color:#9400D3;color: #9400D3" value="9400D3">#9400D3</option>
<option style="background-color:#FF1493;color: #FF1493" value="FF1493">#FF1493</option>
<option style="background-color:#00BFFF;color: #00BFFF" value="00BFFF">#00BFFF</option>
<option style="background-color:#696969;color: #696969" value="696969">#696969</option>
<option style="background-color:#1E90FF;color: #1E90FF" value="1E90FF">#1E90FF</option>
<option style="background-color:#B22222;color: #B22222" value="B22222">#B22222</option>
<option style="background-color:#FFFAF0;color: #FFFAF0" value="FFFAF0">#FFFAF0</option>
<option style="background-color:#228B22;color: #228B22" value="228B22">#228B22</option>
<option style="background-color:#FF00FF;color: #FF00FF" value="FF00FF">#FF00FF</option>
<option style="background-color:#DCDCDC;color: #DCDCDC" value="DCDCDC">#DCDCDC</option>
<option style="background-color:#F8F8FF;color: #F8F8FF" value="F8F8FF">#F8F8FF</option>
<option style="background-color:#FFD700;color: #FFD700" value="FFD700">#FFD700</option>
<option style="background-color:#DAA520;color: #DAA520" value="DAA520">#DAA520</option>
<option style="background-color:#808080;color: #808080" value="808080">#808080</option>
<option style="background-color:#008000;color: #008000" value="008000">#008000</option>
<option style="background-color:#ADFF2F;color: #ADFF2F" value="ADFF2F">#ADFF2F</option>
<option style="background-color:#F0FFF0;color: #F0FFF0" value="F0FFF0">#F0FFF0</option>
<option style="background-color:#FF69B4;color: #FF69B4" value="FF69B4">#FF69B4</option>
<option style="background-color:#CD5C5C;color: #CD5C5C" value="CD5C5C">#CD5C5C</option>
<option style="background-color:#4B0082;color: #4B0082" value="4B0082">#4B0082</option>
<option style="background-color:#FFFFF0;color: #FFFFF0" value="FFFFF0">#FFFFF0</option>
<option style="background-color:#F0E68C;color: #F0E68C" value="F0E68C">#F0E68C</option>
<option style="background-color:#E6E6FA;color: #E6E6FA" value="E6E6FA">#E6E6FA</option>
<option style="background-color:#FFF0F5;color: #FFF0F5" value="FFF0F5">#FFF0F5</option>
<option style="background-color:#7CFC00;color: #7CFC00" value="7CFC00">#7CFC00</option>
<option style="background-color:#FFFACD;color: #FFFACD" value="FFFACD">#FFFACD</option>
<option style="background-color:#ADD8E6;color: #ADD8E6" value="ADD8E6">#ADD8E6</option>
<option style="background-color:#F08080;color: #F08080" value="F08080">#F08080</option>
<option style="background-color:#E0FFFF;color: #E0FFFF" value="E0FFFF">#E0FFFF</option>
<option style="background-color:#FAFAD2;color: #FAFAD2" value="FAFAD2">#FAFAD2</option>
<option style="background-color:#90EE90;color: #90EE90" value="90EE90">#90EE90</option>
<option style="background-color:#D3D3D3;color: #D3D3D3" value="D3D3D3">#D3D3D3</option>
<option style="background-color:#FFB6C1;color: #FFB6C1" value="FFB6C1">#FFB6C1</option>
<option style="background-color:#FFA07A;color: #FFA07A" value="FFA07A">#FFA07A</option>
<option style="background-color:#20B2AA;color: #20B2AA" value="20B2AA">#20B2AA</option>
<option style="background-color:#87CEFA;color: #87CEFA" value="87CEFA" selected>#87CEFA</option>
<option style="background-color:#778899;color: #778899" value="778899">#778899</option>
<option style="background-color:#B0C4DE;color: #B0C4DE" value="B0C4DE">#B0C4DE</option>
<option style="background-color:#FFFFE0;color: #FFFFE0" value="FFFFE0">#FFFFE0</option>
<option style="background-color:#00FF00;color: #00FF00" value="00FF00">#00FF00</option>
<option style="background-color:#32CD32;color: #32CD32" value="32CD32">#32CD32</option>
<option style="background-color:#FAF0E6;color: #FAF0E6" value="FAF0E6">#FAF0E6</option>
<option style="background-color:#FF00FF;color: #FF00FF" value="FF00FF">#FF00FF</option>
<option style="background-color:#800000;color: #800000" value="800000">#800000</option>
<option style="background-color:#66CDAA;color: #66CDAA" value="66CDAA">#66CDAA</option>
<option style="background-color:#0000CD;color: #0000CD" value="0000CD">#0000CD</option>
<option style="background-color:#BA55D3;color: #BA55D3" value="BA55D3">#BA55D3</option>
<option style="background-color:#9370DB;color: #9370DB" value="9370DB">#9370DB</option>
<option style="background-color:#3CB371;color: #3CB371" value="3CB371">#3CB371</option>
<option style="background-color:#7B68EE;color: #7B68EE" value="7B68EE">#7B68EE</option>
<option style="background-color:#00FA9A;color: #00FA9A" value="00FA9A">#00FA9A</option>
<option style="background-color:#48D1CC;color: #48D1CC" value="48D1CC">#48D1CC</option>
<option style="background-color:#C71585;color: #C71585" value="C71585">#C71585</option>
<option style="background-color:#191970;color: #191970" value="191970">#191970</option>
<option style="background-color:#F5FFFA;color: #F5FFFA" value="F5FFFA">#F5FFFA</option>
<option style="background-color:#FFE4E1;color: #FFE4E1" value="FFE4E1">#FFE4E1</option>
<option style="background-color:#FFE4B5;color: #FFE4B5" value="FFE4B5">#FFE4B5</option>
<option style="background-color:#FFDEAD;color: #FFDEAD" value="FFDEAD">#FFDEAD</option>
<option style="background-color:#000080;color: #000080" value="000080">#000080</option>
<option style="background-color:#FDF5E6;color: #FDF5E6" value="FDF5E6">#FDF5E6</option>
<option style="background-color:#808000;color: #808000" value="808000">#808000</option>
<option style="background-color:#6B8E23;color: #6B8E23" value="6B8E23">#6B8E23</option>
<option style="background-color:#FFA500;color: #FFA500" value="FFA500">#FFA500</option>
<option style="background-color:#FF4500;color: #FF4500" value="FF4500">#FF4500</option>
<option style="background-color:#DA70D6;color: #DA70D6" value="DA70D6">#DA70D6</option>
<option style="background-color:#EEE8AA;color: #EEE8AA" value="EEE8AA">#EEE8AA</option>
<option style="background-color:#98FB98;color: #98FB98" value="98FB98">#98FB98</option>
<option style="background-color:#AFEEEE;color: #AFEEEE" value="AFEEEE">#AFEEEE</option>
<option style="background-color:#DB7093;color: #DB7093" value="DB7093">#DB7093</option>
<option style="background-color:#FFEFD5;color: #FFEFD5" value="FFEFD5">#FFEFD5</option>
<option style="background-color:#FFDAB9;color: #FFDAB9" value="FFDAB9">#FFDAB9</option>
<option style="background-color:#CD853F;color: #CD853F" value="CD853F">#CD853F</option>
<option style="background-color:#FFC0CB;color: #FFC0CB" value="FFC0CB">#FFC0CB</option>
<option style="background-color:#DDA0DD;color: #DDA0DD" value="DDA0DD">#DDA0DD</option>
<option style="background-color:#B0E0E6;color: #B0E0E6" value="B0E0E6">#B0E0E6</option>
<option style="background-color:#800080;color: #800080" value="800080">#800080</option>
<option style="background-color:#FF0000;color: #FF0000" value="FF0000">#FF0000</option>
<option style="background-color:#BC8F8F;color: #BC8F8F" value="BC8F8F">#BC8F8F</option>
<option style="background-color:#4169E1;color: #4169E1" value="4169E1">#4169E1</option>
<option style="background-color:#8B4513;color: #8B4513" value="8B4513">#8B4513</option>
<option style="background-color:#FA8072;color: #FA8072" value="FA8072">#FA8072</option>
<option style="background-color:#F4A460;color: #F4A460" value="F4A460">#F4A460</option>
<option style="background-color:#2E8B57;color: #2E8B57" value="2E8B57">#2E8B57</option>
<option style="background-color:#FFF5EE;color: #FFF5EE" value="FFF5EE">#FFF5EE</option>
<option style="background-color:#A0522D;color: #A0522D" value="A0522D">#A0522D</option>
<option style="background-color:#C0C0C0;color: #C0C0C0" value="C0C0C0">#C0C0C0</option>
<option style="background-color:#87CEEB;color: #87CEEB" value="87CEEB">#87CEEB</option>
<option style="background-color:#6A5ACD;color: #6A5ACD" value="6A5ACD">#6A5ACD</option>
<option style="background-color:#708090;color: #708090" value="708090">#708090</option>
<option style="background-color:#FFFAFA;color: #FFFAFA" value="FFFAFA">#FFFAFA</option>
<option style="background-color:#00FF7F;color: #00FF7F" value="00FF7F">#00FF7F</option>
<option style="background-color:#4682B4;color: #4682B4" value="4682B4">#4682B4</option>
<option style="background-color:#D2B48C;color: #D2B48C" value="D2B48C">#D2B48C</option>
<option style="background-color:#008080;color: #008080" value="008080">#008080</option>
<option style="background-color:#D8BFD8;color: #D8BFD8" value="D8BFD8">#D8BFD8</option>
<option style="background-color:#FF6347;color: #FF6347" value="FF6347">#FF6347</option>
<option style="background-color:#40E0D0;color: #40E0D0" value="40E0D0">#40E0D0</option>
<option style="background-color:#EE82EE;color: #EE82EE" value="EE82EE">#EE82EE</option>
<option style="background-color:#F5DEB3;color: #F5DEB3" value="F5DEB3">#F5DEB3</option>
<option style="background-color:#FFFFFF;color: #FFFFFF" value="FFFFFF">#FFFFFF</option>
<option style="background-color:#F5F5F5;color: #F5F5F5" value="F5F5F5">#F5F5F5</option>
<option style="background-color:#FFFF00;color: #FFFF00" value="FFFF00">#FFFF00</option>
<option style="background-color:#9ACD32;color: #9ACD32" value="9ACD32">#9ACD32</option>
</select><%
end sub
'论坛主题加色和加粗结束
%>