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

📄 up.asp

📁 一个不错的论坛原代码
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->
<!--#include file="fyerror.asp" -->
<!--#include file="online.asp" -->
<%cpbtitle="管理主题"
call toptitle(l_title,cpbtitle)
call head(4,"论坛信息",Request.ServerVariables("HTTP_REFERER"),cpbtitle)
if request.querystring("l_id")="" then 
errornum=1
errormsg="<li>很抱歉,您没有选择论坛,请从论坛首页正确登陆</li>"
 end if
 
  if errornum<> 1 then
  
 if isuser then

isbanzhu=false
'如果是管理员或者总斑竹就跳过此检查
 if issupermaster=false and ismaster=false then
 sql="select l_id  from topic where t_id="&chktopic(request("t_id"))&""
 set rs=conn.execute(sql)
 if rs.eof then
errormsg="<li>很抱歉,此主题不存在</li>"
call error(errormsg)
call bq
response.end 
else
l_idd=rs("l_id")
 end if

sqlchecadmin="select l_banzhu from lanmu where l_id="&l_idd&""
set rschecadmin=conn.execute(sqlchecadmin)
if not (rschecadmin.eof or rschecadmin.bof) then
l_banzhu=rschecadmin("l_banzhu")
if not isnull(l_banzhu) and l_banzhu<>"" and isuser then
  if instr(l_banzhu,cpbusername)=0 then
  errornum=1
errormsg="<li>很抱歉,您不是管理员或者总版主或者该论坛版主</li>"
  end if
  else
errornum=1
errormsg="<li>很抱歉,您不是管理员或者总版主或者该论坛版主</li>"
  end if
   else
errornum=1
errormsg="<li>很抱歉,您不是管理员或者总版主或者该论坛版主</li>"

  end if

  end if
else
errornum=1
errormsg="<li>很抱歉,您还没有登陆</li>"
end if
end if 
 if errornum=1 then
call error(errormsg)
call bq
response.end 
end if

'取出变量
dim top_fen,h_topmoney,h_topbeauty
 sql="select top_fen,h_topmoney,h_topbeauty from home"
 set rsconn1=conn.execute(sql)
 if not rsconn1.eof then
top_fen=rsconn1("top_fen")
h_topmoney=rsconn1("h_topmoney")
h_topbeauty=rsconn1("h_topbeauty")
end if
set rsconn1=nothing%>

<%if request.querystring("action")="top" then
sql="select t_title,t_top from topic where t_id="&chktopic(request("t_id"))&""
 set rs=conn.execute(sql)
 if rs("t_top")=0 and issupermaster=false and ismaster=false then
errormsg="<li>此主题已经总固定,只有管理员和总版主才可以操作</li>"
call error(errormsg)
call bq()
response.end
end if
 if rs("t_top")=1 then
 if request.querystring("mode")="" then%>
 <div align="center">
  <center> 
 <table border=1 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse">
<form action=up.asp?l_id=<%=request.querystring("l_id")%>&t_id=<%=chktopic(request("t_id"))%>&action=top&mode=do METHOD="POST" name="form1"><tr>
<td class=tdc1 colspan="3" <%=tColor%> height=22> 
<p align="center">取消置顶主题"<%=htmlencode(rs("t_title"))%>"
 </td>

 </tr>
 <%call even()%>
 <td align="left" class=tdc bgcolor=<%=tcolor2%>>
       &nbsp;<input type="submit" name="Submit" value="确认"   class=bdtj > </td>
 </tr>
 
  <tr height=20>
<td class=tdc bgcolor=<%=tcolor2%> align="right" colspan="3"> 

<p align="center">
<br><br>
    <a href=javascript:history.go(-1)> << 返回上一页</a>
<br><br>
<a href=list.asp?l_id=<%=request.querystring("l_id")%>>返回前论坛</a>

    <br>
</td>

 </tr>

 </table>
  </center>
</div>

<%
else
e_money=chktopic(trim(request("e_money")))
e_beauty=chktopic(trim(request("e_beauty")))
e_fen=chktopic(trim(request("e_fen")))
e_title=chktopic(trim(request("e_title")))
e_content=chktopic(trim(request("e_content")))
if e_content="" and  e_title="" then
errormsg="<li>请填写操作理由</li>"
call error(errormsg)
call bq()
response.end
end if
e_content="取消置顶主题:"&htmlencode(rs("t_title"))&"<BR>结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;<BR>理由:"&e_title&":"&e_content
 sql="select t_username,t_title from topic where  t_id="&chktopic(request("t_id"))&""
