| 81 |
int |
int |
| 82 |
bbs_center() |
bbs_center() |
| 83 |
{ |
{ |
| 84 |
char temp[256]; |
clearscr (); |
| 85 |
|
|
| 86 |
show_top(); |
show_top ("²âÊÔ"); |
| 87 |
|
show_bottom ("²âÊÔ"); |
| 88 |
|
|
| 89 |
|
igetch(); |
| 90 |
|
|
| 91 |
strcpy (temp, app_home_dir); |
return 0; |
| 92 |
strcat (temp, "data/test.txt"); |
} |
| 93 |
display_file_ex (temp, 1, 1); |
|
| 94 |
|
int |
| 95 |
|
show_top (char *status) |
| 96 |
|
{ |
| 97 |
|
char buffer[256]; |
| 98 |
|
|
| 99 |
|
str_space (buffer, 20-strlen(BBS_current_section_name)); |
| 100 |
|
|
| 101 |
|
moveto (1, 0); |
| 102 |
|
prints ("\033[1;44;33m%-20s \033[37m%20s" |
| 103 |
|
" %s\033[33mÌÖÂÛÇø [%s]\033[m", |
| 104 |
|
status, BBS_name, buffer, BBS_current_section_name); |
| 105 |
|
iflush (); |
| 106 |
|
|
| 107 |
|
return 0; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
int |
| 111 |
|
show_bottom (char *msg) |
| 112 |
|
{ |
| 113 |
|
char str_time[256], str_time_onine[20], buffer[256]; |
| 114 |
|
time_t time_online; |
| 115 |
|
struct tm *tm_online; |
| 116 |
|
|
| 117 |
|
get_time_str (str_time, 256); |
| 118 |
|
str_space (buffer, 33-strlen(BBS_username)); |
| 119 |
|
|
| 120 |
|
time_online = time (0) - BBS_login_tm; |
| 121 |
|
tm_online = gmtime (&time_online); |
| 122 |
|
|
| 123 |
show_bottom(); |
moveto (screen_lines, 0); |
| 124 |
|
prints ("\033[1;44;33m[\033[36m%s\033[33m]" |
| 125 |
|
"%sÕʺÅ[\033[36m%s\033[33m]" |
| 126 |
|
"[\033[36m%1d\033[33m:\033[36m%2d\033[33m:\033[36m%2d\033[33m]\033[m", |
| 127 |
|
str_time, buffer, BBS_username, tm_online->tm_mday - 1, |
| 128 |
|
tm_online->tm_hour, tm_online->tm_min); |
| 129 |
|
iflush (); |
| 130 |
|
|
| 131 |
return 0; |
return 0; |
| 132 |
} |
} |