软件工程

本类阅读TOP10

·PHP4 + MYSQL + APACHE 在 WIN 系统下的安装、配置
·Linux 入门常用命令(1)
·Linux 入门常用命令(2)
·使用 DCPROMO/FORCEREMOVAL 命令强制将 Active Directory 域控制器降级
·DirectShow学习(八): CBaseRender类及相应Pin类的源代码分析
·基于ICE方式SIP信令穿透Symmetric NAT技术研究
·Windows 2003网络负载均衡的实现
·一网打尽Win十四种系统故障解决方法
·数百种 Windows 软件的免费替代品列表
·收藏---行百里半九十

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
ytht代码-web提示修正

作者:未知 来源:月光软件站 加入时间:2005-5-13 月光软件站

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)




相关文章

相关软件