Beispiel #1
0
static int set_modes_refresh(struct _select_def *conf)
{
    clear();
    docmdtitle("[设置自定义键模式]",
               "退出[\x1b[1;32mq\x1b[0;37m,\x1b[1;32me\x1b[0;37m] 移动[\x1b[1;32m↑\x1b[0;37m,\x1b[1;32m↓\x1b[0;37m] 选择[\x1b[1;32m空格\x1b[0;37m]\x1b[m");
    update_endline();
    return SHOW_CONTINUE;
}
Beispiel #2
0
static int set_smsg_refresh(struct _select_def *conf)
{
    clear();
    docmdtitle("[短信管理]","帮助[\033[1;32mh\033[m] 删除[\033[1;32md\033[m] 选择[\033[1;32ms\033[m] 回复短信[\033[1;32mS\033[m] 更改短消息前/后缀[\033[1;32mz\033[m]");
    move(2,0);
    prints("\033[0;1;37;44m  %-4s %-13s %-14s %-2s %-40s\033[m","序号","对象","时间", "类", "内容");
    update_endline();
    return SHOW_CONTINUE;
}
Beispiel #3
0
static int set_al_refresh(struct _select_def *conf)
{
	clear();
	docmdtitle("[通讯录管理]","退出[\033[1;32mq\033[m] 增加[\033[1;32ma\033[m] 修改[\033[1;32me\033[m] 删除[\033[1;32md\033[m] 选择[\033[1;32ms\033[m] 排序[\033[1;32mTAB\033[m] 导入[\033[1;32mi\033[m] 发送短信[\033[1;32mS\033[m]");
	move(2,0);
	prints("\033[0;1;44m  %-4s %s%-8s %s%-10s%s %-10s%s %-12s %-28s              \033[m","序号",al_order==AL_ORDER_NAME?"\033[1;32m":"",al_order==AL_ORDER_NAME?"{名字}":"名字",al_order==AL_ORDER_NAME?"\033[0;1;44m":(al_order==AL_ORDER_BBSID?"\033[1;32m":""),al_order==AL_ORDER_BBSID?"{id}":"id",al_order==AL_ORDER_BBSID?"\033[0;1;44m":(al_order==AL_ORDER_GROUPNAME?"\033[1;32m":""),al_order==AL_ORDER_GROUPNAME?"{分组}":"分组",al_order==AL_ORDER_GROUPNAME?"\033[0;1;44m":"", "手机","备注");
	update_endline();
	return SHOW_CONTINUE;
}
Beispiel #4
0
static int set_clock_refresh(struct _select_def *conf)
{
	clear();
	docmdtitle("[系统闹钟设置]","[a 增加] [d 删除] [s 查询最近一个闹铃时间]");
	move(2,0);
    prints("\033[0;1;37;44m   %-4s %-25s %-40s\033[m","类型", "闹铃时间","闹铃说明");
	update_endline();
	return SHOW_CONTINUE;
}
Beispiel #5
0
static int set_keydefine_refresh(struct _select_def *conf)
{
    clear();
    docmdtitle("[设置自定义键]","预定义[\x1b[1;32mTab\x1b[0;37m] 添加[\x1b[1;32ma\x1b[0;37m] 删除[\x1b[1;32md\x1b[0;37m]\x1b[m "
               "修改 { 模式[\x1b[1;32me\x1b[0;37m] 键名[\x1b[1;32mx\x1b[0;37m] 序列[\x1b[1;32mt\x1b[0;37m] 键名及序列[\x1b[1;32ms\x1b[0;37m] }");
    move(2, 0);
    prints("\033[0;1;37;44m  %-6s  %-36s  %-32s", "按键", "替换序列", "模式");
    clrtoeol();
    update_endline();
    return SHOW_CONTINUE;
}
Beispiel #6
0
Datei: tmpl.c Projekt: zhouqt/kbs
/*********************************
 * 模块选择方面
 ***************************/
