| 22 |
#include "str_process.h" |
#include "str_process.h" |
| 23 |
#include "user_list.h" |
#include "user_list.h" |
| 24 |
#include "user_priv.h" |
#include "user_priv.h" |
| 25 |
|
#include "user_info_display.h" |
| 26 |
#include "user_list_display.h" |
#include "user_list_display.h" |
| 27 |
#include <string.h> |
#include <string.h> |
| 28 |
#include <time.h> |
#include <time.h> |
| 82 |
else if (p_tm->tm_year > 70) |
else if (p_tm->tm_year > 70) |
| 83 |
{ |
{ |
| 84 |
snprintf(str_time_login, sizeof(str_time_login), |
snprintf(str_time_login, sizeof(str_time_login), |
| 85 |
"%d年", p_tm->tm_year - 70); |
"%d年%d天", p_tm->tm_year - 70, p_tm->tm_yday); |
| 86 |
} |
} |
| 87 |
else if (p_tm->tm_yday > 0) |
else if (p_tm->tm_yday > 0) |
| 88 |
{ |
{ |
| 92 |
else if (p_tm->tm_hour > 0) |
else if (p_tm->tm_hour > 0) |
| 93 |
{ |
{ |
| 94 |
snprintf(str_time_login, sizeof(str_time_login), |
snprintf(str_time_login, sizeof(str_time_login), |
| 95 |
"%d时%d分", p_tm->tm_hour, p_tm->tm_min); |
"%d:%.2d", p_tm->tm_hour, p_tm->tm_min); |
| 96 |
} |
} |
| 97 |
else |
else |
| 98 |
{ |
{ |
| 99 |
snprintf(str_time_login, sizeof(str_time_login), |
snprintf(str_time_login, sizeof(str_time_login), |
| 100 |
"%d分%d秒", p_tm->tm_min, p_tm->tm_sec); |
"%d\'%.2d\"", p_tm->tm_min, p_tm->tm_sec); |
| 101 |
} |
} |
| 102 |
|
|
| 103 |
moveto(4 + i, 1); |
moveto(4 + i, 1); |
| 142 |
else if (p_tm->tm_yday > 0) |
else if (p_tm->tm_yday > 0) |
| 143 |
{ |
{ |
| 144 |
snprintf(str_time_login, sizeof(str_time_login), |
snprintf(str_time_login, sizeof(str_time_login), |
| 145 |
"%d天%d时", p_tm->tm_yday, p_tm->tm_hour); |
"%dd%dh", p_tm->tm_yday, p_tm->tm_hour); |
| 146 |
} |
} |
| 147 |
else if (p_tm->tm_hour > 0) |
else if (p_tm->tm_hour > 0) |
| 148 |
{ |
{ |
| 149 |
snprintf(str_time_login, sizeof(str_time_login), |
snprintf(str_time_login, sizeof(str_time_login), |
| 150 |
"%d时%d分", p_tm->tm_hour, p_tm->tm_min); |
"%d:%.2d", p_tm->tm_hour, p_tm->tm_min); |
| 151 |
} |
} |
| 152 |
else |
else |
| 153 |
{ |
{ |
| 154 |
snprintf(str_time_login, sizeof(str_time_login), |
snprintf(str_time_login, sizeof(str_time_login), |
| 155 |
"%d\'%d\"", p_tm->tm_min, p_tm->tm_sec); |
"%d\'%.2d\"", p_tm->tm_min, p_tm->tm_sec); |
| 156 |
} |
} |
| 157 |
|
|
| 158 |
tm_duration = tm_now - p_users[i].last_tm; |
tm_duration = tm_now - p_users[i].last_tm; |
| 344 |
char page_info_str[LINE_BUFFER_LEN]; |
char page_info_str[LINE_BUFFER_LEN]; |
| 345 |
USER_INFO users[BBS_user_limit_per_page]; |
USER_INFO users[BBS_user_limit_per_page]; |
| 346 |
USER_ONLINE_INFO online_users[BBS_user_limit_per_page]; |
USER_ONLINE_INFO online_users[BBS_user_limit_per_page]; |
| 347 |
int user_count; |
int user_count = 0; |
| 348 |
int page_count; |
int page_count = 0; |
| 349 |
int page_id = 0; |
int page_id = 0; |
| 350 |
int selected_index = 0; |
int selected_index = 0; |
| 351 |
int ret; |
int ret = 0; |
| 352 |
|
|
| 353 |
user_list_draw_screen(online_user); |
user_list_draw_screen(online_user); |
| 354 |
|
|
| 446 |
} |
} |
| 447 |
break; |
break; |
| 448 |
case VIEW_USER: |
case VIEW_USER: |
| 449 |
clearscr(); |
user_info_display(online_user ? &(online_users[selected_index].user_info) : &(users[selected_index])); |
|
prints("已选中用户 [%s]\n", online_user |
|
|
? online_users[selected_index].user_info.username |
|
|
: users[selected_index].username); |
|
|
press_any_key(); |
|
| 450 |
user_list_draw_screen(online_user); |
user_list_draw_screen(online_user); |
| 451 |
break; |
break; |
| 452 |
case SHOW_HELP: |
case SHOW_HELP: |