ytht代码-web提示修正

RCS file: D:/ythtcvs/bbs/nju09/BBSLIB.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BBSLIB.c    2005/00/05 04:18:58     1.3
+++ BBSLIB.c    2005/00/09 07:14:29     1.4
@@ -1777,8 +1777,15 @@
                return 0;
        if (!strcasecmp(x->header.filename, DEFAULTBOARD))
                return 1;
-       if (user_perm(user, PERM_SYSOP))
-               return 1;
+       if (user_perm(user, PERM_SYSOP)) {
+               /*if (x->header.flag & CLUB_FLAG) {
+                       sprintf(buf3, "boards/%s/club_users", x->header.filename
);
+                       if (!(file_has_word(buf3, user->userid)))
+                               return 3; //非俱乐部成员的sysop权限返回3
+               }
+               else*/
+                       return 1;
+       }
        if (!user_perm(user, PERM_BASIC))
                return 0;
        if (!user_perm(user, PERM_POST))
@@ -1795,7 +1802,7 @@
                if (file_has_word(buf3, user->userid))
                        return 1;
                else
-                       return 0;
+                       return 2; //非俱乐部成员返回2,modified by tnds
        }
        return 1;
 }


===================================================================
RCS file: D:/ythtcvs/bbs/nju09/bbspst.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bbspst.c    2005/00/04 14:47:19     1.2
+++ bbspst.c    2005/00/09 07:14:28     1.3
@@ -6,6 +6,8 @@
        int local_article, num, fullquote = 0, guestre = 0, thread = -1;
        char *ptr, userid[80], buf[512], path[512], file[512], board[512],
            title[80] = "";
+       int club;
+       char temp[70];
        struct fileheader *dirinfo = NULL;
        struct boardmem *x;
       struct mmapfile mf = { ptr:NULL };
@@ -40,8 +42,14 @@
                http_fatal("错误的讨论区或者您无权在此讨论区发表文章");
        if (njuinn_board(board) && !innd_board(board))
                local_article = 1;
-       if (!has_post_perm(currentuser, x) && !isguest)
-               http_fatal("错误的讨论区或者您无权在此讨论区发表文章");
+       club=has_post_perm(currentuser,x);
+       if (club==2) {
+               sprintf(temp,"%s为俱乐部版面,而您不是%s俱乐部的成员,请向%s俱乐
部的版务申请发文权限",board,board,board);
+               http_fatal(temp);
+       } else {
+               if (club!=1 && !isguest)
+                       http_fatal("错误的讨论区或者您无权在此讨论区发表文章");
+       }
        if (noadm4political(board))
                http_fatal("对不起,因为没有版面管理人员在线,本版暂时封闭.");
        if (x->ban == 2)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值