看板SetupBBS
标 题彩绘文字留言板
发信站鸡房心语 (Sun Sep 7 20:58:21 2003)
转信站ptt!ctu-reader!ctu-peer!news.nctu!netnews.csie.nctu!news.cs.nthu!pcroo
bbs.c (参考 StarBBS 的 menu.h 个人色彩之改法)
void
note()
{
static char *fn_note_tmp = "note.tmp";
static char *fn_note_dat = "note.dat";
int total, i,
j, collect, len;
struct stat st;
char buf[512], buf2[512],
genbuf[2];
int fd, fx,
color;
FILE *fp, *foo;
struct notedata
{
usint color;
time_t date;
char userid[IDLEN + 1];
char username[19];
char buf[3][80];
};
myitem.buf[0][0] = myitem.buf[1][0] = myitem.buf[2][0] = '\0';
do
{
move(b_lines-1,0);
clrtobot();
prints("(1)\033[1;41m \033[m(2)\033[1;42m \033[m(3)\033[1;43m \033[m
(4)\033[1;44m \033[m(5)\033[1;45m \033[m(6)\033[1;46m \033[m
(7)\033[1;47m \033[m(8)随机(9)预设");
getdata(b_lines ,0,"请选择留言板显示的文字色彩:", genbuf, 2,LCECHO,"7");
if((color=atol(genbuf)) >= 0)
{
if(color == 8)
color = j = rand () % 8;
if(color == 9)
color = 7;
myitem.color = color;
}
move(12, 0);
clrtobot();
outs("\n请留言 (至多三行),按[Enter]结束")
下面自行做变化.....以 WD 预设的留言板为例...
sprintf(buf, "\033[1;44m\033[36m└┐
\033[3%dm%-70s\033[36m┌┘\033[m\n",
myitem.color, myitem.buf[0]);
if(*myitem.buf[1])
{
sprintf(buf2, " \033[1;44m\033[36m│
\033[3%dm%-70s\033[36m│^[[m\n",
myitem.color, myitem.buf[1]);
strcat(buf, buf2);
}
if(*myitem.buf[2])
{
sprintf(buf2, " \033[1;44m\033[36m│
\033[3%dm%-70s\033[36m│\033[m\n",
myitem.color, myitem.buf[2]);
strcat(buf, buf2);
}
--
┌ 记忆里满是你的笑容 ┐
│ 掀起一阵一阵 落寞的伤心 │ ... 失忆日记
│ 让苦涩的咖啡... │ 心情记事 ...
└ 一口口不停地吞蚀溶解 受创的心 ┘
--
※ Origin: 鸡房心语˙bbs.pcroom.fcu.edu.tw ※ From: sw59-30-160.adsl.seed.ne
◢◣ ★╭┬─╮╭┬─╮╭┬─╮ :'
──★ ● ◣
◢◥◣ ●/ │┤ ││┤ │┤ │╭┬─╮╭┬─╮┌┬┬╮ █◣
◢ ◥◣■●/ │┼─╯│┤ ├┴┬╯│┤ ││┤ ││┤││ ██◣
╪╪╪ ||▲︽╰╯ ╰┴─╯╰╯╰╯╰┴─╯╰┴─╯╰╯╯╯ ● ═╧══╝
◆ 逢甲大学 鸡房心语˙电子布告栏系统˙bbs.pcroom.fcu.edu.tw˙140.134.208.77 ◆