| 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" |
| 212 |
{ |
{ |
| 213 |
SECTION_LIST *p_section; |
SECTION_LIST *p_section; |
| 214 |
|
|
| 215 |
p_section = section_list_find_by_name(param, NULL); |
p_section = section_list_find_by_name(param); |
| 216 |
if (p_section == NULL) |
if (p_section == NULL) |
| 217 |
{ |
{ |
| 218 |
log_error("Section %s not found\n", (const char *)param); |
log_error("Section %s not found\n", (const char *)param); |
| 229 |
|
|
| 230 |
int show_top10_menu(void *param) |
int show_top10_menu(void *param) |
| 231 |
{ |
{ |
| 232 |
|
static int show_top10 = 0; |
| 233 |
int ch = 0; |
int ch = 0; |
| 234 |
|
|
| 235 |
|
if (show_top10) |
| 236 |
|
{ |
| 237 |
|
return NOREDRAW; |
| 238 |
|
} |
| 239 |
|
show_top10 = 1; |
| 240 |
|
|
| 241 |
clearscr(); |
clearscr(); |
| 242 |
show_top("", BBS_name, ""); |
show_top("", BBS_name, ""); |
| 243 |
show_bottom(""); |
show_bottom(""); |
| 251 |
switch (ch) |
switch (ch) |
| 252 |
{ |
{ |
| 253 |
case KEY_NULL: // broken pipe |
case KEY_NULL: // broken pipe |
| 254 |
|
show_top10 = 0; |
| 255 |
return 0; |
return 0; |
| 256 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 257 |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 258 |
{ |
{ |
| 259 |
|
show_top10 = 0; |
| 260 |
return 0; |
return 0; |
| 261 |
} |
} |
| 262 |
continue; |
continue; |
| 289 |
} |
} |
| 290 |
} |
} |
| 291 |
|
|
| 292 |
|
show_top10 = 0; |
| 293 |
return REDRAW; |
return REDRAW; |
| 294 |
} |
} |
| 295 |
|
|
| 317 |
|
|
| 318 |
int favor_topic(void *param) |
int favor_topic(void *param) |
| 319 |
{ |
{ |
| 320 |
clearscr(); |
if (article_favor_display(&BBS_article_favor) < 0) |
| 321 |
prints("此功能尚未实现"); |
{ |
| 322 |
press_any_key(); |
log_error("article_favor_display() error\n"); |
| 323 |
|
} |
| 324 |
|
|
| 325 |
return REDRAW; |
return REDRAW; |
| 326 |
} |
} |