set rs=conn.execute(sql)
if not rs.eof then
 e_username=rs("t_username")
 e_title=rs("t_title")
 end if
set rs=nothing
sql="insert into even (e_lanmu,e_topic,e_ip,e_time,e_content,e_username,e_admin) values ("&chktopic(request("l_id"))&","&chktopic(request("t_id"))&",'"&o_ip&"','"&nowtime&"','"&e_content&"','"&e_username&"','"&cpbusername&"')"
conn.execute(sql)

   sqlnum="update topic set t_top=4 where t_id="&chktopic(request("t_id"))&""
    conn.Execute (sqlnum)
    
    sqluser1="update user set fen=fen+"&e_fen&",u_beauty=u_beauty+"&e_beauty&",u_money=u_money+"&e_money&" where username='"&e_username&"'"
conn.Execute (sqluser1)

    if request("p_send")="1" then
    p_content=chktopic(request("p_content"))
    admina=cpbusername
q_content="您发表的的主题《"&e_title&"》被取消置顶,[url=topic.asp?l_id="&chktopic(request("l_id"))&"&t_id="&chktopic(request("t_id"))&"]地址[/url]"&chr(10)&"结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;"&chr(10)&"以下为操作者对你的留言:"&p_content&""
q_title="系统信息"
 sqlpm="insert into pm (q_receive,q_title,q_content,q_send) values('"&e_username&"','"&q_title&"','"&q_content&"','"&admina&"')"
       conn.Execute(sqlpm)
 end if

  succmsg="<LI>主题取消置顶完成</LI><li><a href=list.asp?l_id="&request.querystring("l_id")&">返回前论坛</a></li>"
call succ(succmsg) 
    end if
    else
     if request.querystring("mode")="" then%>
 <div align="center">
  <center> 
 <table border=1 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse">
<form action=up.asp?l_id=<%=request.querystring("l_id")%>&t_id=<%=chktopic(request("t_id"))%>&action=top&mode=do METHOD="POST" name="form1"><tr>
<td class=tdc1 colspan="3" <%=tColor%> height=22> 
<p align="center">置顶主题"<%=htmlencode(rs("t_title"))%>"
 </td>

 </tr>
<%call even()%>
<td align="left" class=tdc bgcolor=<%=tcolor2%>>
       &nbsp;<input type="submit" name="Submit" value="确认"   class=bdtj > </td>
 </tr>
 
  <tr height=20>
<td class=tdc bgcolor=<%=tcolor2%> align="right" colspan="3"> 

<p align="center">
<br><br>
    <a href=javascript:history.go(-1)> << 返回上一页</a>
<br><br>
<a href=list.asp?l_id=<%=request.querystring("l_id")%>>返回前论坛</a>

    <br>
</td>

 </tr>

 </table>
  </center>
</div>

<%
else
e_money=chktopic(trim(request("e_money")))
e_beauty=chktopic(trim(request("e_beauty")))
e_fen=chktopic(trim(request("e_fen")))
e_title=chktopic(trim(request("e_title")))
e_content=chktopic(trim(request("e_content")))
if e_content="" and  e_title="" then
errormsg="<li>请填写操作理由</li>"
call error(errormsg)
call bq()
response.end
end if
e_content="置顶主题:"&htmlencode(rs("t_title"))&"<BR>结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;<BR>理由:"&e_title&":"&e_content
sql="select t_username,t_title from topic where  t_id="&chktopic(request("t_id"))&""
set rs=conn.execute(sql)
if not rs.eof then
 e_username=rs("t_username")
 e_title=rs("t_title")
 end if

set rs=nothing
sql="insert into even (e_lanmu,e_topic,e_ip,e_time,e_content,e_username,e_admin) values ("&chktopic(request("l_id"))&","&chktopic(request("t_id"))&",'"&o_ip&"','"&nowtime&"','"&e_content&"','"&e_username&"','"&cpbusername&"')"
conn.execute(sql)

    sqlnum="update topic set t_top=1 where t_id="&chktopic(request("t_id"))&""
    conn.Execute (sqlnum)
    
       if request("p_send")="1" then
    p_content=chktopic(request("p_content"))
    admina=cpbusername
