⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 forum_write.asp

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 ASP
📖 第 1 页 / 共 3 页
字号:
                  <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('/OK')" style="CURSOR: hand">OK</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"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -