summaryrefslogtreecommitdiffstats
path: root/mbbsd/admin.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-09-09 12:30:38 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-09-09 12:30:38 +0800
commitb61b430b4dfbcddbe97b0fb432a9888e509ad76d (patch)
tree148f94cd0b6182ae56f3f116bafcd65847fa4e21 /mbbsd/admin.c
parent64fa801fe4bd90430d601b72376a3eb74d7639fa (diff)
downloadpttbbs-b61b430b4dfbcddbe97b0fb432a9888e509ad76d.tar
pttbbs-b61b430b4dfbcddbe97b0fb432a9888e509ad76d.tar.gz
pttbbs-b61b430b4dfbcddbe97b0fb432a9888e509ad76d.tar.bz2
pttbbs-b61b430b4dfbcddbe97b0fb432a9888e509ad76d.tar.lz
pttbbs-b61b430b4dfbcddbe97b0fb432a9888e509ad76d.tar.xz
pttbbs-b61b430b4dfbcddbe97b0fb432a9888e509ad76d.tar.zst
pttbbs-b61b430b4dfbcddbe97b0fb432a9888e509ad76d.zip
admin.c: multiple reason for rejection
mbbsd.c: change the sequence of some action git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1169 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/admin.c')
-rw-r--r--mbbsd/admin.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index e6f30b20..a4770a18 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -779,6 +779,7 @@ scan_register_form(char *regfile, int automode, int neednum)
"詳填連絡電話 (含區域碼, 中間不用加 \"-\", \"(\", \")\"等符號",
"確實填寫註冊申請表",
"用中文填寫申請單",
+ "輸入真實身分證字號",
NULL
};
char *autoid = "AutoScan";
@@ -920,11 +921,6 @@ scan_register_form(char *regfile, int automode, int neednum)
char title[128], buf1[80];
FILE *fp;
- i = buf[0] - '0';
- strlcpy(buf, reason[i], sizeof(buf));
- snprintf(genbuf, sizeof(genbuf),
- "[退回原因] 請%s", buf);
-
sethomepath(buf1, muser.userid);
stampfile(buf1, &mhdr);
strlcpy(mhdr.owner, cuser.userid, sizeof(mhdr.owner));
@@ -933,7 +929,15 @@ scan_register_form(char *regfile, int automode, int neednum)
sethomedir(title, muser.userid);
if (append_record(title, &mhdr, sizeof(mhdr)) != -1) {
fp = fopen(buf1, "w");
- fprintf(fp, "%s\n", genbuf);
+
+ for(i = 0; buf[i] && i < sizeof(buf); i++){
+ if (!isdigit(buf[i]))
+ continue;
+ snprintf(genbuf, sizeof(genbuf),
+ "[退回原因] 請%s", reason[buf[i] - '0']);
+ fprintf(fp, "%s\n", genbuf);
+ }
+
fclose(fp);
}
if ((fout = fopen(logfile, "a"))) {