q_content="您发表的的主题《"&e_title&"》被置顶,[url=topic.asp?l_id="&chktopic(request("l_id"))&"&t_id="&chktopic(request("t_id"))&"]地址[/url]"&chr(10)&"结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;"&chr(10)&"以下为操作者对你的留言:"&p_content&""
q_title="系统信息"
 sqlpm="insert into pm (q_receive,q_title,q_content,q_send) values('"&e_username&"','"&q_title&"','"&q_content&"','"&admina&"')"
        conn.Execute(sqlpm)
        end if
      
        sqluser1="update user set fen=fen+"&e_fen&",u_beauty=u_beauty+"&e_beauty&",u_money=u_money+"&e_money&" where username='"&e_username&"'"
conn.Execute (sqluser1)
    succmsg="<LI>主题置顶完成</LI><li><a href=list.asp?l_id="&request.querystring("l_id")&">返回前论坛</a></li>"
call succ(succmsg)
end if
    end if

'总固定
elseif request.querystring("action")="toptop" then
if issupermaster=false and ismaster=false then
    errormsg="<li>很抱歉,您无权限操作,只有总斑竹或者管理员才可以操作</li>"
call error(errormsg)
call bq()
response.end
end if

sql="select t_title,t_top from topic where t_id="&chktopic(request("t_id"))&""
 set rs=conn.execute(sql)
 if rs("t_top")=0 then
 if request.querystring("mode")="" then%>
 <div align="center">
  <center> 
 <table border=1 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse">
<form action=up.asp?l_id=<%=request.querystring("l_id")%>&t_id=<%=chktopic(request("t_id"))%>&action=toptop&mode=do METHOD="POST" name="form1"><tr>
<td class=tdc1 colspan="3" <%=tColor%> height=22> 
<p align="center">取消总固顶主题"<%=htmlencode(rs("t_title"))%>"
 </td>

 </tr>
 <%call even()%>
 <td align="left" class=tdc bgcolor=<%=tcolor2%>>
       &nbsp;<input type="submit" name="Submit" value="确认"   class=bdtj > </td>
 </tr>
 
  <tr height=20>
<td class=tdc bgcolor=<%=tcolor2%> align="right" colspan="3"> 

<p align="center">
<br><br>
    <a href=javascript:history.go(-1)> << 返回上一页</a>
<br><br>
<a href=list.asp?l_id=<%=request.querystring("l_id")%>>返回前论坛</a>

    <br>
</td>

 </tr>

 </table>
  </center>
</div>

<%
else
e_money=chktopic(trim(request("e_money")))
e_beauty=chktopic(trim(request("e_beauty")))
e_fen=chktopic(trim(request("e_fen")))
e_title=chktopic(trim(request("e_title")))
e_content=chktopic(trim(request("e_content")))
if e_content="" and  e_title="" then
errormsg="<li>请填写操作理由</li>"
call error(errormsg)
call bq()
response.end
end if
e_content="取消总固顶主题:"&htmlencode(rs("t_title"))&"<BR>结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;<BR>理由:"&e_title&":"&e_content
 sql="select t_username,t_title from topic where  t_id="&chktopic(request("t_id"))&""
set rs=conn.execute(sql)
if not rs.eof then 
e_username=rs("t_username")
e_title=rs("t_title")
end if
set rs=nothing
sql="insert into even (e_lanmu,e_topic,e_ip,e_time,e_content,e_username,e_admin) values ("&chktopic(request("l_id"))&","&chktopic(request("t_id"))&",'"&o_ip&"','"&nowtime&"','"&e_content&"','"&e_username&"','"&cpbusername&"')"
conn.execute(sql)

   sqlnum="update topic set t_top=4 where t_id="&chktopic(request("t_id"))&""
    conn.Execute (sqlnum)
    
    if request("p_send")="1" then
    p_content=chktopic(request("p_content"))
    admina=cpbusername
