summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-15 07:26:04 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-15 07:26:04 +0800
commitc466f3e5e27555767cd786484fcfa6d3e920dd09 (patch)
tree7ee45bf47c00d36f10b5e6b3f790b967121ba7c6
parentac1c0289a05c6b189c4397a556d59766650c08c5 (diff)
downloadpttbbs-c466f3e5e27555767cd786484fcfa6d3e920dd09.tar
pttbbs-c466f3e5e27555767cd786484fcfa6d3e920dd09.tar.gz
pttbbs-c466f3e5e27555767cd786484fcfa6d3e920dd09.tar.bz2
pttbbs-c466f3e5e27555767cd786484fcfa6d3e920dd09.tar.lz
pttbbs-c466f3e5e27555767cd786484fcfa6d3e920dd09.tar.xz
pttbbs-c466f3e5e27555767cd786484fcfa6d3e920dd09.tar.zst
pttbbs-c466f3e5e27555767cd786484fcfa6d3e920dd09.zip
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1341 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 4dea7a74..4560f132 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -518,7 +518,7 @@ do_general(int isbid)
int aborted, defanony, ifuseanony, i;
char genbuf[200], *owner, ctype[8][5] = {"問題", "建議", "討論", "心得", "閒聊", "請益", "公告", "情報"};
boardheader_t *bp;
- int islocal;
+ int islocal, posttype=0;
ifuseanony = 0;
bp = getbcache(currbid);
@@ -567,7 +567,8 @@ do_general(int isbid)
move(19, 0);
prints("%s於【\033[33m %s\033[m 】 \033[32m%s\033[m 看板\n",
isbid?"公開招標":"發表文章",
- currboard, bp->title + 7);
+ currboard, bp->title + 7);
+
if(isbid)
{
memset(&bidinfo,0,sizeof(bidinfo));
@@ -587,15 +588,18 @@ do_general(int isbid)
strncpy(ctype[i],bp->posttype+4*i,4);
if(i==0) i=8;
for(aborted=0; aborted<i; aborted++)
- prints("%d.%4.4s ", i+1, ctype[i]);
+ prints("%d.%4.4s ", i+1, ctype[aborted]);
sprintf(buf,"(1-%d或不選)",i);
getdata(21, 6+7*i, buf, save_title, 3, LCECHO);
- local_article = save_title[0] - '1';
- if (local_article >= 0 && local_article <= 6)
+ posttype = save_title[0] - '1';
+ if (posttype >= 0 && posttype <= 6)
snprintf(save_title, sizeof(save_title),
- "[%s] ", ctype[local_article]);
+ "[%s] ", ctype[posttype]);
else
+ {
save_title[0] = '\0';
+ posttype=0;
+ }
}
getdata_buf(22, 0, "標題:", save_title, TTLEN, DOECHO);
strip_ansi(save_title, save_title, 0);
@@ -606,7 +610,6 @@ do_general(int isbid)
curredit &= ~EDIT_MAIL;
curredit &= ~EDIT_ITEM;
setutmpmode(POSTING);
-
/* 未具備 Internet 權限者,只能在站內發表文章 */
if (HAS_PERM(PERM_INTERNET))
local_article = 0;
@@ -625,6 +628,11 @@ do_general(int isbid)
fclose((FILE*)aborted);
}
}
+ else if(posttype && (1<<posttype & bp->posttype_f))
+ {
+ setbnfile(genbuf, bp->brdname, "postsample", posttype);
+ Copy(genbuf,fpath);
+ }
aborted = vedit(fpath, YEA, &islocal);
if (aborted == -1) {