| 343 |
char page_info_str[LINE_BUFFER_LEN]; |
char page_info_str[LINE_BUFFER_LEN]; |
| 344 |
USER_INFO users[BBS_user_limit_per_page]; |
USER_INFO users[BBS_user_limit_per_page]; |
| 345 |
USER_ONLINE_INFO online_users[BBS_user_limit_per_page]; |
USER_ONLINE_INFO online_users[BBS_user_limit_per_page]; |
| 346 |
int user_count; |
int user_count = 0; |
| 347 |
int page_count; |
int page_count = 0; |
| 348 |
int page_id = 0; |
int page_id = 0; |
| 349 |
int selected_index = 0; |
int selected_index = 0; |
| 350 |
int ret; |
int ret = 0; |
| 351 |
|
|
| 352 |
user_list_draw_screen(online_user); |
user_list_draw_screen(online_user); |
| 353 |
|
|
| 446 |
break; |
break; |
| 447 |
case VIEW_USER: |
case VIEW_USER: |
| 448 |
clearscr(); |
clearscr(); |
| 449 |
prints("已选中用户 [%s]\n", online_user |
if (online_user) |
| 450 |
? online_users[selected_index].user_info.username |
{ |
| 451 |
: users[selected_index].username); |
moveto(1, 1); |
| 452 |
|
prints("已选中用户 [%s] 会话 %d", online_users[selected_index].user_info.username, online_users[selected_index].id); |
| 453 |
|
|
| 454 |
|
USER_ONLINE_INFO users[5]; |
| 455 |
|
int user_cnt = 5; |
| 456 |
|
ret = query_user_online_info_by_uid(online_users[selected_index].user_info.uid, users, &user_cnt, 0); |
| 457 |
|
if (ret <= 0) |
| 458 |
|
{ |
| 459 |
|
log_error("query_user_online_info_by_uid(uid=%d, cnt=%d) error: %d\n", |
| 460 |
|
online_users[selected_index].user_info.uid, user_cnt, ret); |
| 461 |
|
} |
| 462 |
|
else |
| 463 |
|
{ |
| 464 |
|
for (int i = 0; i < user_cnt; i++) |
| 465 |
|
{ |
| 466 |
|
moveto(2 + i, 1); |
| 467 |
|
prints("会话%d", users[i].id); |
| 468 |
|
} |
| 469 |
|
} |
| 470 |
|
} |
| 471 |
|
else |
| 472 |
|
{ |
| 473 |
|
moveto(1, 1); |
| 474 |
|
prints("已选中用户 [%s]", users[selected_index].username); |
| 475 |
|
moveto(2, 1); |
| 476 |
|
prints("发帖数:%d", user_stat_get_article_cnt(users[selected_index].uid)); |
| 477 |
|
} |
| 478 |
press_any_key(); |
press_any_key(); |
| 479 |
user_list_draw_screen(online_user); |
user_list_draw_screen(online_user); |
| 480 |
break; |
break; |