q_content="您发表的的主题《"&e_title&"》被取消总固顶,[url=topic.asp?l_id="&chktopic(request("l_id"))&"&t_id="&chktopic(request("t_id"))&"]地址[/url]"&chr(10)&"结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;"&chr(10)&"以下为操作者对你的留言:"&p_content&""
q_title="系统信息"
 sqlpm="insert into pm (q_receive,q_title,q_content,q_send) values('"&e_username&"','"&q_title&"','"&q_content&"','"&admina&"')"
        conn.Execute(sqlpm)
        end if
      
        sqluser1="update user set fen=fen+"&e_fen&",u_beauty=u_beauty+"&e_beauty&",u_money=u_money+"&e_money&" where username='"&e_username&"'"
conn.Execute (sqluser1)
 succmsg="<LI>主题取消总固顶完成</LI><li><a href=list.asp?l_id="&request.querystring("l_id")&">返回前论坛</a></li>"
call succ(succmsg)

       end if
    else
     if request.querystring("mode")="" then%>
 <div align="center">
  <center> 
 <table border=1 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse">
<form action=up.asp?l_id=<%=request.querystring("l_id")%>&t_id=<%=chktopic(request("t_id"))%>&action=toptop&mode=do METHOD="POST" name="form1"><tr>
<td class=tdc1 colspan="3" <%=tColor%> height=22> 
<p align="center">总固顶主题"<%=htmlencode(rs("t_title"))%>"
 </td>

 </tr>
<%call even()%>
<td align="left" class=tdc bgcolor=<%=tcolor2%>>
       &nbsp;<input type="submit" name="Submit" value="确认"   class=bdtj > </td>
 </tr>
 
  <tr height=20>
<td class=tdc bgcolor=<%=tcolor2%> align="right" colspan="3"> 

<p align="center">
<br><br>
    <a href=javascript:history.go(-1)> << 返回上一页</a>
<br><br>
<a href=list.asp?l_id=<%=request.querystring("l_id")%>>返回前论坛</a>

    <br>
</td>

 </tr>

 </table>
  </center>
</div>

<%
else
e_money=chktopic(trim(request("e_money")))
e_beauty=chktopic(trim(request("e_beauty")))
e_fen=chktopic(trim(request("e_fen")))
e_title=chktopic(trim(request("e_title")))
e_content=chktopic(trim(request("e_content")))
if e_content="" and  e_title="" then
errormsg="<li>请填写操作理由</li>"
call error(errormsg)
call bq()
response.end
end if
e_content="总固顶主题:"&htmlencode(rs("t_title"))&"<BR>结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;<BR>理由:"&e_title&":"&e_content
 sql="select t_username,t_title from topic where  t_id="&chktopic(request("t_id"))&""
set rs=conn.execute(sql)
if not rs.eof then 
e_username=rs("t_username")
e_title=rs("t_title")
end if
set rs=nothing
sql="insert into even (e_lanmu,e_topic,e_ip,e_time,e_content,e_username,e_admin) values ("&chktopic(request("l_id"))&","&chktopic(request("t_id"))&",'"&o_ip&"','"&nowtime&"','"&e_content&"','"&e_username&"','"&cpbusername&"')"
conn.execute(sql)

    sqlnum="update topic set t_top=0 where t_id="&chktopic(request("t_id"))&""
    conn.Execute (sqlnum)
    
     if request("p_send")="1" then
    p_content=chktopic(request("p_content"))
    admina=cpbusername
q_content="您发表的的主题《"&e_title&"》被总固顶,[url=topic.asp?l_id="&chktopic(request("l_id"))&"&t_id="&chktopic(request("t_id"))&"]地址[/url]"&chr(10)&"结果:经验:"&e_fen&";;;魅力:"&e_beauty&";;;金钱:"&e_money&";;;"&chr(10)&"以下为操作者对你的留言:"&p_content&""
q_title="系统信息"
 sqlpm="insert into pm (q_receive,q_title,q_content,q_send) values('"&e_username&"','"&q_title&"','"&q_content&"','"&admina&"')"
        conn.Execute(sqlpm)
        end if
      
        sqluser1="update user set fen=fen+"&e_fen&",u_beauty=u_beauty+"&e_beauty&",u_money=u_money+"&e_money&" where username='"&e_username&"'"
conn.Execute (sqluser1)

 succmsg="<LI>主题总固顶完成</LI><li><a href=list.asp?l_id="&request.querystring("l_id")&">返回前论坛</a></li>"
call succ(succmsg)

      
     end if
    end if

⌨️ 快捷键说明

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