请先登录 | 注册
MYCSG.CN
修改的MANAGE有些问题,请IPSC帮忙看看 - 文章首页返回版区
■标题:修改的MANAGE有些问题,请IPSC帮忙看看
■作者:fmsvc [2005/3/18 23:20:02]
<!-- #include file="setup.asp" -->
<%
if Request.Cookies("username")=empty then error2("请登录后再进行操作!")

if Request.ServerVariables("request_method") <> "POST" then
response.write "<form name=BBSxpPOST method=post action=manage.asp?"&Request.ServerVariables("Query_String")&"></form><SCRIPT>if(confirm('您确定要执行该操作?')){returnValue=BBSxpPOST.submit()}else{returnValue=history.back()}</SCRIPT>"
htmlend
end if


top


id=int(Request("id"))
sql="Select * From [forum] where ID="&ID&""
rs.Open sql,Conn,1
forumid=rs("forumid")
ReList=rs("ReList")
rs.close

if membercode > 3 then
pass=1
elseif instr("|"&Conn.Execute("Select moderated From [bbsconfig] where id="&forumid&" ")(0)&"|","|"&Request.Cookies("username")&"|")>0 then
pass=1
end if

if pass<>1 then error("<li>您的权限不够")


username=Conn.Execute("Select username From [forum] where id="&id&"")(0)

select case Request("menu")
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "top"
if membercode > 3 then
conn.execute("update [forum] set toptopic=2 where id="&id&"")
succtitle="总置顶主题成功"
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&username&"','【系统消息】:管理员或版主"&Request.Cookies("username")&"已经把你的帖子:"&topic&" 总置顶,感谢您的好贴,感谢你对网站的一向的支持和热爱,请继续支持我们哦,让我们共同建设网上家园而努力!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&username&"'")
else
error("<li>您的权限不够")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "untop"
if membercode > 3 then
conn.execute("update [forum] set toptopic=0 where id="&id&"")
succtitle="取消总置顶主题成功"
else
error("<li>您的权限不够")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "movenew"
conn.execute("update [forum] set lasttime='"&now()&"' where id="&id&"")
succtitle="拉前主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "move"
if Request("moveid")="" then error("<li>您没有选择要将主题移动哪个论坛")
if Conn.Execute("Select pass From [bbsconfig] where id="&Request("moveid")&"")(0)=4 then error("<li>目标论坛为授权发帖状态")
conn.execute("update [forum] set forumid="&Request("moveid")&",toptopic=0,goodtopic=0,locktopic=0 where id="&id&"")
bbsname=Conn.Execute("Select bbsname From bbsconfig where id="&Request("moveid"))(0)
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&username&"','【系统消息】:管理员或版主"&Request.Cookies("username")&"已经把你的帖子:"&topic&" 移动到"&bbsname&",可能您的主题不符合原版块的要求或更适合新版块或其它问题而被转移,如有异议,请直接通过站内短消息的方式联系管理员 ,不好意思,给您添麻烦了。感谢你对网站的一向的支持和热爱,请继续支持我们哦,让我们共同建设网上家园而努力!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&username&"'")
succtitle="移动主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "deltopic"
if isnumeric(""&Request("retopicid")&"") then
conn.execute("delete from [reforum"&ReList&"] where topicid="&id&" and id="&Request("retopicid")&"")
conn.execute("update [forum] set replies=replies-1 where id="&id&"")
succtitle="删除回贴成功"
else
conn.execute("update [user] set deltopic=deltopic+1 where username='"&username&"'")
conn.execute("update [forum] set toptopic=0,deltopic=1,lastname='"&Request.Cookies("username")&"',lasttime='"&now()&"' where id="&id&" and deltopic=0")
succtitle="删除主题成功"
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&username&"','【系统消息】:管理员或版主"&Request.Cookies("username")&"已经把您的帖子:"&topic&" 删除,可能您的主题已经过期或重复或涉嫌未经过同意的广告或有违反本论坛规章制度或其它问题,如有异议,请直接通过站内短消息的方式联系删除斑竹,也可以提出意见给管理员而不要再次发贴讯问,不好意思,给您添麻烦了。感谢你对网站的一向的支持和热爱,请继续支持我们哦,让我们共建设网上家园而努力!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&username&"'")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "goodtopic"
if Conn.Execute("Select goodtopic From [forum] where id="&id&" ")(0)=1 then error("<li>此帖子已经加入精华区了,无需重复添加")
conn.execute("update [forum] set goodtopic=1 where id="&id&"")
conn.execute("update [user] set goodtopic=goodtopic+1 where username='"&username&"'")
conn.execute("update [user] set [money]=[money]+25 where username='"&username&"'")
conn.execute("update [user] set [experience]=[experience]+50 where username='"&username&"'")
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&username&"','【系统消息】:管理员或版主"&Request.Cookies("username")&"已经把你的帖子:"&topic&" 加为精华,你增加了25金钱值及50经验!感谢你对网站的一向的支持和热爱,请继续支持我们哦,让我们共同为网站的明天而努力!期待你更精彩的精华贴!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&username&"'")
succtitle="加入精华区成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "delgoodtopic"
if Conn.Execute("Select goodtopic From [forum] where id="&id&" ")(0)=0 then error("<li>此帖子已经移出精华区了")
conn.execute("update [forum] set goodtopic=0 where id="&id&"")
conn.execute("update [user] set goodtopic=goodtopic-1 where username='"&username&"'")
succtitle="移出精华区成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "toptopic"
conn.execute("update [forum] set toptopic=1 where id="&id&"")
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&username&"','【系统消息】:管理员或版主"&Request.Cookies("username")&"已经把你的帖子:"&topic&" 置顶,感谢你的好贴,感谢你对网站的一向的支持和热爱,请继续支持我们哦,让我们共同建设网上家园而努力!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&username&"'")
succtitle="置顶主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "deltoptopic"
conn.execute("update [forum] set toptopic=0 where id="&id&"")
succtitle="取消置顶主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "locktopic"
conn.execute("update [forum] set locktopic=1 where id="&id&"")
succtitle="关闭主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "dellocktopic"
conn.execute("update [forum] set locktopic=0 where id="&id&"")
succtitle="开放主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "lookip"
if isnumeric(""&Request("retopicid")&"") then
sql="Select * From [reforum"&ReList&"] where id="&Request("retopicid")&""
else
sql="Select * From [forum] where id="&id&""
end if

