static choose_title_t choose_board_title(choose_t *cp) { choose_board_t *cbrd = cp->data; const char *sort = "分类"; char flag = currentuser.flags[0]; if (flag & BRDSORT_FLAG) { sort = "字母"; } else if (flag & BRDSORT_ONLINE) { sort = "在线"; } else if (flag & BRDSORT_UDEF) { sort = "自定"; } else if (flag & BRDSORT_UPDATE) { sort = "更新"; } char buf[32]; snprintf(buf, sizeof(buf), "[讨论区列表] [%s]", sort); docmdtitle(buf, " \033[m主选单[\033[1;32m←\033[m,\033[1;32me\033[m] 阅读" "[\033[1;32m→\033[m,\033[1;32mRtn\033[m] 选择[\033[1;32m↑\033[m," "\033[1;32m↓\033[m] 列出[\033[1;32my\033[m] 排序[\033[1;32ms" "\033[m] 搜寻[\033[1;32m/\033[m] 切换[\033[1;32mc\033[m] 求助" "[\033[1;32mh\033[m]\n"); prints("\033[1;44;37m %s 讨论区名称 V 类别 %-20s S 版 主 " "在线 \033[m\n", cbrd->newflag ? "全 部 未" : "编 号 未", "中 文 叙 述"); }
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; }
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; }
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; }
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; }
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; }
/********************************* * 模块选择方面 ***************************/ 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; }
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; }
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; }
static int help_refresh(struct _select_def *conf) { int mode = *((int *)conf->arg); char searchstr[100]; char helptitle[100]; clear(); move(0,0); if (mode == 0) strcpy(helptitle, "[全部模式帮助]"); else snprintf(helptitle, 100, "[帮助 - %s]", helpmodestr[mode-1]); docmdtitle(helptitle, " \033[m退出[\033[1;32m←\033[m,\033[1;32mq\033[m] 详细[\033[1;32m→\033[m,\033[1;32mRtn\033[m] 搜索[\033[1;32ms\033[m] 显示所有[\033[1;32mf\033[m]\n"); if (help_search[0]) sprintf(searchstr, "搜索:%s",help_search); else searchstr[0]=0; move(2,0); prints("\033[0;1;44m %-4s %-10s %-15s%s%-45s\033[m","序号","索引","介绍", help_search[0]?"\033[33m":"",searchstr); return SHOW_CONTINUE; }