static int choose_tmpl_refresh(struct _select_def *conf)
{
    clear();
    docmdtitle("[版面模板选择]",
               "退出[\x1b[1;32m←\x1b[0;37m] 选择[\x1b[1;32m↑\x1b[0;37m,\x1b[1;32m↓\x1b[0;37m] 使用[\x1b[1;32mSPACE\x1b[0;37m] 查看正文[\033[1;32ms\033[0;37m] 查看问题[\033[1;32mw\033[0;37m] 查看标题[\033[1;32mx\033[m]");
    move(2, 0);
    prints("\033[0;1;37;44m %4s %-60s %8s", "序号", "名称","问题个数");
    clrtoeol();
    update_endline();
    return SHOW_CONTINUE;
}
Beispiel #7
0
Datei: tmpl.c Projekt: zhouqt/kbs
static int content_refresh(struct _select_def *conf)
{
    clear();
    docmdtitle("[版面模板问题设置]",
               "添加[\x1b[1;32ma\x1b[0;37m] 删除[\x1b[1;32md\x1b[0;37m]\x1b[m 修改问题名称[\033[1;32mt\033[0;37m] 修改回答长度[\033[1;32ml\033[0;37m] 调整问题顺序[\033[1;32mm\033[0;37m]");
    move(2, 0);
    prints("\033[0;1;37;44m %4s     %-50s  %8s", "序号", "问题名称","回答长度");
    clrtoeol();
    update_endline();
    return SHOW_CONTINUE;
}
Beispiel #8
0
Datei: tmpl.c Projekt: zhouqt/kbs
static int tmpl_refresh(struct _select_def *conf)
{
    clear();
    docmdtitle("[版面模板设置]",
               "添加[\x1b[1;32ma\x1b[0;37m] 删除[\x1b[1;32md\x1b[0;37m]\x1b[m 复制[\x1b[1;32mc\x1b[0;37m] 改名[\033[1;32mt\033[0;37m] \033[1;33m查看\033[m 标题[\033[1;32mx\033[m] 正文[\033[1;32ms\033[m] \033[1;33m修改\033[m 标题[\033[1;32mi\033[0;37m] 正文[\033[1;32mf\033[0;37m]");
    move(2, 0);
    prints("\033[0;1;37;44m %4s %-60s %8s", "序号", "模板名称","问题个数");
    clrtoeol();
    update_endline();
    return SHOW_CONTINUE;
}
Beispiel #9
0
int showout()
{
	int     i, i2 = 0;
	char    foo[1024];
	char    tmpfile[STRLEN];
	char    buf[20];
	int     notreload = 0;
	GOPHER  newitem;
	while (1)
	{
		if (gopher_position < 0)
		{
			return;
		}
		print_gophertitle();
		printgopher_title();
		update_endline();
		if (!notreload)
		{
			i = 0;
			if (get_con(g_main[gopher_position]->server, g_main[gopher_position]->port) == -1)
			{
				show_message(NULL);
				free(g_main[gopher_position]);
				gopher_position--;
				notreload = 0;
				continue;
			}
			enterdir(g_main[gopher_position]->file);
			show_message("¶Áȡ׼±¸ÖÐ");
			for (i = 0; i < MAXGOPHERITEMS; i++)
			{
				if (readfield(a, foo, 1024) <= 0)
				{
					break;
				}
				if (foo[0] == '.' && foo[1] == '\r' && foo[2] == '\n')
				{
					break;
				}
				strncpy(newitem.title, foo, 70);
				if (readfield(a, foo, 1024) == 0)
				{
					break;
				}
				strncpy(newitem.file, foo, 80);
				if (readfield(a, foo, 1024) == 0)
				{
					break;
				}
				strncpy(newitem.server, foo, 40);
				if (readline(a, foo, 1024) == 0)
				{
					break;
				}
				newitem.port = atoi(foo);
				if (newitem.title[0] != newitem.file[0])
				{
					break;
				}
				if (newitem.title[0] != '0' && newitem.title[0] != '1')
				{
					i--;
					continue;
				}
				refresh();
				append_record(gophertmpfile, &newitem, sizeof(GOPHER));
				sprintf(buf, "[1;3%dmת[3%dm»»[3%dm×Ê[3%dmÁÏ[3%dmÖÐ", (i % 7) + 1
				        ,((i + 1) % 7) + 1, ((i + 2) % 7) + 1, ((i + 3) % 7) + 1, ((i + 4) % 7) + 1);
				show_message(buf);
			}
			show_message(NULL);
		}
		else
			notreload = 0;
		if (i <= 0)
		{
			move(3, 0);
			clrtobot();
			move(10, 0);
			clrtoeol();
			prints("                             ûÓÐÈκεÄ×ÊÁÏ...");
			pressanykey();
			free(g_main[gopher_position]);
			gopher_position--;
			continue;
		}
		close(a);
		move(0, 0);
		clrtobot();
		setlistrange(i);
		i2 = choose(NA, g_main[gopher_position]->position, print_gophertitle, deal_gopherkey, show_gopher, do_gopher);
		if (i2 == -1)
		{
			free(g_main[gopher_position]);
			clear_gophertmpfile();
			gopher_position--;
			continue;
		}
		g_main[gopher_position]->position = i2;
		get_record(gophertmpfile, &newitem, sizeof(GOPHER), i2 + 1);
		tmpitem = &newitem;
		if (newitem.title[0] == '0')
		{
			if (get_con(newitem.server, newitem.port) == -1)
				continue;
			enterdir(newitem.file);
			setuserfile(tmpfile, "gopher.tmp");
			savetmpfile(tmpfile);
			ansimore(tmpfile, YEA);
			notreload = 1;
			unlink(tmpfile);
			continue;
		}
		else
		{
			GOPHER *newgi;
			clear_gophertmpfile();
			gopher_position++;
			newgi = (GOPHER *) malloc(sizeof(GOPHER));
			strncpy(newgi->server, tmpitem->server, 40);
			strncpy(newgi->file, tmpitem->file, 80);
			strncpy(newgi->title, tmpitem->title, 70);
			newgi->port = tmpitem->port;
			newgi->position = 0;
			g_main[gopher_position] = newgi;
			continue;
		}
	}
}
Beispiel #10
0
int g_refresh()
{
	print_gophertitle();
	show_gopher();
	update_endline();
}