rs.Open sql,Conn,1
username=rs("username")
posttime=rs("posttime")
postip=rs("postip")
rs.close
%>


<table border=0 width=97% align=center cellspacing=1 cellpadding=4 class=a2>
<tr class=a3>
<td height=25>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → 查看IP</td>
</tr>
</table>
<br>
<table width="333" border="0" cellspacing="1" cellpadding="2" align="center" class=a2>
<tr>
<td width="328" height="25" align="center" class=a1 colspan="2">
查看IP
</td></tr><tr>
<td height="7" width="164" valign="top" align="center" class=a3>
用户名</td>
<td height="7" width="164" valign="top" align="center" class=a3>
<%=username%></td></tr><tr>
<td height="6" width="164" valign="top" align="center" class=a3>
时间</td>
<td height="6" width="164" valign="top" align="center" class=a3>
<%=posttime%></td></tr><tr>
<td height="6" width="164" valign="top" align="center" class=a3>
IP地址</td>
<td height="6" width="164" valign="top" align="center" class=a3>
<%=postip%></td></tr></table>

<br>
<center>
<a href=ShowPost.asp?id=<%=id%>>BACK</a><br>
<%
htmlend

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
end select
if succtitle="" then error("<li>无效命令")

log(""&succtitle&",主题ID:"&id&"")

message="<li>"&succtitle&"<li><a href=ShowForum.asp?forumid="&forumid&">返回论坛</a><li><a href=Default.asp>返回社区首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=ShowForum.asp?forumid="&forumid&">")
%>;%ClubTree%> → 查看IP</td>
</tr>
</table>
<br>
<table width="333" border="0" cellspacing="1" cellpadding="2" align="center" class=a2>
<tr>
<td width="328" height="25" align="center" class=a1 colspan="2">
查看IP
</td></tr><tr>
<td height="7" width="164" valign="top" align="center" class=a3>
用户名</td>
<td height="7" width="164" valign="top" align="center" class=a3>
<%=username%></td></tr><tr>
<td height="6" width="164" valign="top" align="center" class=a3>
时间</td>
<td height="6" width="164" valign="top" align="center" class=a3>
<%=posttime%></td></tr><tr>
&l

回复/版区/上篇/下篇/发贴/仅文字/HTML
【倒序/最近21条回复】
■作者:fmsvc [2005/3/31 20:05:02]
[em10]

■作者:fmsvc [2005/3/28 13:10:03]
人哪?帮帮我吧!

■作者:fmsvc [2005/3/26 1:06:33]
原文由 IPSC 发表:这个字段“topic”并没有被传递到这个文件,这个文件也没有读出并给这个字段赋过值,所以你必须另外写几行代码来用传递过来的ID读出FORUM表里该贴子的topic字段并赋值才能显示!
老大,帮忙修改一下吧,你说的太深奥了

■作者:冷雨纷飞 [2005/3/23 15:46:33]
我很想要这个功能,可不好意思麻烦了。
楼主,改好后能提供代码吗?

■作者:IPSC [2005/3/22 10:02:35]
这个字段“topic”并没有被传递到这个文件,这个文件也没有读出并给这个字段赋过值,所以你必须另外写几行代码来用传递过来的ID读出FORUM表里该贴子的topic字段并赋值才能显示!

■作者:fmsvc [2005/3/18 23:21:39]
这个是我修改的manage,问题是,我加精华,删除,发给对方的短消息显示不了被加精华或删除帖子的名字,怎么回事情,哪里有问题,麻烦帮我看一看 ,谢谢了


(查看完整版网页)



短讯|首页|登录|算法|电脑版 .
DK MiniBBS Plus v2.0
mm0759.com
406 毫秒 .