首页 | RSS订阅 | 网站地图
 
· 网站首页 · 关于站点 · 燕郊相关 · 网站推广 · 网站运营 · 站点展示 · 收集整理 · 职业生涯 · 联系我们

v5.51限制某个模型只能发表文章篇数

来源 不详 浏览 时间 2009年03月22日

刚看到有人需要这个限制,就分享下吧.也放你也用得着.

按如下步骤操作

用dw工具,打开user/user_myarticle.asp这个文件,然后找到以下代码,差不多241行

'添加文章
  Sub DoAdd()

    '============增加判断=============

    if channelid=113 then       '只对113的模型有效

     dim acticlenum:articlenum=conn.execute("select count(*) from " & KS.C_S(ChannelID,2) &" Where ArticleInput='" & KSUser.UserName &"'")(0)

    if articlenum>=3 then

       response.write "<script>alert('对不起,本频道限制每个会员只能发布3篇!');history.back();</script>"

        response.end

       end if

   end if

   '===============增加判断结束=============
        Call KSUser.InnerLocation("发布"& KS.C_S(ChannelID,3))
    if KS.S("Action")="Edit" Then
    Dim KS_A_RS_Obj:Set KS_A_RS_Obj=Serve

增加上面红色的部分即可

来源:http://bbs.kesion.com/dispbbs.asp?boardid=41&id=68443

 推荐文章  
 热门文章  
 相关文章  
联系方式:
张先生
E-mail:cay001@126.com


Email:cay001@126.com 辽ICP备06007435号 Copyright (C) 2009 All rights reserved