| 15 |
***************************************************************************/ |
***************************************************************************/ |
| 16 |
|
|
| 17 |
#include "article_cache.h" |
#include "article_cache.h" |
| 18 |
|
#include "article_favor_display.h" |
| 19 |
#include "article_view_log.h" |
#include "article_view_log.h" |
| 20 |
#include "bbs.h" |
#include "bbs.h" |
| 21 |
#include "bbs_cmd.h" |
#include "bbs_cmd.h" |
| 110 |
return REDRAW; |
return REDRAW; |
| 111 |
} |
} |
| 112 |
|
|
| 113 |
|
int version(void *param) |
| 114 |
|
{ |
| 115 |
|
display_file(DATA_VERSION, 1); |
| 116 |
|
|
| 117 |
|
return REDRAW; |
| 118 |
|
} |
| 119 |
|
|
| 120 |
int reload_bbs_conf(void *param) |
int reload_bbs_conf(void *param) |
| 121 |
{ |
{ |
| 122 |
clearscr(); |
clearscr(); |
| 244 |
return NOREDRAW; |
return NOREDRAW; |
| 245 |
} |
} |
| 246 |
show_top10 = 1; |
show_top10 = 1; |
| 247 |
|
|
| 248 |
clearscr(); |
clearscr(); |
| 249 |
show_top("", BBS_name, ""); |
show_top("", BBS_name, ""); |
| 250 |
show_bottom(""); |
show_bottom(""); |
| 255 |
{ |
{ |
| 256 |
iflush(); |
iflush(); |
| 257 |
ch = igetch(100); |
ch = igetch(100); |
| 258 |
|
|
| 259 |
|
if (ch != KEY_NULL && ch != KEY_TIMEOUT) |
| 260 |
|
{ |
| 261 |
|
BBS_last_access_tm = time(NULL); |
| 262 |
|
} |
| 263 |
|
|
| 264 |
switch (ch) |
switch (ch) |
| 265 |
{ |
{ |
| 266 |
case KEY_NULL: // broken pipe |
case KEY_NULL: // broken pipe |
| 267 |
|
log_error("KEY_NULL\n"); |
| 268 |
show_top10 = 0; |
show_top10 = 0; |
| 269 |
return 0; |
return 0; |
| 270 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 271 |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 272 |
{ |
{ |
| 273 |
|
log_error("User input timeout\n"); |
| 274 |
show_top10 = 0; |
show_top10 = 0; |
| 275 |
return 0; |
return 0; |
| 276 |
} |
} |
| 277 |
continue; |
continue; |
| 278 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 279 |
default: |
default: |
| 280 |
switch (menu_control(&top10_menu, ch)) |
switch (menu_control(&top10_menu, ch)) |
| 281 |
{ |
{ |
| 294 |
} |
} |
| 295 |
} |
} |
| 296 |
|
|
|
BBS_last_access_tm = time(NULL); |
|
|
|
|
| 297 |
if (ch == EXITMENU) |
if (ch == EXITMENU) |
| 298 |
{ |
{ |
| 299 |
break; |
break; |
| 300 |
} |
} |
| 301 |
} |
} |
| 302 |
} |
} |
| 303 |
|
|
| 304 |
show_top10 = 0; |
show_top10 = 0; |
| 305 |
return REDRAW; |
return REDRAW; |
| 306 |
} |
} |
| 329 |
|
|
| 330 |
int favor_topic(void *param) |
int favor_topic(void *param) |
| 331 |
{ |
{ |
| 332 |
clearscr(); |
if (article_favor_display(&BBS_article_favor) < 0) |
| 333 |
prints("此功能尚未实现"); |
{ |
| 334 |
press_any_key(); |
log_error("article_favor_display() error\n"); |
| 335 |
|
} |
| 336 |
|
|
| 337 |
return REDRAW; |
return REDRAW; |
| 338 |
} |
} |